xref: /csrg-svn/sys/kern/uipc_proto.c (revision 16993)
1*16993Skarels /*	uipc_proto.c	6.2	84/08/21	*/
24825Swnj 
34787Swnj #include "../h/param.h"
44825Swnj #include "../h/socket.h"
54825Swnj #include "../h/protosw.h"
69009Sroot #include "../h/domain.h"
74825Swnj #include "../h/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();
15*16993Skarels extern	struct domain unixdomain;		/* or at least forward */
165621Swnj 
179009Sroot struct protosw unixsw[] = {
18*16993Skarels { SOCK_STREAM,	&unixdomain,	0,		PR_CONNREQUIRED|PR_WANTRCVD,
194825Swnj   0,		0,		0,		0,
209009Sroot   uipc_usrreq,
214825Swnj   0,		0,		0,		0,
224890Swnj },
23*16993Skarels { 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 
35*16993Skarels int	unp_externalize(), unp_dispose();
36*16993Skarels 
379009Sroot struct domain unixdomain =
38*16993Skarels     { AF_UNIX, "unix", 0, unp_externalize, unp_dispose,
39*16993Skarels       unixsw, &unixsw[sizeof(unixsw)/sizeof(unixsw[0])] };
40