Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


atmsap.h
001: /* atmsap.h - ATM Service Access Point addressing definitions */
002: 
003: /* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
004: 
005: 
006: #ifndef _LINUX_ATMSAP_H
007: #define _LINUX_ATMSAP_H
008: 
009: #include <linux/atmapi.h>
010: 
011: /*
012:  * BEGIN_xx and END_xx markers are used for automatic generation of
013:  * documentation. Do not change them.
014:  */
015: 
016: 
017: /*
018:  * Layer 2 protocol identifiers
019:  */
020: 
021: /* BEGIN_L2 */
022: #define ATM_L2_NONE     0       /* L2 not specified */
023: #define ATM_L2_ISO1745  0x01    /* Basic mode ISO 1745 */
024: #define ATM_L2_Q291     0x02    /* ITU-T Q.291 (Rec. I.441) */
025: #define ATM_L2_X25_LL   0x06    /* ITU-T X.25, link layer */
026: #define ATM_L2_X25_ML   0x07    /* ITU-T X.25, multilink */
027: #define ATM_L2_LAPB     0x08    /* Extended LAPB, half-duplex (Rec. T.71) */
028: #define ATM_L2_HDLC_ARM 0x09    /* HDLC ARM (ISO/IEC 4335) */
029: #define ATM_L2_HDLC_NRM 0x0a    /* HDLC NRM (ISO/IEC 4335) */
030: #define ATM_L2_HDLC_ABM 0x0b    /* HDLC ABM (ISO/IEC 4335) */
031: #define ATM_L2_ISO8802  0x0c    /* LAN LLC (ISO/IEC 8802/2) */
032: #define ATM_L2_X75      0x0d    /* ITU-T X.75, SLP */
033: #define ATM_L2_Q922     0x0e    /* ITU-T Q.922 */
034: #define ATM_L2_USER     0x10    /* user-specified */
035: #define ATM_L2_ISO7776  0x11    /* ISO 7776 DTE-DTE */
036: /* END_L2 */
037: 
038: 
039: /*
040:  * Layer 3 protocol identifiers
041:  */
042: 
043: /* BEGIN_L3 */
044: #define ATM_L3_NONE     0       /* L3 not specified */
045: #define ATM_L3_X25      0x06    /* ITU-T X.25, packet layer */
046: #define ATM_L3_ISO8208  0x07    /* ISO/IEC 8208 */
047: #define ATM_L3_X223     0x08    /* ITU-T X.223 | ISO/IEC 8878 */
048: #define ATM_L3_ISO8473  0x09    /* ITU-T X.233 | ISO/IEC 8473 */
049: #define ATM_L3_T70      0x0a    /* ITU-T T.70 minimum network layer */
050: #define ATM_L3_TR9577   0x0b    /* ISO/IEC TR 9577 */
051: #define ATM_L3_H310     0x0c    /* ITU-T Recommendation H.310 */
052: #define ATM_L3_H321     0x0d    /* ITU-T Recommendation H.321 */
053: #define ATM_L3_USER     0x10    /* user-specified */
054: /* END_L3 */
055: 
056: 
057: /*
058:  * High layer identifiers
059:  */
060: 
061: /* BEGIN_HL */
062: #define ATM_HL_NONE     0       /* HL not specified */
063: #define ATM_HL_ISO      0x01    /* ISO */
064: #define ATM_HL_USER     0x02    /* user-specific */
065: #define ATM_HL_HLP      0x03    /* high layer profile - UNI 3.0 only */
066: #define ATM_HL_VENDOR   0x04    /* vendor-specific application identifier */
067: /* END_HL */
068: 
069: 
070: /*
071:  * ITU-T coded mode of operation
072:  */
073: 
074: /* BEGIN_IMD */
075: #define ATM_IMD_NONE     0      /* mode not specified */
076: #define ATM_IMD_NORMAL   1      /* normal mode of operation */
077: #define ATM_IMD_EXTENDED 2      /* extended mode of operation */
078: /* END_IMD */
079: 
080: /*
081:  * H.310 code points
082:  */
083: 
084: #define ATM_TT_NONE     0       /* terminal type not specified */
085: #define ATM_TT_RX       1       /* receive only */
086: #define ATM_TT_TX       2       /* send only */
087: #define ATM_TT_RXTX     3       /* receive and send */
088: 
089: #define ATM_MC_NONE     0       /* no multiplexing */
090: #define ATM_MC_TS       1       /* transport stream (TS) */
091: #define ATM_MC_TS_FEC   2       /* transport stream with forward error corr. */
092: #define ATM_MC_PS       3       /* program stream (PS) */
093: #define ATM_MC_PS_FEC   4       /* program stream with forward error corr. */
094: #define ATM_MC_H221     5       /* ITU-T Rec. H.221 */
095: 
096: /*
097:  * SAP structures
098:  */
099: 
100: #define ATM_MAX_HLI     8       /* maximum high-layer information length */
101: 
102: 
103: struct atm_blli {
104:     unsigned char l2_proto;     /* layer 2 protocol */
105:     union {
106:         struct {
107:             unsigned char mode; /* mode of operation (ATM_IMD_xxx), 0 if */
108:                                 /* absent */
109:             unsigned char window; /* window size (k), 1-127 (0 to omit) */
110:         } itu;                  /* ITU-T encoding */
111:         unsigned char user;     /* user-specified l2 information */
112:     } l2;
113:     unsigned char l3_proto;     /* layer 3 protocol */
114:     union {
115:         struct {
116:             unsigned char mode; /* mode of operation (ATM_IMD_xxx), 0 if */
117:                                 /* absent */
118:             unsigned char def_size; /* default packet size (log2), 4-12 (0 to */
119:                                     /* omit) */
120:             unsigned char window;/* packet window size, 1-127 (0 to omit) */
121:         } itu;                  /* ITU-T encoding */
122:         unsigned char user;     /* user specified l3 information */
123:         struct {                      /* if l3_proto = ATM_L3_H310 */
124:             unsigned char term_type;  /* terminal type */
125:             unsigned char fw_mpx_cap; /* forward multiplexing capability */
126:                                       /* only if term_type != ATM_TT_NONE */
127:             unsigned char bw_mpx_cap; /* backward multiplexing capability */
128:                                       /* only if term_type != ATM_TT_NONE */
129:         } h310;
130:         struct {                  /* if l3_proto = ATM_L3_TR9577 */
131:             unsigned char ipi;    /* initial protocol id */
132:             unsigned char snap[5];/* IEEE 802.1 SNAP identifier */
133:                                   /* (only if ipi == NLPID_IEEE802_1_SNAP) */
134:         } tr9577;
135:     } l3;
136: } __ATM_API_ALIGN;
137: 
138: 
139: struct atm_bhli {
140:     unsigned char hl_type;      /* high layer information type */
141:     unsigned char hl_length;    /* length (only if hl_type == ATM_HL_USER || */
142:                                 /* hl_type == ATM_HL_ISO) */
143:     unsigned char hl_info[ATM_MAX_HLI];/* high layer information */
144: };
145: 
146: 
147: #define ATM_MAX_BLLI    3               /* maximum number of BLLI elements */
148: 
149: 
150: struct atm_sap {
151:         struct atm_bhli bhli;           /* local SAP, high-layer information */
152:         struct atm_blli blli[ATM_MAX_BLLI] __ATM_API_ALIGN;
153:                                         /* local SAP, low-layer info */
154: };
155: 
156: 
157: static __inline__ int blli_in_use(struct atm_blli blli)
158: {
159:         return blli.l2_proto || blli.l3_proto;
160: }
161: 
162: #endif
163: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/