Merge branch 'vendor/GDTOA'
[dragonfly.git] / sys / netproto / atm / atm_pcb.h
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_pcb.h,v 1.2 1999/08/28 00:48:36 peter Exp $
27  *      @(#) $DragonFly: src/sys/netproto/atm/atm_pcb.h,v 1.2 2003/06/17 04:28:49 dillon Exp $
28  *
29  */
30
31 /*
32  * Core ATM Services
33  * -----------------
34  *
35  * ATM socket protocol definitions
36  *
37  */
38
39 #ifndef _NETATM_ATM_PCB_H
40 #define _NETATM_ATM_PCB_H
41
42
43 #ifdef ATM_KERNEL
44 /*
45  * ATM Socket PCB
46  *
47  * Common structure for all ATM protocol sockets.  This control block
48  * will be used for all ATM socket types.
49  */
50 struct atm_pcb {
51         struct socket   *atp_socket;    /* Socket */
52         Atm_connection  *atp_conn;      /* Connection manager token */
53         u_char          atp_type;       /* Protocol type (see below) */
54         u_char          atp_flags;      /* Protocol flags (see below) */
55         Atm_attributes  atp_attr;       /* Socket's call attributes */
56         char            atp_name[T_ATM_APP_NAME_LEN];   /* Owner's name */
57 };
58 typedef struct atm_pcb  Atm_pcb;
59
60 /*
61  * Protocol Types
62  */
63 #define ATPT_AAL5       0               /* AAL type 5 protocol */
64 #define ATPT_SSCOP      1               /* SSCOP protocol */
65 #define ATPT_NUM        2               /* Number of protocols */
66
67 /*
68  * PCB Flags
69  */
70
71
72 /*
73  * Handy macros
74  */
75 #define sotoatmpcb(so)   ((Atm_pcb *)(so)->so_pcb)
76
77
78 /*
79  * ATM Socket Statistics
80  */
81 struct atm_sock_stat {
82         u_long  as_connreq[ATPT_NUM];   /* Connection requests */
83         u_long  as_inconn[ATPT_NUM];    /* Incoming connection requests */
84         u_long  as_conncomp[ATPT_NUM];  /* Connections completed */
85         u_long  as_connfail[ATPT_NUM];  /* Connections failed */
86         u_long  as_connrel[ATPT_NUM];   /* Connections released */
87         u_long  as_connclr[ATPT_NUM];   /* Connections cleared */
88         u_long  as_indrop[ATPT_NUM];    /* Input packets dropped */
89         u_long  as_outdrop[ATPT_NUM];   /* Output packets dropped */
90 };
91 #endif  /* ATM_KERNEL */
92
93 #endif  /* _NETATM_ATM_PCB_H */