not doing *anything* while waiting for input; add substate
[unix-history] / usr / src / sys / kern / uipc_proto.c
CommitLineData
da7c5cc6 1/*
0880b18e 2 * Copyright (c) 1982, 1986 Regents of the University of California.
5b519e94 3 * All rights reserved.
da7c5cc6 4 *
5b519e94
KB
5 * Redistribution and use in source and binary forms are permitted
6 * provided that this notice is preserved and that due credit is given
7 * to the University of California at Berkeley. The name of the University
8 * may not be used to endorse or promote products derived from this
9 * software without specific prior written permission. This software
10 * is provided ``as is'' without express or implied warranty.
11 *
12 * @(#)uipc_proto.c 7.2 (Berkeley) %G%
da7c5cc6 13 */
07d8f161 14
94368568
JB
15#include "param.h"
16#include "socket.h"
17#include "protosw.h"
18#include "domain.h"
19#include "mbuf.h"
07d8f161 20
d0e67d5f 21/*
a5eafe8a 22 * Definitions of protocols supported in the UNIX domain.
d0e67d5f
BJ
23 */
24
a5eafe8a 25int uipc_usrreq();
0649e349 26int raw_init(),raw_usrreq(),raw_input(),raw_ctlinput();
261a8548 27extern struct domain unixdomain; /* or at least forward */
8f4851aa 28
a5eafe8a 29struct protosw unixsw[] = {
430b56ec 30{ SOCK_STREAM, &unixdomain, 0, PR_CONNREQUIRED|PR_WANTRCVD|PR_RIGHTS,
07d8f161 31 0, 0, 0, 0,
a5eafe8a 32 uipc_usrreq,
07d8f161 33 0, 0, 0, 0,
cc15ab5d 34},
261a8548 35{ SOCK_DGRAM, &unixdomain, 0, PR_ATOMIC|PR_ADDR|PR_RIGHTS,
07d8f161 36 0, 0, 0, 0,
a5eafe8a 37 uipc_usrreq,
cc15ab5d
BJ
38 0, 0, 0, 0,
39},
8f4851aa 40{ 0, 0, 0, 0,
0649e349 41 raw_input, 0, raw_ctlinput, 0,
8f4851aa
BJ
42 raw_usrreq,
43 raw_init, 0, 0, 0,
8f4851aa 44}
d0e67d5f 45};
cc15ab5d 46
261a8548
MK
47int unp_externalize(), unp_dispose();
48
a5eafe8a 49struct domain unixdomain =
261a8548
MK
50 { AF_UNIX, "unix", 0, unp_externalize, unp_dispose,
51 unixsw, &unixsw[sizeof(unixsw)/sizeof(unixsw[0])] };