1 /*
2 *
3 * ===================================
4 * HARP | Host ATM Research Platform
5 * ===================================
6 *
7 *
8 * This Host ATM Research Platform ("HARP") file (the "Software") is
9 * made available by Network Computing Services, Inc. ("NetworkCS")
10 * "AS IS". NetworkCS does not provide maintenance, improvements or
11 * support of any kind.
12 *
13 * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
14 * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
15 * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
16 * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
17 * In no event shall NetworkCS be responsible for any damages, including
18 * but not limited to consequential damages, arising from or relating to
19 * any use of the Software or related support.
20 *
21 * Copyright 1994-1998 Network Computing Services, Inc.
22 *
23 * Copies of this Software may be made, however, the above copyright
24 * notice must be reproduced on all copies.
25 *
26 * @(#) $FreeBSD$
27 *
28 */
29
30 /*
31 * Core ATM Services
32 * -----------------
33 *
34 * ATM socket protocol family support definitions
35 *
36 */
37
38 #include <netatm/kern_include.h>
39 #include <sys/sysctl.h>
40
41 #ifndef lint
42 __RCSID("@(#) $FreeBSD$");
43 #endif
44
45
46 struct protosw atmsw[] = {
47 { SOCK_DGRAM, /* ioctl()-only */
48 &atmdomain,
49 0,
50 0,
51 0, /* pr_input */
52 0, /* pr_output */
53 0, /* pr_ctlinput */
54 0, /* pr_ctloutput */
55 0, /* pr_ousrreq */
56 0, /* pr_init */
57 0, /* pr_fasttimo */
58 0, /* pr_slowtimo */
59 0, /* pr_drain */
60 &atm_dgram_usrreqs, /* pr_usrreqs */
61 },
62
63 { SOCK_SEQPACKET, /* AAL-5 */
64 &atmdomain,
65 ATM_PROTO_AAL5,
66 PR_ATOMIC|PR_CONNREQUIRED,
67 0, /* pr_input */
68 0, /* pr_output */
69 0, /* pr_ctlinput */
70 atm_aal5_ctloutput, /* pr_ctloutput */
71 0, /* pr_ousrreq */
72 0, /* pr_init */
73 0, /* pr_fasttimo */
74 0, /* pr_slowtimo */
75 0, /* pr_drain */
76 &atm_aal5_usrreqs, /* pr_usrreqs */
77 },
78
79 #ifdef XXX
80 { SOCK_SEQPACKET, /* SSCOP */
81 &atmdomain,
82 ATM_PROTO_SSCOP,
83 PR_ATOMIC|PR_CONNREQUIRED|PR_WANTRCVD,
84 x, /* pr_input */
85 x, /* pr_output */
86 x, /* pr_ctlinput */
87 x, /* pr_ctloutput */
88 0, /* pr_ousrreq */
89 0, /* pr_init */
90 0, /* pr_fasttimo */
91 0, /* pr_slowtimo */
92 x, /* pr_drain */
93 x, /* pr_usrreqs */
94 },
95 #endif
96 };
97
98 struct domain atmdomain = {
99 AF_ATM,
100 "atm",
101 #if defined(__FreeBSD__)
102 atm_initialize,
103 #else
104 0,
105 #endif
106 0,
107 0,
108 atmsw,
109 &atmsw[sizeof(atmsw) / sizeof(atmsw[0])]
110 };
111
112 #ifdef __FreeBSD__
113 DOMAIN_SET(atm);
114 #endif
115
116 SYSCTL_NODE(_net, PF_ATM, harp, CTLFLAG_RW, 0, "HARP/ATM family");
117 SYSCTL_NODE(_net_harp, OID_AUTO, atm, CTLFLAG_RW, 0, "ATM layer");
118
119 #if (defined(__FreeBSD__) && (BSD >= 199506))
120 /*
121 * Protocol request not supported
122 *
123 * Arguments:
124 * so pointer to socket
125 *
126 * Returns:
127 * errno error - operation not supported
128 *
129 */
130 int
131 atm_proto_notsupp1(so)
132 struct socket *so;
133 {
134 return (EOPNOTSUPP);
135 }
136
137
138 /*
139 * Protocol request not supported
140 *
141 * Arguments:
142 * so pointer to socket
143 * addr pointer to protocol address
144 * p pointer to process
145 *
146 * Returns:
147 * errno error - operation not supported
148 *
149 */
150 int
151 atm_proto_notsupp2(so, addr, p)
152 struct socket *so;
153 struct sockaddr *addr;
154 struct proc *p;
155 {
156 return (EOPNOTSUPP);
157 }
158
159
160 /*
161 * Protocol request not supported
162 *
163 * Arguments:
164 * so pointer to socket
165 * addr pointer to pointer to protocol address
166 *
167 * Returns:
168 * errno error - operation not supported
169 *
170 */
171 int
172 atm_proto_notsupp3(so, addr)
173 struct socket *so;
174 struct sockaddr **addr;
175 {
176 return (EOPNOTSUPP);
177 }
178
179
180 /*
181 * Protocol request not supported
182 *
183 * Arguments:
184 * so pointer to socket
185 * i integer
186 * m pointer to kernel buffer
187 * addr pointer to protocol address
188 * m2 pointer to kernel buffer
189 * p pointer to process
190 *
191 * Returns:
192 * errno error - operation not supported
193 *
194 */
195 int
196 atm_proto_notsupp4(so, i, m, addr, m2, p)
197 struct socket *so;
198 int i;
199 KBuffer *m;
200 struct sockaddr *addr;
201 KBuffer *m2;
202 struct proc *p;
203 {
204 return (EOPNOTSUPP);
205 }
206
207 #endif /* (defined(__FreeBSD__) && (BSD >= 199506)) */
208
Cache object: 7adf8e8767041a07c3fabf5724cfeb0b
|