in_proto.c

来自「操作系统SunOS 4.1.3版本的源码」· C语言 代码 · 共 61 行

C
61
字号
#ifndef lintstatic        char sccsid[] = "@(#)in_proto.c 1.1 92/07/30 Copyr 1983 Sun Micro";#endif#include <sys/param.h>#include <sys/socket.h>#include "boot/protosw.h"#include "boot/domain.h"#include <sys/mbuf.h>#include <netinet/in.h>#include <netinet/in_systm.h>/* * TCP/IP protocol family: IP, ICMP, UDP, TCP. */int	udp_input(),udp_ctlinput();int	udp_usrreq();int	udp_init();/* * IMP protocol family: raw interface. * Using the raw interface entry to get the timer routine * in is a kludge. */#include "imp.h"#if NIMP > 0int	rimp_output(), hostslowtimo();#endifstruct protosw inetsw[] = {{ SOCK_DGRAM,	PF_INET,	IPPROTO_UDP,	PR_ATOMIC|PR_ADDR,  udp_input,	0,		udp_ctlinput,	0,  udp_usrreq,  udp_init,	0,		0,		0,},/* * This is just a place-holder, since we do not support IPPROTO_RAW. */{ SOCK_RAW,	PF_INET,	IPPROTO_RAW,	PR_ATOMIC|PR_ADDR,  0,		0,		0,		0,  0,  0,		0,		0,		0,},};struct domain inetdomain =    { AF_INET, "internet", inetsw, &inetsw[sizeof(inetsw)/sizeof(inetsw[0])] };#if NIMP > 0struct protosw impsw[] = {{ SOCK_RAW,	PF_IMPLINK,	0,		PR_ATOMIC|PR_ADDR,  0,		rimp_output,	0,		0,  raw_usrreq,  0,		0,		hostslowtimo,	0,},};struct domain impdomain =    { AF_IMPLINK, "imp", impsw, &impsw[sizeof (impsw)/sizeof(impsw[0])] };#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?