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