network - Move socket from netmsg ext to netmsg header, add port to socket
[dragonfly.git] / sys / netproto / atm / atm_proto.c
CommitLineData
984263bc
MD
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 $
716da958 27 * @(#) $DragonFly: src/sys/netproto/atm/atm_proto.c,v 1.12 2008/11/01 04:22:15 sephe Exp $
984263bc
MD
28 */
29
30/*
31 * Core ATM Services
32 * -----------------
33 *
34 * ATM socket protocol family support definitions
35 *
36 */
37
1f2de5d4 38#include "kern_include.h"
984263bc 39
984263bc
MD
40struct 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 */
716da958
SZ
49 cpu0_soport, /* pr_mport */
50 NULL, /* pr_ctlport */
984263bc
MD
51 0, /* pr_init */
52 0, /* pr_fasttimo */
53 0, /* pr_slowtimo */
54 0, /* pr_drain */
55 &atm_dgram_usrreqs, /* pr_usrreqs */
56},
57
58{ SOCK_SEQPACKET, /* AAL-5 */
59 &atmdomain,
60 ATM_PROTO_AAL5,
61 PR_ATOMIC|PR_CONNREQUIRED,
62 0, /* pr_input */
63 0, /* pr_output */
64 0, /* pr_ctlinput */
65 atm_aal5_ctloutput, /* pr_ctloutput */
4468b0b4 66 cpu0_soport, /* pr_mport */
716da958 67 NULL, /* pr_ctlport */
984263bc
MD
68 0, /* pr_init */
69 0, /* pr_fasttimo */
70 0, /* pr_slowtimo */
71 0, /* pr_drain */
72 &atm_aal5_usrreqs, /* pr_usrreqs */
73},
74
75#ifdef XXX
76{ SOCK_SEQPACKET, /* SSCOP */
77 &atmdomain,
78 ATM_PROTO_SSCOP,
79 PR_ATOMIC|PR_CONNREQUIRED|PR_WANTRCVD,
80 x, /* pr_input */
81 x, /* pr_output */
82 x, /* pr_ctlinput */
83 x, /* pr_ctloutput */
48e7b118 84 NULL, /* pr_mport */
716da958 85 NULL, /* pr_ctlport */
984263bc
MD
86 0, /* pr_init */
87 0, /* pr_fasttimo */
88 0, /* pr_slowtimo */
89 x, /* pr_drain */
90 x, /* pr_usrreqs */
91},
92#endif
93};
94
95struct domain atmdomain = {
9c70fe43
JH
96 AF_ATM, "atm", atm_initialize, NULL, NULL,
97 atmsw, &atmsw[sizeof(atmsw) / sizeof(atmsw[0])],
984263bc
MD
98};
99
984263bc 100DOMAIN_SET(atm);
984263bc 101
984263bc
MD
102/*
103 * Protocol request not supported
104 *
105 * Arguments:
106 * so pointer to socket
107 *
108 * Returns:
109 * errno error - operation not supported
110 *
111 */
112int
f15db79e 113atm_proto_notsupp1(struct socket *so)
984263bc
MD
114{
115 return (EOPNOTSUPP);
116}
117
118
119/*
120 * Protocol request not supported
121 *
122 * Arguments:
123 * so pointer to socket
124 * addr pointer to protocol address
125 * p pointer to process
126 *
127 * Returns:
128 * errno error - operation not supported
129 *
130 */
131int
f15db79e 132atm_proto_notsupp2(struct socket *so, struct sockaddr *addr, thread_t td)
984263bc
MD
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 pointer to protocol address
144 *
145 * Returns:
146 * errno error - operation not supported
147 *
148 */
149int
9855a82b 150atm_proto_notsupp3(struct socket *so, struct sockaddr **addr)
984263bc
MD
151{
152 return (EOPNOTSUPP);
153}
154
155
156/*
157 * Protocol request not supported
158 *
159 * Arguments:
160 * so pointer to socket
161 * i integer
162 * m pointer to kernel buffer
163 * addr pointer to protocol address
164 * m2 pointer to kernel buffer
165 * p pointer to process
166 *
167 * Returns:
168 * errno error - operation not supported
169 *
170 */
171int
f15db79e
MD
172atm_proto_notsupp4(
173 struct socket *so,
174 int i,
175 KBuffer *m,
176 struct sockaddr *addr,
177 KBuffer *m2,
178 struct thread *td
179) {
984263bc
MD
180 return (EOPNOTSUPP);
181}