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