Commit | Line | Data |
---|---|---|
da7c5cc6 | 1 | /* |
0880b18e | 2 | * Copyright (c) 1982, 1986 Regents of the University of California. |
5b519e94 | 3 | * All rights reserved. |
da7c5cc6 | 4 | * |
5b519e94 | 5 | * Redistribution and use in source and binary forms are permitted |
616d42db KB |
6 | * provided that the above copyright notice and this paragraph are |
7 | * duplicated in all such forms and that any documentation, | |
8 | * advertising materials, and other materials related to such | |
9 | * distribution and use acknowledge that the software was developed | |
10 | * by the University of California, Berkeley. The name of the | |
11 | * University may not be used to endorse or promote products derived | |
12 | * from this software without specific prior written permission. | |
13 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
14 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
15 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
5b519e94 | 16 | * |
616d42db | 17 | * @(#)uipc_proto.c 7.3 (Berkeley) %G% |
da7c5cc6 | 18 | */ |
07d8f161 | 19 | |
94368568 JB |
20 | #include "param.h" |
21 | #include "socket.h" | |
22 | #include "protosw.h" | |
23 | #include "domain.h" | |
24 | #include "mbuf.h" | |
07d8f161 | 25 | |
d0e67d5f | 26 | /* |
a5eafe8a | 27 | * Definitions of protocols supported in the UNIX domain. |
d0e67d5f BJ |
28 | */ |
29 | ||
a5eafe8a | 30 | int uipc_usrreq(); |
0649e349 | 31 | int raw_init(),raw_usrreq(),raw_input(),raw_ctlinput(); |
261a8548 | 32 | extern struct domain unixdomain; /* or at least forward */ |
8f4851aa | 33 | |
a5eafe8a | 34 | struct protosw unixsw[] = { |
430b56ec | 35 | { SOCK_STREAM, &unixdomain, 0, PR_CONNREQUIRED|PR_WANTRCVD|PR_RIGHTS, |
07d8f161 | 36 | 0, 0, 0, 0, |
a5eafe8a | 37 | uipc_usrreq, |
07d8f161 | 38 | 0, 0, 0, 0, |
cc15ab5d | 39 | }, |
261a8548 | 40 | { SOCK_DGRAM, &unixdomain, 0, PR_ATOMIC|PR_ADDR|PR_RIGHTS, |
07d8f161 | 41 | 0, 0, 0, 0, |
a5eafe8a | 42 | uipc_usrreq, |
cc15ab5d BJ |
43 | 0, 0, 0, 0, |
44 | }, | |
8f4851aa | 45 | { 0, 0, 0, 0, |
0649e349 | 46 | raw_input, 0, raw_ctlinput, 0, |
8f4851aa BJ |
47 | raw_usrreq, |
48 | raw_init, 0, 0, 0, | |
8f4851aa | 49 | } |
d0e67d5f | 50 | }; |
cc15ab5d | 51 | |
261a8548 MK |
52 | int unp_externalize(), unp_dispose(); |
53 | ||
a5eafe8a | 54 | struct domain unixdomain = |
261a8548 MK |
55 | { AF_UNIX, "unix", 0, unp_externalize, unp_dispose, |
56 | unixsw, &unixsw[sizeof(unixsw)/sizeof(unixsw[0])] }; |