ada3fd731f5bdc2957ade8fb02abc601bb84bc2a
[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.9 2005/02/01 00:51:50 joerg Exp $
28  */
29
30 /*
31  * Core ATM Services
32  * -----------------
33  *
34  * ATM socket protocol family support definitions
35  *
36  */
37
38 #include "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         cpu0_soport,            /* pr_soport */
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         cpu0_soport,            /* pr_mport */
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_mport */
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         atm_initialize,
96         0,
97         0, 
98         atmsw,
99         &atmsw[sizeof(atmsw) / sizeof(atmsw[0])]
100 };
101
102 DOMAIN_SET(atm);
103
104 /*
105  * Protocol request not supported
106  *
107  * Arguments:
108  *      so      pointer to socket
109  *
110  * Returns:
111  *      errno   error - operation not supported
112  *
113  */
114 int
115 atm_proto_notsupp1(struct socket *so)
116 {
117         return (EOPNOTSUPP);
118 }
119
120
121 /*
122  * Protocol request not supported
123  *
124  * Arguments:
125  *      so      pointer to socket
126  *      addr    pointer to protocol address
127  *      p       pointer to process
128  *
129  * Returns:
130  *      errno   error - operation not supported
131  *
132  */
133 int
134 atm_proto_notsupp2(struct socket *so, struct sockaddr *addr, thread_t td)
135 {
136         return (EOPNOTSUPP);
137 }
138
139
140 /*
141  * Protocol request not supported
142  *
143  * Arguments:
144  *      so      pointer to socket
145  *      addr    pointer to pointer to protocol address
146  *
147  * Returns:
148  *      errno   error - operation not supported
149  *
150  */
151 int
152 atm_proto_notsupp3(so, addr)
153         struct socket   *so;
154         struct sockaddr **addr;
155 {
156         return (EOPNOTSUPP);
157 }
158
159
160 /*
161  * Protocol request not supported
162  *
163  * Arguments:
164  *      so      pointer to socket
165  *      i       integer
166  *      m       pointer to kernel buffer
167  *      addr    pointer to protocol address
168  *      m2      pointer to kernel buffer
169  *      p       pointer to process
170  *
171  * Returns:
172  *      errno   error - operation not supported
173  *
174  */
175 int
176 atm_proto_notsupp4(
177         struct socket   *so,
178         int             i,
179         KBuffer         *m,
180         struct sockaddr *addr,
181         KBuffer         *m2,
182         struct thread   *td
183 ) {
184         return (EOPNOTSUPP);
185 }