xref: /csrg-svn/sys/kern/uipc_proto.c (revision 68326)
149594Sbostic /*-
263180Sbostic  * Copyright (c) 1982, 1986, 1993
363180Sbostic  *	The Regents of the University of California.  All rights reserved.
423419Smckusick  *
549594Sbostic  * %sccs.include.redist.c%
633187Sbostic  *
7*68326Scgd  *	@(#)uipc_proto.c	8.2 (Berkeley) 02/14/95
823419Smckusick  */
94825Swnj 
1056517Sbostic #include <sys/param.h>
1156517Sbostic #include <sys/socket.h>
1256517Sbostic #include <sys/protosw.h>
1356517Sbostic #include <sys/domain.h>
1456517Sbostic #include <sys/mbuf.h>
154825Swnj 
164787Swnj /*
179009Sroot  * Definitions of protocols supported in the UNIX domain.
184787Swnj  */
194787Swnj 
2061105Ssklower int	uipc_usrreq(), raw_usrreq();
21*68326Scgd void	raw_init(), raw_input(), raw_ctlinput();
2216993Skarels extern	struct domain unixdomain;		/* or at least forward */
235621Swnj 
249009Sroot struct protosw unixsw[] = {
2525631Skarels { SOCK_STREAM,	&unixdomain,	0,	PR_CONNREQUIRED|PR_WANTRCVD|PR_RIGHTS,
264825Swnj   0,		0,		0,		0,
279009Sroot   uipc_usrreq,
284825Swnj   0,		0,		0,		0,
294890Swnj },
3016993Skarels { SOCK_DGRAM,	&unixdomain,	0,		PR_ATOMIC|PR_ADDR|PR_RIGHTS,
314825Swnj   0,		0,		0,		0,
329009Sroot   uipc_usrreq,
334825Swnj   0,		0,		0,		0,
344890Swnj },
354787Swnj { 0,		0,		0,		0,
366585Ssam   raw_input,	0,		raw_ctlinput,	0,
375621Swnj   raw_usrreq,
385621Swnj   raw_init,	0,		0,		0,
394890Swnj }
404787Swnj };
414787Swnj 
4216993Skarels int	unp_externalize(), unp_dispose();
4316993Skarels 
449009Sroot struct domain unixdomain =
4516993Skarels     { AF_UNIX, "unix", 0, unp_externalize, unp_dispose,
4616993Skarels       unixsw, &unixsw[sizeof(unixsw)/sizeof(unixsw[0])] };
47