1 /****************************************************************************
2 ****************************************************************************
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
10 ****************************************************************************
11 ****************************************************************************/
15 #include <linux/compiler.h>
16 #include <linux/atmapi.h>
17 #include <linux/atmsap.h>
18 #include <linux/atmioc.h>
20 #define ATM_CELL_SIZE 53
21 #define ATM_CELL_PAYLOAD 48
22 #define ATM_AAL0_SDU 52
23 #define ATM_MAX_AAL34_PDU 65535
24 #define ATM_AAL5_TRAILER 8
25 #define ATM_MAX_AAL5_PDU 65535
26 #define ATM_MAX_CDV 9999
27 #define ATM_NOT_RSV_VCI 32
29 #define ATM_MAX_VPI 255
30 #define ATM_MAX_VPI_NNI 4096
31 #define ATM_MAX_VCI 65535
40 #define __SO_ENCODE(l,n,t) ((((l) & 0x1FF) << 22) | ((n) << 16) | sizeof(t))
41 #define __SO_LEVEL_MATCH(c,m) (((c) >> 22) == ((m) & 0x1FF))
42 #define __SO_NUMBER(c) (((c) >> 16) & 0x3f)
43 #define __SO_SIZE(c) ((c) & 0x3fff)
45 #define SO_SETCLP __SO_ENCODE(SOL_ATM,0,int)
47 #define SO_CIRANGE __SO_ENCODE(SOL_ATM,1,struct atm_cirange)
49 #define SO_ATMQOS __SO_ENCODE(SOL_ATM,2,struct atm_qos)
51 #define SO_ATMSAP __SO_ENCODE(SOL_ATM,3,struct atm_sap)
53 #define SO_ATMPVC __SO_ENCODE(SOL_ATM,4,struct sockaddr_atmpvc)
55 #define SO_MULTIPOINT __SO_ENCODE(SOL_ATM, 5, int)
57 #define ATM_HDR_GFC_MASK 0xf0000000
58 #define ATM_HDR_GFC_SHIFT 28
59 #define ATM_HDR_VPI_MASK 0x0ff00000
60 #define ATM_HDR_VPI_SHIFT 20
61 #define ATM_HDR_VCI_MASK 0x000ffff0
62 #define ATM_HDR_VCI_SHIFT 4
63 #define ATM_HDR_PTI_MASK 0x0000000e
64 #define ATM_HDR_PTI_SHIFT 1
65 #define ATM_HDR_CLP 0x00000001
69 #define ATM_PTI_UCES0 2
70 #define ATM_PTI_UCES1 3
71 #define ATM_PTI_SEGF5 4
72 #define ATM_PTI_E2EF5 5
73 #define ATM_PTI_RSV_RM 6
81 #define ATM_ANYCLASS 5
83 #define ATM_MAX_PCR -1
86 unsigned char traffic_class
;
95 unsigned int frtt
: 24;
98 unsigned int nrm_pres
:1;
99 unsigned int trm_pres
:1;
100 unsigned int adtf_pres
:1;
101 unsigned int cdf_pres
:1;
104 unsigned int adtf
:10;
106 unsigned int spare
:9;
110 struct atm_trafprm txtp
;
111 struct atm_trafprm rxtp __ATM_API_ALIGN
;
113 unsigned char aal __ATM_API_ALIGN
;
116 #define ATM_ITF_ANY -1
117 #define ATM_VPI_ANY -1
118 #define ATM_VCI_ANY -1
119 #define ATM_VPI_UNSPEC -2
120 #define ATM_VCI_UNSPEC -2
122 struct sockaddr_atmpvc
{
123 unsigned short sap_family
;
128 } sap_addr __ATM_API_ALIGN
;
131 #define ATM_ESA_LEN 20
132 #define ATM_E164_LEN 12
134 #define ATM_AFI_DCC 0x39
135 #define ATM_AFI_ICD 0x47
136 #define ATM_AFI_E164 0x45
137 #define ATM_AFI_LOCAL 0x49
139 #define ATM_AFI_DCC_GROUP 0xBD
140 #define ATM_AFI_ICD_GROUP 0xC5
141 #define ATM_AFI_E164_GROUP 0xC3
142 #define ATM_AFI_LOCAL_GROUP 0xC7
144 #define ATM_LIJ_NONE 0
146 #define ATM_LIJ_RPJ 2
149 struct sockaddr_atmsvc
{
150 unsigned short sas_family
;
152 unsigned char prv
[ATM_ESA_LEN
];
153 char pub
[ATM_E164_LEN
+1];
157 } sas_addr __ATM_API_ALIGN
;
160 typedef unsigned short atm_backend_t
;