fixes to get uio'd readi for char devs
[unix-history] / usr / src / sys / netinet / in_proto.c
CommitLineData
6d45c4ba 1/* in_proto.c 5.2 82/08/01 */
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
BJ
7#include "../h/mbuf.h"
8#include "../net/in.h"
9#include "../net/in_systm.h"
10
11/*
12 * TCP/IP protocol family: IP, ICMP, UDP, TCP.
13 */
14int ip_output();
15int ip_init(),ip_slowtimo(),ip_drain();
16int icmp_input();
17int udp_input(),udp_ctlinput();
18int udp_usrreq();
19int udp_init();
20int tcp_input(),tcp_ctlinput();
21int tcp_usrreq();
22int tcp_init(),tcp_fasttimo(),tcp_slowtimo(),tcp_drain();
23int rip_input(),rip_output();
6d45c4ba 24extern int raw_usrreq();
c5707736
BJ
25/*
26 * IMP protocol family: raw interface.
27 * Using the raw interface entry to get the timer routine
28 * in is a kludge.
29 */
30#include "imp.h"
31#if NIMP > 0
32int rimp_output(), hostslowtimo();
33#endif
34
35struct protosw inetsw[] = {
6d45c4ba 36{ 0, PF_INET, 0, 0,
c5707736
BJ
37 0, ip_output, 0, 0,
38 0,
39 ip_init, 0, ip_slowtimo, ip_drain,
40},
41{ 0, PF_INET, IPPROTO_ICMP, 0,
42 icmp_input, 0, 0, 0,
43 0,
44 0, 0, 0, 0,
45},
46{ SOCK_DGRAM, PF_INET, IPPROTO_UDP, PR_ATOMIC|PR_ADDR,
47 udp_input, 0, udp_ctlinput, 0,
48 udp_usrreq,
49 udp_init, 0, 0, 0,
50},
51{ SOCK_STREAM, PF_INET, IPPROTO_TCP, PR_CONNREQUIRED|PR_WANTRCVD,
52 tcp_input, 0, tcp_ctlinput, 0,
53 tcp_usrreq,
54 tcp_init, tcp_fasttimo, tcp_slowtimo, tcp_drain,
55},
56{ SOCK_RAW, PF_INET, IPPROTO_RAW, PR_ATOMIC|PR_ADDR,
57 rip_input, rip_output, 0, 0,
58 raw_usrreq,
59 0, 0, 0, 0,
60},
6d45c4ba
BJ
61};
62
63struct domain inetdomain =
64 { AF_INET, "internet", inetsw, &inetsw[sizeof(inetsw)/sizeof(inetsw[0])] };
65
c5707736 66#if NIMP > 0
6d45c4ba 67struct protosw impsw[] = {
c5707736
BJ
68{ SOCK_RAW, PF_IMPLINK, 0, PR_ATOMIC|PR_ADDR,
69 0, rimp_output, 0, 0,
70 raw_usrreq,
71 0, 0, hostslowtimo, 0,
6d45c4ba 72},
c5707736
BJ
73};
74
6d45c4ba
BJ
75struct domain impdomain =
76 { AF_IMPLINK, "imp", impsw, &impsw[sizeof (impsw)/sizeof(impsw[0])] };
77#endif