|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1984, 1985, 1986, 1987 Regents of the University of California. ! 3: * All rights reserved. ! 4: * ! 5: * Redistribution is only permitted until one year after the first shipment ! 6: * of 4.4BSD by the Regents. Otherwise, redistribution and use in source and ! 7: * binary forms are permitted provided that: (1) source distributions retain ! 8: * this entire copyright notice and comment, and (2) distributions including ! 9: * binaries display the following acknowledgement: This product includes ! 10: * software developed by the University of California, Berkeley and its ! 11: * contributors'' in the documentation or other materials provided with the ! 12: * distribution and in all advertising materials mentioning features or use ! 13: * of this software. Neither the name of the University nor the names of ! 14: * its contributors may be used to endorse or promote products derived from ! 15: * this software without specific prior written permission. ! 16: * THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED ! 17: * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF ! 18: * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 19: * ! 20: * @(#)ns_proto.c 7.4 (Berkeley) 6/28/90 ! 21: */ ! 22: ! 23: #include "param.h" ! 24: #include "socket.h" ! 25: #include "protosw.h" ! 26: #include "domain.h" ! 27: #include "mbuf.h" ! 28: ! 29: #include "ns.h" ! 30: ! 31: /* ! 32: * NS protocol family: IDP, ERR, PE, SPP, ROUTE. ! 33: */ ! 34: int ns_init(); ! 35: int idp_input(), idp_output(), idp_ctlinput(), idp_usrreq(); ! 36: int idp_raw_usrreq(), idp_ctloutput(); ! 37: int spp_input(), spp_ctlinput(); ! 38: int spp_usrreq(), spp_usrreq_sp(), spp_ctloutput(); ! 39: int spp_init(), spp_fasttimo(), spp_slowtimo(); ! 40: extern int raw_usrreq(); ! 41: ! 42: extern struct domain nsdomain; ! 43: ! 44: struct protosw nssw[] = { ! 45: { 0, &nsdomain, 0, 0, ! 46: 0, idp_output, 0, 0, ! 47: 0, ! 48: ns_init, 0, 0, 0, ! 49: }, ! 50: { SOCK_DGRAM, &nsdomain, 0, PR_ATOMIC|PR_ADDR, ! 51: 0, 0, idp_ctlinput, idp_ctloutput, ! 52: idp_usrreq, ! 53: 0, 0, 0, 0, ! 54: }, ! 55: { SOCK_STREAM, &nsdomain, NSPROTO_SPP, PR_CONNREQUIRED|PR_WANTRCVD, ! 56: spp_input, 0, spp_ctlinput, spp_ctloutput, ! 57: spp_usrreq, ! 58: spp_init, spp_fasttimo, spp_slowtimo, 0, ! 59: }, ! 60: { SOCK_SEQPACKET,&nsdomain, NSPROTO_SPP, PR_CONNREQUIRED|PR_WANTRCVD|PR_ATOMIC, ! 61: spp_input, 0, spp_ctlinput, spp_ctloutput, ! 62: spp_usrreq_sp, ! 63: 0, 0, 0, 0, ! 64: }, ! 65: { SOCK_RAW, &nsdomain, NSPROTO_RAW, PR_ATOMIC|PR_ADDR, ! 66: idp_input, idp_output, 0, idp_ctloutput, ! 67: idp_raw_usrreq, ! 68: 0, 0, 0, 0, ! 69: }, ! 70: { SOCK_RAW, &nsdomain, NSPROTO_ERROR, PR_ATOMIC|PR_ADDR, ! 71: idp_ctlinput, idp_output, 0, idp_ctloutput, ! 72: idp_raw_usrreq, ! 73: 0, 0, 0, 0, ! 74: }, ! 75: }; ! 76: ! 77: struct domain nsdomain = ! 78: { AF_NS, "network systems", 0, 0, 0, ! 79: nssw, &nssw[sizeof(nssw)/sizeof(nssw[0])] }; ! 80:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.