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: releng/5.0/sys/netatm/atm_proto.c 95170 2002-04-21 01:41:05Z arr $
27 *
28 */
29
30 /*
31 * Core ATM Services
32 * -----------------
33 *
34 * ATM socket protocol family support definitions
35 *
36 */
37
38 #include <sys/param.h>
39 #include <sys/kernel.h>
40 #include <sys/domain.h>
41 #include <sys/protosw.h>
42 #include <sys/socket.h>
43 #include <net/if.h>
44 #include <netatm/port.h>
45 #include <netatm/queue.h>
46 #include <netatm/atm.h>
47 #include <netatm/atm_sys.h>
48 #include <netatm/atm_sap.h>
49 #include <netatm/atm_cm.h>
50 #include <netatm/atm_if.h>
51 #include <netatm/atm_stack.h>
52 #include <netatm/atm_pcb.h>
53 #include <netatm/atm_var.h>
54
55 #ifndef lint
56 __RCSID("@(#) $FreeBSD: releng/5.0/sys/netatm/atm_proto.c 95170 2002-04-21 01:41:05Z arr $");
57 #endif
58
59
60 struct protosw atmsw[] = {
61 { SOCK_DGRAM, /* ioctl()-only */
62 &atmdomain,
63 0,
64 0,
65 0, /* pr_input */
66 0, /* pr_output */
67 0, /* pr_ctlinput */
68 0, /* pr_ctloutput */
69 0, /* pr_ousrreq */
70 0, /* pr_init */
71 0, /* pr_fasttimo */
72 0, /* pr_slowtimo */
73 0, /* pr_drain */
74 &atm_dgram_usrreqs, /* pr_usrreqs */
75 },
76
77 { SOCK_SEQPACKET, /* AAL-5 */
78 &atmdomain,
79 ATM_PROTO_AAL5,
80 PR_ATOMIC|PR_CONNREQUIRED,
81 0, /* pr_input */
82 0, /* pr_output */
83 0, /* pr_ctlinput */
84 atm_aal5_ctloutput, /* pr_ctloutput */
85 0, /* pr_ousrreq */
86 0, /* pr_init */
87 0, /* pr_fasttimo */
88 0, /* pr_slowtimo */
89 0, /* pr_drain */
90 &atm_aal5_usrreqs, /* pr_usrreqs */
91 },
92
93 #ifdef XXX
94 { SOCK_SEQPACKET, /* SSCOP */
95 &atmdomain,
96 ATM_PROTO_SSCOP,
97 PR_ATOMIC|PR_CONNREQUIRED|PR_WANTRCVD,
98 x, /* pr_input */
99 x, /* pr_output */
100 x, /* pr_ctlinput */
101 x, /* pr_ctloutput */
102 0, /* pr_ousrreq */
103 0, /* pr_init */
104 0, /* pr_fasttimo */
105 0, /* pr_slowtimo */
106 x, /* pr_drain */
107 x, /* pr_usrreqs */
108 },
109 #endif
110 };
111
112 struct domain atmdomain = {
113 AF_ATM,
114 "atm",
115 atm_initialize,
116 0,
117 0,
118 atmsw,
119 &atmsw[sizeof(atmsw) / sizeof(atmsw[0])]
120 };
121
122 DOMAIN_SET(atm);
123
124
125 /*
126 * Protocol request not supported
127 *
128 * Arguments:
129 * so pointer to socket
130 *
131 * Returns:
132 * errno error - operation not supported
133 *
134 */
135 int
136 atm_proto_notsupp1(so)
137 struct socket *so;
138 {
139 return (EOPNOTSUPP);
140 }
141
142
143 /*
144 * Protocol request not supported
145 *
146 * Arguments:
147 * so pointer to socket
148 * addr pointer to protocol address
149 * p pointer to process
150 *
151 * Returns:
152 * errno error - operation not supported
153 *
154 */
155 int
156 atm_proto_notsupp2(so, addr, td)
157 struct socket *so;
158 struct sockaddr *addr;
159 struct thread *td;
160 {
161 return (EOPNOTSUPP);
162 }
163
164
165 /*
166 * Protocol request not supported
167 *
168 * Arguments:
169 * so pointer to socket
170 * addr pointer to pointer to protocol address
171 *
172 * Returns:
173 * errno error - operation not supported
174 *
175 */
176 int
177 atm_proto_notsupp3(so, addr)
178 struct socket *so;
179 struct sockaddr **addr;
180 {
181 return (EOPNOTSUPP);
182 }
183
184
185 /*
186 * Protocol request not supported
187 *
188 * Arguments:
189 * so pointer to socket
190 * i integer
191 * m pointer to kernel buffer
192 * addr pointer to protocol address
193 * m2 pointer to kernel buffer
194 * p pointer to process
195 *
196 * Returns:
197 * errno error - operation not supported
198 *
199 */
200 int
201 atm_proto_notsupp4(so, i, m, addr, m2, td)
202 struct socket *so;
203 int i;
204 KBuffer *m;
205 struct sockaddr *addr;
206 KBuffer *m2;
207 struct thread *td;
208 {
209 return (EOPNOTSUPP);
210 }
Cache object: d81bf49a14c181e6721f77ec2662320d
|