Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / sys / netproto / atm / atm_proto.c
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: src/sys/netatm/atm_proto.c,v 1.3 1999/08/28 00:48:36 peter Exp $
27  *      @(#) $DragonFly: src/sys/netproto/atm/atm_proto.c,v 1.2 2003/06/17 04:28:49 dillon Exp $
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
40 struct protosw atmsw[] = {
41 {       SOCK_DGRAM,                             /* ioctl()-only */
42         &atmdomain,
43         0,
44         0,
45         0,                      /* pr_input */
46         0,                      /* pr_output */
47         0,                      /* pr_ctlinput */
48         0,                      /* pr_ctloutput */
49         0,                      /* pr_ousrreq */
50         0,                      /* pr_init */
51         0,                      /* pr_fasttimo */
52         0,                      /* pr_slowtimo */
53         0,                      /* pr_drain */
54         &atm_dgram_usrreqs,     /* pr_usrreqs */
55 },
56
57 {       SOCK_SEQPACKET,                         /* AAL-5 */
58         &atmdomain,
59         ATM_PROTO_AAL5,
60         PR_ATOMIC|PR_CONNREQUIRED,
61         0,                      /* pr_input */
62         0,                      /* pr_output */
63         0,                      /* pr_ctlinput */
64         atm_aal5_ctloutput,     /* pr_ctloutput */
65         0,                      /* pr_ousrreq */
66         0,                      /* pr_init */
67         0,                      /* pr_fasttimo */
68         0,                      /* pr_slowtimo */
69         0,                      /* pr_drain */
70         &atm_aal5_usrreqs,      /* pr_usrreqs */
71 },
72
73 #ifdef XXX
74 {       SOCK_SEQPACKET,                         /* SSCOP */
75         &atmdomain,
76         ATM_PROTO_SSCOP,
77         PR_ATOMIC|PR_CONNREQUIRED|PR_WANTRCVD,
78         x,                      /* pr_input */
79         x,                      /* pr_output */
80         x,                      /* pr_ctlinput */
81         x,                      /* pr_ctloutput */
82         0,                      /* pr_ousrreq */
83         0,                      /* pr_init */
84         0,                      /* pr_fasttimo */
85         0,                      /* pr_slowtimo */
86         x,                      /* pr_drain */
87         x,                      /* pr_usrreqs */
88 },
89 #endif
90 };
91
92 struct domain atmdomain = {
93         AF_ATM,
94         "atm",
95 #if defined(__FreeBSD__)
96         atm_initialize,
97 #else
98         0,
99 #endif
100         0,
101         0, 
102         atmsw,
103         &atmsw[sizeof(atmsw) / sizeof(atmsw[0])]
104 };
105
106 #ifdef __FreeBSD__
107 DOMAIN_SET(atm);
108 #endif
109
110
111 #if (defined(__FreeBSD__) && (BSD >= 199506))
112 /*
113  * Protocol request not supported
114  *
115  * Arguments:
116  *      so      pointer to socket
117  *
118  * Returns:
119  *      errno   error - operation not supported
120  *
121  */
122 int
123 atm_proto_notsupp1(so)
124         struct socket   *so;
125 {
126         return (EOPNOTSUPP);
127 }
128
129
130 /*
131  * Protocol request not supported
132  *
133  * Arguments:
134  *      so      pointer to socket
135  *      addr    pointer to protocol address
136  *      p       pointer to process
137  *
138  * Returns:
139  *      errno   error - operation not supported
140  *
141  */
142 int
143 atm_proto_notsupp2(so, addr, p)
144         struct socket   *so;
145         struct sockaddr *addr;
146         struct proc     *p;
147 {
148         return (EOPNOTSUPP);
149 }
150
151
152 /*
153  * Protocol request not supported
154  *
155  * Arguments:
156  *      so      pointer to socket
157  *      addr    pointer to pointer to protocol address
158  *
159  * Returns:
160  *      errno   error - operation not supported
161  *
162  */
163 int
164 atm_proto_notsupp3(so, addr)
165         struct socket   *so;
166         struct sockaddr **addr;
167 {
168         return (EOPNOTSUPP);
169 }
170
171
172 /*
173  * Protocol request not supported
174  *
175  * Arguments:
176  *      so      pointer to socket
177  *      i       integer
178  *      m       pointer to kernel buffer
179  *      addr    pointer to protocol address
180  *      m2      pointer to kernel buffer
181  *      p       pointer to process
182  *
183  * Returns:
184  *      errno   error - operation not supported
185  *
186  */
187 int
188 atm_proto_notsupp4(so, i, m, addr, m2, p)
189         struct socket   *so;
190         int             i;
191         KBuffer         *m;
192         struct sockaddr *addr;
193         KBuffer         *m2;
194         struct proc     *p;
195 {
196         return (EOPNOTSUPP);
197 }
198
199 #endif  /* (defined(__FreeBSD__) && (BSD >= 199506)) */
200