Merge branch 'master' of git://git.theshell.com/dragonfly
[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  */
28
29 /*
30  * Core ATM Services
31  * -----------------
32  *
33  * ATM socket protocol family support definitions
34  *
35  */
36
37 #include "kern_include.h"
38
39 struct protosw atmsw[] = {
40     {
41         .pr_type = SOCK_DGRAM,          /* ioctl()-only */
42         .pr_domain = &atmdomain,
43         .pr_protocol = 0,
44         .pr_flags = 0,
45
46         .pr_usrreqs = &atm_dgram_usrreqs
47     },
48
49     {
50         .pr_type = SOCK_SEQPACKET,      /* AAL-5 */
51         .pr_domain = &atmdomain,
52         .pr_protocol = ATM_PROTO_AAL5,
53         .pr_flags = PR_ATOMIC|PR_CONNREQUIRED,
54
55         .pr_input = NULL,
56         .pr_output = NULL,
57         .pr_ctlinput = NULL,
58         .pr_ctloutput = atm_aal5_ctloutput,
59
60         .pr_usrreqs = &atm_aal5_usrreqs,
61     },
62
63 #ifdef XXX
64     {
65         .pr_type = SOCK_SEQPACKET,      /* SSCOP */
66         .pr_domain = &atmdomain,
67         .pr_protocol = ATM_PROTO_SSCOP,
68         .pr_flags = PR_ATOMIC|PR_CONNREQUIRED|PR_WANTRCVD,
69
70         x,                      /* pr_input */
71         x,                      /* pr_output */
72         x,                      /* pr_ctlinput */
73         x,                      /* pr_ctloutput */
74         NULL,                   /* pr_mport */
75         NULL,                   /* pr_ctlport */
76         0,                      /* pr_init */
77         0,                      /* pr_fasttimo */
78         0,                      /* pr_slowtimo */
79         x,                      /* pr_drain */
80         x,                      /* pr_usrreqs */
81     },
82 #endif
83 };
84
85 struct domain atmdomain = {
86         AF_ATM, "atm", atm_initialize, NULL, NULL,
87         atmsw, &atmsw[NELEM(atmsw)],
88 };
89
90 DOMAIN_SET(atm);