network - Major netmsg retooling, part 1
[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.12 2008/11/01 04:22:15 sephe 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     {
42         .pr_type = SOCK_DGRAM,          /* ioctl()-only */
43         .pr_domain = &atmdomain,
44         .pr_protocol = 0,
45         .pr_flags = 0,
46
47         .pr_usrreqs = &atm_dgram_usrreqs
48     },
49
50     {
51         .pr_type = SOCK_SEQPACKET,      /* AAL-5 */
52         .pr_domain = &atmdomain,
53         .pr_protocol = ATM_PROTO_AAL5,
54         .pr_flags = PR_ATOMIC|PR_CONNREQUIRED,
55
56         .pr_input = NULL,
57         .pr_output = NULL,
58         .pr_ctlinput = NULL,
59         .pr_ctloutput = atm_aal5_ctloutput,
60
61         .pr_usrreqs = &atm_aal5_usrreqs,
62     },
63
64 #ifdef XXX
65     {
66         .pr_type = SOCK_SEQPACKET,      /* SSCOP */
67         .pr_domain = &atmdomain,
68         .pr_protocol = ATM_PROTO_SSCOP,
69         .pr_flags = PR_ATOMIC|PR_CONNREQUIRED|PR_WANTRCVD,
70
71         x,                      /* pr_input */
72         x,                      /* pr_output */
73         x,                      /* pr_ctlinput */
74         x,                      /* pr_ctloutput */
75         NULL,                   /* pr_mport */
76         NULL,                   /* pr_ctlport */
77         0,                      /* pr_init */
78         0,                      /* pr_fasttimo */
79         0,                      /* pr_slowtimo */
80         x,                      /* pr_drain */
81         x,                      /* pr_usrreqs */
82     },
83 #endif
84 };
85
86 struct domain atmdomain = {
87         AF_ATM, "atm", atm_initialize, NULL, NULL,
88         atmsw, &atmsw[sizeof(atmsw) / sizeof(atmsw[0])],
89 };
90
91 DOMAIN_SET(atm);