1 /*- 2 * Copyright (c) 1982, 1986 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)uipc_proto.c 7.7 (Berkeley) 10/11/92 8 */ 9 10 #include <sys/param.h> 11 #include <sys/socket.h> 12 #include <sys/protosw.h> 13 #include <sys/domain.h> 14 #include <sys/mbuf.h> 15 16 /* 17 * Definitions of protocols supported in the UNIX domain. 18 */ 19 20 int uipc_usrreq(); 21 int raw_init(),raw_usrreq(),raw_input(),raw_ctlinput(); 22 extern struct domain unixdomain; /* or at least forward */ 23 24 struct protosw unixsw[] = { 25 { SOCK_STREAM, &unixdomain, 0, PR_CONNREQUIRED|PR_WANTRCVD|PR_RIGHTS, 26 0, 0, 0, 0, 27 uipc_usrreq, 28 0, 0, 0, 0, 29 }, 30 { SOCK_DGRAM, &unixdomain, 0, PR_ATOMIC|PR_ADDR|PR_RIGHTS, 31 0, 0, 0, 0, 32 uipc_usrreq, 33 0, 0, 0, 0, 34 }, 35 { 0, 0, 0, 0, 36 raw_input, 0, raw_ctlinput, 0, 37 raw_usrreq, 38 raw_init, 0, 0, 0, 39 } 40 }; 41 42 int unp_externalize(), unp_dispose(); 43 44 struct domain unixdomain = 45 { AF_UNIX, "unix", 0, unp_externalize, unp_dispose, 46 unixsw, &unixsw[sizeof(unixsw)/sizeof(unixsw[0])] }; 47