add unofficial network disk protocol number
[unix-history] / usr / src / sys / netinet / in_proto.c
CommitLineData
59965020 1/* in_proto.c 5.3 82/11/03 */
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
35
36struct protosw inetsw[] = {
6d45c4ba 37{ 0, PF_INET, 0, 0,
c5707736
BJ
38 0, ip_output, 0, 0,
39 0,
40 ip_init, 0, ip_slowtimo, ip_drain,
41},
42{ 0, PF_INET, IPPROTO_ICMP, 0,
43 icmp_input, 0, 0, 0,
44 0,
45 0, 0, 0, 0,
46},
47{ SOCK_DGRAM, PF_INET, IPPROTO_UDP, PR_ATOMIC|PR_ADDR,
48 udp_input, 0, udp_ctlinput, 0,
49 udp_usrreq,
50 udp_init, 0, 0, 0,
51},
52{ SOCK_STREAM, PF_INET, IPPROTO_TCP, PR_CONNREQUIRED|PR_WANTRCVD,
53 tcp_input, 0, tcp_ctlinput, 0,
54 tcp_usrreq,
55 tcp_init, tcp_fasttimo, tcp_slowtimo, tcp_drain,
56},
57{ SOCK_RAW, PF_INET, IPPROTO_RAW, PR_ATOMIC|PR_ADDR,
58 rip_input, rip_output, 0, 0,
59 raw_usrreq,
60 0, 0, 0, 0,
61},
6d45c4ba
BJ
62};
63
64struct domain inetdomain =
65 { AF_INET, "internet", inetsw, &inetsw[sizeof(inetsw)/sizeof(inetsw[0])] };
66
c5707736 67#if NIMP > 0
6d45c4ba 68struct protosw impsw[] = {
c5707736
BJ
69{ SOCK_RAW, PF_IMPLINK, 0, PR_ATOMIC|PR_ADDR,
70 0, rimp_output, 0, 0,
71 raw_usrreq,
72 0, 0, hostslowtimo, 0,
6d45c4ba 73},
c5707736
BJ
74};
75
6d45c4ba
BJ
76struct domain impdomain =
77 { AF_IMPLINK, "imp", impsw, &impsw[sizeof (impsw)/sizeof(impsw[0])] };
78#endif