xref: /csrg-svn/sys/kern/uipc_proto.c (revision 17102)
1*17102Sbloom /*	uipc_proto.c	6.3	84/08/29	*/
24825Swnj 
3*17102Sbloom #include "param.h"
4*17102Sbloom #include "socket.h"
5*17102Sbloom #include "protosw.h"
6*17102Sbloom #include "domain.h"
7*17102Sbloom #include "mbuf.h"
84825Swnj 
94787Swnj /*
109009Sroot  * Definitions of protocols supported in the UNIX domain.
114787Swnj  */
124787Swnj 
139009Sroot int	uipc_usrreq();
146585Ssam int	raw_init(),raw_usrreq(),raw_input(),raw_ctlinput();
1516993Skarels extern	struct domain unixdomain;		/* or at least forward */
165621Swnj 
179009Sroot struct protosw unixsw[] = {
1816993Skarels { SOCK_STREAM,	&unixdomain,	0,		PR_CONNREQUIRED|PR_WANTRCVD,
194825Swnj   0,		0,		0,		0,
209009Sroot   uipc_usrreq,
214825Swnj   0,		0,		0,		0,
224890Swnj },
2316993Skarels { SOCK_DGRAM,	&unixdomain,	0,		PR_ATOMIC|PR_ADDR|PR_RIGHTS,
244825Swnj   0,		0,		0,		0,
259009Sroot   uipc_usrreq,
264825Swnj   0,		0,		0,		0,
274890Swnj },
284787Swnj { 0,		0,		0,		0,
296585Ssam   raw_input,	0,		raw_ctlinput,	0,
305621Swnj   raw_usrreq,
315621Swnj   raw_init,	0,		0,		0,
324890Swnj }
334787Swnj };
344787Swnj 
3516993Skarels int	unp_externalize(), unp_dispose();
3616993Skarels 
379009Sroot struct domain unixdomain =
3816993Skarels     { AF_UNIX, "unix", 0, unp_externalize, unp_dispose,
3916993Skarels       unixsw, &unixsw[sizeof(unixsw)/sizeof(unixsw[0])] };
40