|
|
1.1 root 1: /*
2: * Copyright (c) 1984, 1985, 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: * @(#)ns_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: #include "ns.h"
16:
17: /*
18: * NS protocol family: IDP, ERR, PE, SPP, ROUTE.
19: */
20: int ns_init();
21: int idp_input(), idp_output(), idp_ctlinput(), idp_usrreq();
22: int idp_raw_usrreq(), idp_ctloutput();
23: int spp_input(), spp_ctlinput();
24: int spp_usrreq(), spp_usrreq_sp(), spp_ctloutput();
25: int spp_init(), spp_fasttimo(), spp_slowtimo();
26: extern int raw_usrreq();
27:
28: extern struct domain nsdomain;
29:
30: struct protosw nssw[] = {
31: { 0, &nsdomain, 0, 0,
32: 0, idp_output, 0, 0,
33: 0,
34: ns_init, 0, 0, 0,
35: },
36: { SOCK_DGRAM, &nsdomain, 0, PR_ATOMIC|PR_ADDR,
37: 0, 0, idp_ctlinput, idp_ctloutput,
38: idp_usrreq,
39: 0, 0, 0, 0,
40: },
41: { SOCK_STREAM, &nsdomain, NSPROTO_SPP, PR_CONNREQUIRED|PR_WANTRCVD,
42: spp_input, 0, spp_ctlinput, spp_ctloutput,
43: spp_usrreq,
44: spp_init, spp_fasttimo, spp_slowtimo, 0,
45: },
46: { SOCK_SEQPACKET,&nsdomain, NSPROTO_SPP, PR_CONNREQUIRED|PR_WANTRCVD|PR_ATOMIC,
47: spp_input, 0, spp_ctlinput, spp_ctloutput,
48: spp_usrreq_sp,
49: 0, 0, 0, 0,
50: },
51: { SOCK_RAW, &nsdomain, NSPROTO_RAW, PR_ATOMIC|PR_ADDR,
52: idp_input, idp_output, 0, idp_ctloutput,
53: idp_raw_usrreq,
54: 0, 0, 0, 0,
55: },
56: { SOCK_RAW, &nsdomain, NSPROTO_ERROR, PR_ATOMIC|PR_ADDR,
57: idp_ctlinput, idp_output, 0, idp_ctloutput,
58: idp_raw_usrreq,
59: 0, 0, 0, 0,
60: },
61: };
62:
63: struct domain nsdomain =
64: { AF_NS, "network systems", 0, 0, 0,
65: nssw, &nssw[sizeof(nssw)/sizeof(nssw[0])] };
66:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.