1*7618Sroot /* in_proto.c 5.1 82/07/31 */ 2*7618Sroot 3*7618Sroot #include "../h/param.h" 4*7618Sroot #include "../h/socket.h" 5*7618Sroot #include "../h/protosw.h" 6*7618Sroot #include "../h/mbuf.h" 7*7618Sroot #include "../net/in.h" 8*7618Sroot #include "../net/in_systm.h" 9*7618Sroot 10*7618Sroot /* 11*7618Sroot * TCP/IP protocol family: IP, ICMP, UDP, TCP. 12*7618Sroot */ 13*7618Sroot int ip_output(); 14*7618Sroot int ip_init(),ip_slowtimo(),ip_drain(); 15*7618Sroot int icmp_input(); 16*7618Sroot int udp_input(),udp_ctlinput(); 17*7618Sroot int udp_usrreq(); 18*7618Sroot int udp_init(); 19*7618Sroot int tcp_input(),tcp_ctlinput(); 20*7618Sroot int tcp_usrreq(); 21*7618Sroot int tcp_init(),tcp_fasttimo(),tcp_slowtimo(),tcp_drain(); 22*7618Sroot int rip_input(),rip_output(); 23*7618Sroot /* 24*7618Sroot * IMP protocol family: raw interface. 25*7618Sroot * Using the raw interface entry to get the timer routine 26*7618Sroot * in is a kludge. 27*7618Sroot */ 28*7618Sroot #include "imp.h" 29*7618Sroot #if NIMP > 0 30*7618Sroot int rimp_output(), hostslowtimo(); 31*7618Sroot #endif 32*7618Sroot 33*7618Sroot struct protosw inetsw[] = { 34*7618Sroot { 0, 0, 0, 0, 35*7618Sroot 0, ip_output, 0, 0, 36*7618Sroot 0, 37*7618Sroot ip_init, 0, ip_slowtimo, ip_drain, 38*7618Sroot }, 39*7618Sroot { 0, PF_INET, IPPROTO_ICMP, 0, 40*7618Sroot icmp_input, 0, 0, 0, 41*7618Sroot 0, 42*7618Sroot 0, 0, 0, 0, 43*7618Sroot }, 44*7618Sroot { SOCK_DGRAM, PF_INET, IPPROTO_UDP, PR_ATOMIC|PR_ADDR, 45*7618Sroot udp_input, 0, udp_ctlinput, 0, 46*7618Sroot udp_usrreq, 47*7618Sroot udp_init, 0, 0, 0, 48*7618Sroot }, 49*7618Sroot { SOCK_STREAM, PF_INET, IPPROTO_TCP, PR_CONNREQUIRED|PR_WANTRCVD, 50*7618Sroot tcp_input, 0, tcp_ctlinput, 0, 51*7618Sroot tcp_usrreq, 52*7618Sroot tcp_init, tcp_fasttimo, tcp_slowtimo, tcp_drain, 53*7618Sroot }, 54*7618Sroot { SOCK_RAW, PF_INET, IPPROTO_RAW, PR_ATOMIC|PR_ADDR, 55*7618Sroot rip_input, rip_output, 0, 0, 56*7618Sroot raw_usrreq, 57*7618Sroot 0, 0, 0, 0, 58*7618Sroot }, 59*7618Sroot #if NIMP > 0 60*7618Sroot { SOCK_RAW, PF_IMPLINK, 0, PR_ATOMIC|PR_ADDR, 61*7618Sroot 0, rimp_output, 0, 0, 62*7618Sroot raw_usrreq, 63*7618Sroot 0, 0, hostslowtimo, 0, 64*7618Sroot } 65*7618Sroot #endif 66*7618Sroot }; 67*7618Sroot 68*7618Sroot struct domain inetdomain = 69*7618Sroot { AF_INET, "internet", inetsw, &inetsw[sizeof(inetsw)/sizeof(inetsw[0])] }; 70