fix count on bzero
[unix-history] / usr / src / sys / netinet / in_proto.c
CommitLineData
c49e68cc 1/* in_proto.c 6.4 84/07/31 */
c5707736
BJ
2
3#include "../h/param.h"
4#include "../h/socket.h"
5#include "../h/protosw.h"
6d45c4ba 6#include "../h/domain.h"
c5707736 7#include "../h/mbuf.h"
59965020
BJ
8
9#include "../netinet/in.h"
10#include "../netinet/in_systm.h"
c5707736
BJ
11
12/*
13 * TCP/IP protocol family: IP, ICMP, UDP, TCP.
14 */
15int ip_output();
16int ip_init(),ip_slowtimo(),ip_drain();
17int icmp_input();
18int udp_input(),udp_ctlinput();
19int udp_usrreq();
20int udp_init();
21int tcp_input(),tcp_ctlinput();
22int tcp_usrreq();
23int tcp_init(),tcp_fasttimo(),tcp_slowtimo(),tcp_drain();
24int rip_input(),rip_output();
6d45c4ba 25extern int raw_usrreq();
c5707736
BJ
26/*
27 * IMP protocol family: raw interface.
28 * Using the raw interface entry to get the timer routine
29 * in is a kludge.
30 */
31#include "imp.h"
32#if NIMP > 0
33int rimp_output(), hostslowtimo();
34#endif
8c58db17
SL
35/*
36 * Network disk protocol: runs on top of IP
37 */
38#include "nd.h"
39#if NND > 0
40int nd_input(), nd_slowtimo(), nd_init();
41#endif
c5707736
BJ
42
43struct protosw inetsw[] = {
6d45c4ba 44{ 0, PF_INET, 0, 0,
c5707736
BJ
45 0, ip_output, 0, 0,
46 0,
47 ip_init, 0, ip_slowtimo, ip_drain,
48},
c5707736
BJ
49{ SOCK_DGRAM, PF_INET, IPPROTO_UDP, PR_ATOMIC|PR_ADDR,
50 udp_input, 0, udp_ctlinput, 0,
51 udp_usrreq,
52 udp_init, 0, 0, 0,
53},
54{ SOCK_STREAM, PF_INET, IPPROTO_TCP, PR_CONNREQUIRED|PR_WANTRCVD,
55 tcp_input, 0, tcp_ctlinput, 0,
56 tcp_usrreq,
57 tcp_init, tcp_fasttimo, tcp_slowtimo, tcp_drain,
58},
59{ SOCK_RAW, PF_INET, IPPROTO_RAW, PR_ATOMIC|PR_ADDR,
60 rip_input, rip_output, 0, 0,
61 raw_usrreq,
62 0, 0, 0, 0,
63},
c49e68cc
MK
64{ SOCK_RAW, PF_INET, IPPROTO_EGP, PR_ATOMIC|PR_ADDR,
65 rip_input, rip_output, 0, 0,
66 raw_usrreq,
67 0, 0, 0, 0,
68},
dbf57086
MK
69{ SOCK_RAW, PF_INET, IPPROTO_ICMP, PR_ATOMIC|PR_ADDR,
70 icmp_input, rip_output, 0, 0,
71 raw_usrreq,
72 0, 0, 0, 0,
73},
6d45c4ba
BJ
74};
75
76struct domain inetdomain =
77 { AF_INET, "internet", inetsw, &inetsw[sizeof(inetsw)/sizeof(inetsw[0])] };
78
c5707736 79#if NIMP > 0
6d45c4ba 80struct protosw impsw[] = {
c5707736
BJ
81{ SOCK_RAW, PF_IMPLINK, 0, PR_ATOMIC|PR_ADDR,
82 0, rimp_output, 0, 0,
83 raw_usrreq,
84 0, 0, hostslowtimo, 0,
6d45c4ba 85},
c5707736
BJ
86};
87
6d45c4ba
BJ
88struct domain impdomain =
89 { AF_IMPLINK, "imp", impsw, &impsw[sizeof (impsw)/sizeof(impsw[0])] };
90#endif