1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux << 2 /* atmsap.h - ATM Service Access Point address 1 /* atmsap.h - ATM Service Access Point addressing definitions */ 3 2 4 /* Written 1995-1999 by Werner Almesberger, EP 3 /* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */ 5 4 6 5 7 #ifndef _LINUX_ATMSAP_H 6 #ifndef _LINUX_ATMSAP_H 8 #define _LINUX_ATMSAP_H 7 #define _LINUX_ATMSAP_H 9 8 10 #include <linux/atmapi.h> 9 #include <linux/atmapi.h> 11 10 12 /* 11 /* 13 * BEGIN_xx and END_xx markers are used for au 12 * BEGIN_xx and END_xx markers are used for automatic generation of 14 * documentation. Do not change them. 13 * documentation. Do not change them. 15 */ 14 */ 16 15 17 16 18 /* 17 /* 19 * Layer 2 protocol identifiers 18 * Layer 2 protocol identifiers 20 */ 19 */ 21 20 22 /* BEGIN_L2 */ 21 /* BEGIN_L2 */ 23 #define ATM_L2_NONE 0 /* L2 not spec 22 #define ATM_L2_NONE 0 /* L2 not specified */ 24 #define ATM_L2_ISO1745 0x01 /* Basic mode 23 #define ATM_L2_ISO1745 0x01 /* Basic mode ISO 1745 */ 25 #define ATM_L2_Q291 0x02 /* ITU-T Q.291 24 #define ATM_L2_Q291 0x02 /* ITU-T Q.291 (Rec. I.441) */ 26 #define ATM_L2_X25_LL 0x06 /* ITU-T X.25, 25 #define ATM_L2_X25_LL 0x06 /* ITU-T X.25, link layer */ 27 #define ATM_L2_X25_ML 0x07 /* ITU-T X.25, 26 #define ATM_L2_X25_ML 0x07 /* ITU-T X.25, multilink */ 28 #define ATM_L2_LAPB 0x08 /* Extended LA 27 #define ATM_L2_LAPB 0x08 /* Extended LAPB, half-duplex (Rec. T.71) */ 29 #define ATM_L2_HDLC_ARM 0x09 /* HDLC ARM (I 28 #define ATM_L2_HDLC_ARM 0x09 /* HDLC ARM (ISO/IEC 4335) */ 30 #define ATM_L2_HDLC_NRM 0x0a /* HDLC NRM (I 29 #define ATM_L2_HDLC_NRM 0x0a /* HDLC NRM (ISO/IEC 4335) */ 31 #define ATM_L2_HDLC_ABM 0x0b /* HDLC ABM (I 30 #define ATM_L2_HDLC_ABM 0x0b /* HDLC ABM (ISO/IEC 4335) */ 32 #define ATM_L2_ISO8802 0x0c /* LAN LLC (IS 31 #define ATM_L2_ISO8802 0x0c /* LAN LLC (ISO/IEC 8802/2) */ 33 #define ATM_L2_X75 0x0d /* ITU-T X.75, 32 #define ATM_L2_X75 0x0d /* ITU-T X.75, SLP */ 34 #define ATM_L2_Q922 0x0e /* ITU-T Q.922 33 #define ATM_L2_Q922 0x0e /* ITU-T Q.922 */ 35 #define ATM_L2_USER 0x10 /* user-specif 34 #define ATM_L2_USER 0x10 /* user-specified */ 36 #define ATM_L2_ISO7776 0x11 /* ISO 7776 DT 35 #define ATM_L2_ISO7776 0x11 /* ISO 7776 DTE-DTE */ 37 /* END_L2 */ 36 /* END_L2 */ 38 37 39 38 40 /* 39 /* 41 * Layer 3 protocol identifiers 40 * Layer 3 protocol identifiers 42 */ 41 */ 43 42 44 /* BEGIN_L3 */ 43 /* BEGIN_L3 */ 45 #define ATM_L3_NONE 0 /* L3 not spec 44 #define ATM_L3_NONE 0 /* L3 not specified */ 46 #define ATM_L3_X25 0x06 /* ITU-T X.25, 45 #define ATM_L3_X25 0x06 /* ITU-T X.25, packet layer */ 47 #define ATM_L3_ISO8208 0x07 /* ISO/IEC 820 46 #define ATM_L3_ISO8208 0x07 /* ISO/IEC 8208 */ 48 #define ATM_L3_X223 0x08 /* ITU-T X.223 47 #define ATM_L3_X223 0x08 /* ITU-T X.223 | ISO/IEC 8878 */ 49 #define ATM_L3_ISO8473 0x09 /* ITU-T X.233 48 #define ATM_L3_ISO8473 0x09 /* ITU-T X.233 | ISO/IEC 8473 */ 50 #define ATM_L3_T70 0x0a /* ITU-T T.70 49 #define ATM_L3_T70 0x0a /* ITU-T T.70 minimum network layer */ 51 #define ATM_L3_TR9577 0x0b /* ISO/IEC TR 50 #define ATM_L3_TR9577 0x0b /* ISO/IEC TR 9577 */ 52 #define ATM_L3_H310 0x0c /* ITU-T Recom 51 #define ATM_L3_H310 0x0c /* ITU-T Recommendation H.310 */ 53 #define ATM_L3_H321 0x0d /* ITU-T Recom 52 #define ATM_L3_H321 0x0d /* ITU-T Recommendation H.321 */ 54 #define ATM_L3_USER 0x10 /* user-specif 53 #define ATM_L3_USER 0x10 /* user-specified */ 55 /* END_L3 */ 54 /* END_L3 */ 56 55 57 56 58 /* 57 /* 59 * High layer identifiers 58 * High layer identifiers 60 */ 59 */ 61 60 62 /* BEGIN_HL */ 61 /* BEGIN_HL */ 63 #define ATM_HL_NONE 0 /* HL not spec 62 #define ATM_HL_NONE 0 /* HL not specified */ 64 #define ATM_HL_ISO 0x01 /* ISO */ 63 #define ATM_HL_ISO 0x01 /* ISO */ 65 #define ATM_HL_USER 0x02 /* user-specif 64 #define ATM_HL_USER 0x02 /* user-specific */ 66 #define ATM_HL_HLP 0x03 /* high layer 65 #define ATM_HL_HLP 0x03 /* high layer profile - UNI 3.0 only */ 67 #define ATM_HL_VENDOR 0x04 /* vendor-spec 66 #define ATM_HL_VENDOR 0x04 /* vendor-specific application identifier */ 68 /* END_HL */ 67 /* END_HL */ 69 68 70 69 71 /* 70 /* 72 * ITU-T coded mode of operation 71 * ITU-T coded mode of operation 73 */ 72 */ 74 73 75 /* BEGIN_IMD */ 74 /* BEGIN_IMD */ 76 #define ATM_IMD_NONE 0 /* mode not sp 75 #define ATM_IMD_NONE 0 /* mode not specified */ 77 #define ATM_IMD_NORMAL 1 /* normal mode 76 #define ATM_IMD_NORMAL 1 /* normal mode of operation */ 78 #define ATM_IMD_EXTENDED 2 /* extended mo 77 #define ATM_IMD_EXTENDED 2 /* extended mode of operation */ 79 /* END_IMD */ 78 /* END_IMD */ 80 79 81 /* 80 /* 82 * H.310 code points 81 * H.310 code points 83 */ 82 */ 84 83 85 #define ATM_TT_NONE 0 /* terminal ty 84 #define ATM_TT_NONE 0 /* terminal type not specified */ 86 #define ATM_TT_RX 1 /* receive onl 85 #define ATM_TT_RX 1 /* receive only */ 87 #define ATM_TT_TX 2 /* send only * 86 #define ATM_TT_TX 2 /* send only */ 88 #define ATM_TT_RXTX 3 /* receive and 87 #define ATM_TT_RXTX 3 /* receive and send */ 89 88 90 #define ATM_MC_NONE 0 /* no multiple 89 #define ATM_MC_NONE 0 /* no multiplexing */ 91 #define ATM_MC_TS 1 /* transport s 90 #define ATM_MC_TS 1 /* transport stream (TS) */ 92 #define ATM_MC_TS_FEC 2 /* transport s 91 #define ATM_MC_TS_FEC 2 /* transport stream with forward error corr. */ 93 #define ATM_MC_PS 3 /* program str 92 #define ATM_MC_PS 3 /* program stream (PS) */ 94 #define ATM_MC_PS_FEC 4 /* program str 93 #define ATM_MC_PS_FEC 4 /* program stream with forward error corr. */ 95 #define ATM_MC_H221 5 /* ITU-T Rec. 94 #define ATM_MC_H221 5 /* ITU-T Rec. H.221 */ 96 95 97 /* 96 /* 98 * SAP structures 97 * SAP structures 99 */ 98 */ 100 99 101 #define ATM_MAX_HLI 8 /* maximum hig 100 #define ATM_MAX_HLI 8 /* maximum high-layer information length */ 102 101 103 102 104 struct atm_blli { 103 struct atm_blli { 105 unsigned char l2_proto; /* layer 2 pro 104 unsigned char l2_proto; /* layer 2 protocol */ 106 union { 105 union { 107 struct { 106 struct { 108 unsigned char mode; /* mode of ope 107 unsigned char mode; /* mode of operation (ATM_IMD_xxx), 0 if */ 109 /* absent */ 108 /* absent */ 110 unsigned char window; /* window si 109 unsigned char window; /* window size (k), 1-127 (0 to omit) */ 111 } itu; /* ITU-T encod 110 } itu; /* ITU-T encoding */ 112 unsigned char user; /* user-specif 111 unsigned char user; /* user-specified l2 information */ 113 } l2; 112 } l2; 114 unsigned char l3_proto; /* layer 3 pro 113 unsigned char l3_proto; /* layer 3 protocol */ 115 union { 114 union { 116 struct { 115 struct { 117 unsigned char mode; /* mode of ope 116 unsigned char mode; /* mode of operation (ATM_IMD_xxx), 0 if */ 118 /* absent */ 117 /* absent */ 119 unsigned char def_size; /* default 118 unsigned char def_size; /* default packet size (log2), 4-12 (0 to */ 120 /* omit) * 119 /* omit) */ 121 unsigned char window;/* packet win 120 unsigned char window;/* packet window size, 1-127 (0 to omit) */ 122 } itu; /* ITU-T encod 121 } itu; /* ITU-T encoding */ 123 unsigned char user; /* user specif 122 unsigned char user; /* user specified l3 information */ 124 struct { /* if l3 123 struct { /* if l3_proto = ATM_L3_H310 */ 125 unsigned char term_type; /* termi 124 unsigned char term_type; /* terminal type */ 126 unsigned char fw_mpx_cap; /* forwa 125 unsigned char fw_mpx_cap; /* forward multiplexing capability */ 127 /* only 126 /* only if term_type != ATM_TT_NONE */ 128 unsigned char bw_mpx_cap; /* backw 127 unsigned char bw_mpx_cap; /* backward multiplexing capability */ 129 /* only 128 /* only if term_type != ATM_TT_NONE */ 130 } h310; 129 } h310; 131 struct { /* if l3_pro 130 struct { /* if l3_proto = ATM_L3_TR9577 */ 132 unsigned char ipi; /* initial p 131 unsigned char ipi; /* initial protocol id */ 133 unsigned char snap[5];/* IEEE 802. 132 unsigned char snap[5];/* IEEE 802.1 SNAP identifier */ 134 /* (only if 133 /* (only if ipi == NLPID_IEEE802_1_SNAP) */ 135 } tr9577; 134 } tr9577; 136 } l3; 135 } l3; 137 } __ATM_API_ALIGN; 136 } __ATM_API_ALIGN; 138 137 139 138 140 struct atm_bhli { 139 struct atm_bhli { 141 unsigned char hl_type; /* high layer 140 unsigned char hl_type; /* high layer information type */ 142 unsigned char hl_length; /* length (onl 141 unsigned char hl_length; /* length (only if hl_type == ATM_HL_USER || */ 143 /* hl_type == 142 /* hl_type == ATM_HL_ISO) */ 144 unsigned char hl_info[ATM_MAX_HLI];/* high 143 unsigned char hl_info[ATM_MAX_HLI];/* high layer information */ 145 }; 144 }; 146 145 147 146 148 #define ATM_MAX_BLLI 3 /* max 147 #define ATM_MAX_BLLI 3 /* maximum number of BLLI elements */ 149 148 150 149 151 struct atm_sap { 150 struct atm_sap { 152 struct atm_bhli bhli; /* loc 151 struct atm_bhli bhli; /* local SAP, high-layer information */ 153 struct atm_blli blli[ATM_MAX_BLLI] __A 152 struct atm_blli blli[ATM_MAX_BLLI] __ATM_API_ALIGN; 154 /* loc 153 /* local SAP, low-layer info */ 155 }; 154 }; 156 155 157 156 158 static __inline__ int blli_in_use(struct atm_b 157 static __inline__ int blli_in_use(struct atm_blli blli) 159 { 158 { 160 return blli.l2_proto || blli.l3_proto; 159 return blli.l2_proto || blli.l3_proto; 161 } 160 } 162 161 163 #endif 162 #endif 164 163
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.