HAMMER Utilities: MFC work to date.
[dragonfly.git] / sys / netproto / atm / atm_proto.c
blob6a84647311644c8d11d1f693fe2ebe40b9d4acdb
1 /*
3 * ===================================
4 * HARP | Host ATM Research Platform
5 * ===================================
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.
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.
21 * Copyright 1994-1998 Network Computing Services, Inc.
23 * Copies of this Software may be made, however, the above copyright
24 * notice must be reproduced on all copies.
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.11 2006/01/14 13:36:39 swildner Exp $
31 * Core ATM Services
32 * -----------------
34 * ATM socket protocol family support definitions
38 #include "kern_include.h"
40 struct protosw atmsw[] = {
41 { SOCK_DGRAM, /* ioctl()-only */
42 &atmdomain,
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 */
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 */
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 */
89 #endif
92 struct domain atmdomain = {
93 AF_ATM, "atm", atm_initialize, NULL, NULL,
94 atmsw, &atmsw[sizeof(atmsw) / sizeof(atmsw[0])],
97 DOMAIN_SET(atm);
100 * Protocol request not supported
102 * Arguments:
103 * so pointer to socket
105 * Returns:
106 * errno error - operation not supported
110 atm_proto_notsupp1(struct socket *so)
112 return (EOPNOTSUPP);
117 * Protocol request not supported
119 * Arguments:
120 * so pointer to socket
121 * addr pointer to protocol address
122 * p pointer to process
124 * Returns:
125 * errno error - operation not supported
129 atm_proto_notsupp2(struct socket *so, struct sockaddr *addr, thread_t td)
131 return (EOPNOTSUPP);
136 * Protocol request not supported
138 * Arguments:
139 * so pointer to socket
140 * addr pointer to pointer to protocol address
142 * Returns:
143 * errno error - operation not supported
147 atm_proto_notsupp3(struct socket *so, struct sockaddr **addr)
149 return (EOPNOTSUPP);
154 * Protocol request not supported
156 * Arguments:
157 * so pointer to socket
158 * i integer
159 * m pointer to kernel buffer
160 * addr pointer to protocol address
161 * m2 pointer to kernel buffer
162 * p pointer to process
164 * Returns:
165 * errno error - operation not supported
169 atm_proto_notsupp4(
170 struct socket *so,
171 int i,
172 KBuffer *m,
173 struct sockaddr *addr,
174 KBuffer *m2,
175 struct thread *td
177 return (EOPNOTSUPP);