123419Smckusick /* 223419Smckusick * Copyright (c) 1982 Regents of the University of California. 323419Smckusick * All rights reserved. The Berkeley software License Agreement 423419Smckusick * specifies the terms and conditions for redistribution. 523419Smckusick * 6*25631Skarels * @(#)uipc_proto.c 6.5 (Berkeley) 12/19/85 723419Smckusick */ 84825Swnj 917102Sbloom #include "param.h" 1017102Sbloom #include "socket.h" 1117102Sbloom #include "protosw.h" 1217102Sbloom #include "domain.h" 1317102Sbloom #include "mbuf.h" 144825Swnj 154787Swnj /* 169009Sroot * Definitions of protocols supported in the UNIX domain. 174787Swnj */ 184787Swnj 199009Sroot int uipc_usrreq(); 206585Ssam int raw_init(),raw_usrreq(),raw_input(),raw_ctlinput(); 2116993Skarels extern struct domain unixdomain; /* or at least forward */ 225621Swnj 239009Sroot struct protosw unixsw[] = { 24*25631Skarels { SOCK_STREAM, &unixdomain, 0, PR_CONNREQUIRED|PR_WANTRCVD|PR_RIGHTS, 254825Swnj 0, 0, 0, 0, 269009Sroot uipc_usrreq, 274825Swnj 0, 0, 0, 0, 284890Swnj }, 2916993Skarels { SOCK_DGRAM, &unixdomain, 0, PR_ATOMIC|PR_ADDR|PR_RIGHTS, 304825Swnj 0, 0, 0, 0, 319009Sroot uipc_usrreq, 324825Swnj 0, 0, 0, 0, 334890Swnj }, 344787Swnj { 0, 0, 0, 0, 356585Ssam raw_input, 0, raw_ctlinput, 0, 365621Swnj raw_usrreq, 375621Swnj raw_init, 0, 0, 0, 384890Swnj } 394787Swnj }; 404787Swnj 4116993Skarels int unp_externalize(), unp_dispose(); 4216993Skarels 439009Sroot struct domain unixdomain = 4416993Skarels { AF_UNIX, "unix", 0, unp_externalize, unp_dispose, 4516993Skarels unixsw, &unixsw[sizeof(unixsw)/sizeof(unixsw[0])] }; 46