Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 1 | /* From GSM08.08 / 3GPP TS 48.008 version 11.7.0 Release 11 */ |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 2 | |
Sylvain Munaut | 12ba778 | 2014-06-16 10:13:40 +0200 | [diff] [blame] | 3 | #pragma once |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 4 | |
| 5 | #include <stdlib.h> |
Philipp Maier | 6f725d6 | 2017-03-24 18:03:17 +0100 | [diff] [blame] | 6 | #include <stdbool.h> |
| 7 | #include <stdint.h> |
| 8 | #include <osmocom/core/linuxlist.h> |
Neels Hofmeyr | ffad574 | 2018-01-12 05:34:03 +0100 | [diff] [blame] | 9 | #include <osmocom/core/utils.h> |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 10 | |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 11 | /* |
| 12 | * this is from GSM 03.03 CGI but is copied in GSM 08.08 |
Neels Hofmeyr | a4399c8 | 2018-04-17 02:26:10 +0200 | [diff] [blame] | 13 | * in § 3.2.2.27 for Cell Identifier List. |
| 14 | * See gsm0808_cell_id_discr_name() for a human readable representation. |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 15 | */ |
| 16 | enum CELL_IDENT { |
| 17 | CELL_IDENT_WHOLE_GLOBAL = 0, |
| 18 | CELL_IDENT_LAC_AND_CI = 1, |
| 19 | CELL_IDENT_CI = 2, |
| 20 | CELL_IDENT_NO_CELL = 3, |
| 21 | CELL_IDENT_LAI_AND_LAC = 4, |
| 22 | CELL_IDENT_LAC = 5, |
| 23 | CELL_IDENT_BSS = 6, |
| 24 | CELL_IDENT_UTRAN_PLMN_LAC_RNC = 8, |
| 25 | CELL_IDENT_UTRAN_RNC = 9, |
| 26 | CELL_IDENT_UTRAN_LAC_RNC = 10, |
| 27 | }; |
| 28 | |
| 29 | |
| 30 | /* GSM 08.06 § 6.3 */ |
| 31 | enum BSSAP_MSG_TYPE { |
| 32 | BSSAP_MSG_BSS_MANAGEMENT = 0x0, |
| 33 | BSSAP_MSG_DTAP = 0x1, |
| 34 | }; |
| 35 | |
| 36 | struct bssmap_header { |
Sylvain Munaut | a074ec4 | 2010-04-28 10:05:29 +0200 | [diff] [blame] | 37 | uint8_t type; |
| 38 | uint8_t length; |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 39 | } __attribute__((packed)); |
| 40 | |
| 41 | struct dtap_header { |
Sylvain Munaut | a074ec4 | 2010-04-28 10:05:29 +0200 | [diff] [blame] | 42 | uint8_t type; |
| 43 | uint8_t link_id; |
| 44 | uint8_t length; |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 45 | } __attribute__((packed)); |
| 46 | |
| 47 | |
| 48 | enum BSS_MAP_MSG_TYPE { |
| 49 | BSS_MAP_MSG_RESERVED_0 = 0, |
| 50 | |
| 51 | /* ASSIGNMENT MESSAGES */ |
| 52 | BSS_MAP_MSG_ASSIGMENT_RQST = 1, |
| 53 | BSS_MAP_MSG_ASSIGMENT_COMPLETE = 2, |
| 54 | BSS_MAP_MSG_ASSIGMENT_FAILURE = 3, |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 55 | BSS_MAP_MSG_CHAN_MOD_RQST = 8, |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 56 | |
| 57 | /* HANDOVER MESSAGES */ |
| 58 | BSS_MAP_MSG_HANDOVER_RQST = 16, |
| 59 | BSS_MAP_MSG_HANDOVER_REQUIRED = 17, |
| 60 | BSS_MAP_MSG_HANDOVER_RQST_ACKNOWLEDGE= 18, |
| 61 | BSS_MAP_MSG_HANDOVER_CMD = 19, |
| 62 | BSS_MAP_MSG_HANDOVER_COMPLETE = 20, |
| 63 | BSS_MAP_MSG_HANDOVER_SUCCEEDED = 21, |
| 64 | BSS_MAP_MSG_HANDOVER_FAILURE = 22, |
| 65 | BSS_MAP_MSG_HANDOVER_PERFORMED = 23, |
| 66 | BSS_MAP_MSG_HANDOVER_CANDIDATE_ENQUIRE = 24, |
| 67 | BSS_MAP_MSG_HANDOVER_CANDIDATE_RESPONSE = 25, |
| 68 | BSS_MAP_MSG_HANDOVER_REQUIRED_REJECT = 26, |
| 69 | BSS_MAP_MSG_HANDOVER_DETECT = 27, |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 70 | BSS_MAP_MSG_INT_HANDOVER_REQUIRED = 0x70, |
| 71 | BSS_MAP_MSG_INT_HANDOVER_REQUIRED_REJ = 0x71, |
| 72 | BSS_MAP_MSG_INT_HANDOVER_CMD = 0x72, |
| 73 | BSS_MAP_MSG_INT_HANDOVER_ENQUIRY = 0x73, |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 74 | |
| 75 | /* RELEASE MESSAGES */ |
| 76 | BSS_MAP_MSG_CLEAR_CMD = 32, |
| 77 | BSS_MAP_MSG_CLEAR_COMPLETE = 33, |
| 78 | BSS_MAP_MSG_CLEAR_RQST = 34, |
| 79 | BSS_MAP_MSG_RESERVED_1 = 35, |
| 80 | BSS_MAP_MSG_RESERVED_2 = 36, |
| 81 | BSS_MAP_MSG_SAPI_N_REJECT = 37, |
| 82 | BSS_MAP_MSG_CONFUSION = 38, |
| 83 | |
| 84 | /* OTHER CONNECTION RELATED MESSAGES */ |
| 85 | BSS_MAP_MSG_SUSPEND = 40, |
| 86 | BSS_MAP_MSG_RESUME = 41, |
| 87 | BSS_MAP_MSG_CONNECTION_ORIENTED_INFORMATION = 42, |
| 88 | BSS_MAP_MSG_PERFORM_LOCATION_RQST = 43, |
| 89 | BSS_MAP_MSG_LSA_INFORMATION = 44, |
| 90 | BSS_MAP_MSG_PERFORM_LOCATION_RESPONSE = 45, |
| 91 | BSS_MAP_MSG_PERFORM_LOCATION_ABORT = 46, |
| 92 | BSS_MAP_MSG_COMMON_ID = 47, |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 93 | BSS_MAP_MSG_REROUTE_CMD = 0x78, |
| 94 | BSS_MAP_MSG_REROUTE_COMPLETE = 0x79, |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 95 | |
| 96 | /* GENERAL MESSAGES */ |
| 97 | BSS_MAP_MSG_RESET = 48, |
| 98 | BSS_MAP_MSG_RESET_ACKNOWLEDGE = 49, |
| 99 | BSS_MAP_MSG_OVERLOAD = 50, |
| 100 | BSS_MAP_MSG_RESERVED_3 = 51, |
| 101 | BSS_MAP_MSG_RESET_CIRCUIT = 52, |
| 102 | BSS_MAP_MSG_RESET_CIRCUIT_ACKNOWLEDGE = 53, |
| 103 | BSS_MAP_MSG_MSC_INVOKE_TRACE = 54, |
| 104 | BSS_MAP_MSG_BSS_INVOKE_TRACE = 55, |
| 105 | BSS_MAP_MSG_CONNECTIONLESS_INFORMATION = 58, |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 106 | BSS_MAP_MSG_RESET_IP_RSRC = 0x3d, |
| 107 | BSS_MAP_MSG_RESET_IP_RSRC_ACK = 0x3e, |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 108 | |
| 109 | /* TERRESTRIAL RESOURCE MESSAGES */ |
| 110 | BSS_MAP_MSG_BLOCK = 64, |
| 111 | BSS_MAP_MSG_BLOCKING_ACKNOWLEDGE = 65, |
| 112 | BSS_MAP_MSG_UNBLOCK = 66, |
| 113 | BSS_MAP_MSG_UNBLOCKING_ACKNOWLEDGE = 67, |
| 114 | BSS_MAP_MSG_CIRCUIT_GROUP_BLOCK = 68, |
| 115 | BSS_MAP_MSG_CIRCUIT_GROUP_BLOCKING_ACKNOWLEDGE = 69, |
| 116 | BSS_MAP_MSG_CIRCUIT_GROUP_UNBLOCK = 70, |
| 117 | BSS_MAP_MSG_CIRCUIT_GROUP_UNBLOCKING_ACKNOWLEDGE = 71, |
| 118 | BSS_MAP_MSG_UNEQUIPPED_CIRCUIT = 72, |
| 119 | BSS_MAP_MSG_CHANGE_CIRCUIT = 78, |
| 120 | BSS_MAP_MSG_CHANGE_CIRCUIT_ACKNOWLEDGE = 79, |
| 121 | |
| 122 | /* RADIO RESOURCE MESSAGES */ |
| 123 | BSS_MAP_MSG_RESOURCE_RQST = 80, |
| 124 | BSS_MAP_MSG_RESOURCE_INDICATION = 81, |
| 125 | BSS_MAP_MSG_PAGING = 82, |
| 126 | BSS_MAP_MSG_CIPHER_MODE_CMD = 83, |
| 127 | BSS_MAP_MSG_CLASSMARK_UPDATE = 84, |
| 128 | BSS_MAP_MSG_CIPHER_MODE_COMPLETE = 85, |
| 129 | BSS_MAP_MSG_QUEUING_INDICATION = 86, |
| 130 | BSS_MAP_MSG_COMPLETE_LAYER_3 = 87, |
| 131 | BSS_MAP_MSG_CLASSMARK_RQST = 88, |
| 132 | BSS_MAP_MSG_CIPHER_MODE_REJECT = 89, |
| 133 | BSS_MAP_MSG_LOAD_INDICATION = 90, |
| 134 | |
| 135 | /* VGCS/VBS */ |
| 136 | BSS_MAP_MSG_VGCS_VBS_SETUP = 4, |
| 137 | BSS_MAP_MSG_VGCS_VBS_SETUP_ACK = 5, |
| 138 | BSS_MAP_MSG_VGCS_VBS_SETUP_REFUSE = 6, |
| 139 | BSS_MAP_MSG_VGCS_VBS_ASSIGNMENT_RQST = 7, |
| 140 | BSS_MAP_MSG_VGCS_VBS_ASSIGNMENT_RESULT = 28, |
| 141 | BSS_MAP_MSG_VGCS_VBS_ASSIGNMENT_FAILURE = 29, |
| 142 | BSS_MAP_MSG_VGCS_VBS_QUEUING_INDICATION = 30, |
| 143 | BSS_MAP_MSG_UPLINK_RQST = 31, |
| 144 | BSS_MAP_MSG_UPLINK_RQST_ACKNOWLEDGE = 39, |
| 145 | BSS_MAP_MSG_UPLINK_RQST_CONFIRMATION = 73, |
| 146 | BSS_MAP_MSG_UPLINK_RELEASE_INDICATION = 74, |
| 147 | BSS_MAP_MSG_UPLINK_REJECT_CMD = 75, |
| 148 | BSS_MAP_MSG_UPLINK_RELEASE_CMD = 76, |
| 149 | BSS_MAP_MSG_UPLINK_SEIZED_CMD = 77, |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 150 | BSS_MAP_MSG_VGCS_ADDL_INFO = 0x60, |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 151 | BSS_MAP_MSG_NOTIFICATION_DATA = 0x62, |
| 152 | BSS_MAP_MSG_UPLINK_APP_DATA = 0x63, |
| 153 | |
| 154 | /* LOCAL SWITCHING */ |
| 155 | BSS_MAP_MSG_LCLS_CONNECT_CTRL = 0x74, |
| 156 | BSS_MAP_MSG_LCLS_CONNECT_CTRL_ACK = 0x75, |
| 157 | BSS_MAP_MSG_LCLS_NOTIFICATION = 0x76, |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 158 | }; |
| 159 | |
| 160 | enum GSM0808_IE_CODING { |
| 161 | GSM0808_IE_CIRCUIT_IDENTITY_CODE = 1, |
| 162 | GSM0808_IE_RESERVED_0 = 2, |
| 163 | GSM0808_IE_RESOURCE_AVAILABLE = 3, |
| 164 | GSM0808_IE_CAUSE = 4, |
| 165 | GSM0808_IE_CELL_IDENTIFIER = 5, |
| 166 | GSM0808_IE_PRIORITY = 6, |
| 167 | GSM0808_IE_LAYER_3_HEADER_INFORMATION = 7, |
| 168 | GSM0808_IE_IMSI = 8, |
| 169 | GSM0808_IE_TMSI = 9, |
| 170 | GSM0808_IE_ENCRYPTION_INFORMATION = 10, |
| 171 | GSM0808_IE_CHANNEL_TYPE = 11, |
| 172 | GSM0808_IE_PERIODICITY = 12, |
| 173 | GSM0808_IE_EXTENDED_RESOURCE_INDICATOR = 13, |
| 174 | GSM0808_IE_NUMBER_OF_MSS = 14, |
| 175 | GSM0808_IE_RESERVED_1 = 15, |
| 176 | GSM0808_IE_RESERVED_2 = 16, |
| 177 | GSM0808_IE_RESERVED_3 = 17, |
| 178 | GSM0808_IE_CLASSMARK_INFORMATION_T2 = 18, |
| 179 | GSM0808_IE_CLASSMARK_INFORMATION_T3 = 19, |
| 180 | GSM0808_IE_INTERFERENCE_BAND_TO_USE = 20, |
| 181 | GSM0808_IE_RR_CAUSE = 21, |
| 182 | GSM0808_IE_RESERVED_4 = 22, |
| 183 | GSM0808_IE_LAYER_3_INFORMATION = 23, |
| 184 | GSM0808_IE_DLCI = 24, |
| 185 | GSM0808_IE_DOWNLINK_DTX_FLAG = 25, |
| 186 | GSM0808_IE_CELL_IDENTIFIER_LIST = 26, |
| 187 | GSM0808_IE_RESPONSE_RQST = 27, |
| 188 | GSM0808_IE_RESOURCE_INDICATION_METHOD = 28, |
| 189 | GSM0808_IE_CLASSMARK_INFORMATION_TYPE_1 = 29, |
| 190 | GSM0808_IE_CIRCUIT_IDENTITY_CODE_LIST = 30, |
| 191 | GSM0808_IE_DIAGNOSTIC = 31, |
| 192 | GSM0808_IE_LAYER_3_MESSAGE_CONTENTS = 32, |
| 193 | GSM0808_IE_CHOSEN_CHANNEL = 33, |
| 194 | GSM0808_IE_TOTAL_RESOURCE_ACCESSIBLE = 34, |
| 195 | GSM0808_IE_CIPHER_RESPONSE_MODE = 35, |
| 196 | GSM0808_IE_CHANNEL_NEEDED = 36, |
| 197 | GSM0808_IE_TRACE_TYPE = 37, |
| 198 | GSM0808_IE_TRIGGERID = 38, |
| 199 | GSM0808_IE_TRACE_REFERENCE = 39, |
| 200 | GSM0808_IE_TRANSACTIONID = 40, |
| 201 | GSM0808_IE_MOBILE_IDENTITY = 41, |
| 202 | GSM0808_IE_OMCID = 42, |
| 203 | GSM0808_IE_FORWARD_INDICATOR = 43, |
| 204 | GSM0808_IE_CHOSEN_ENCR_ALG = 44, |
| 205 | GSM0808_IE_CIRCUIT_POOL = 45, |
| 206 | GSM0808_IE_CIRCUIT_POOL_LIST = 46, |
| 207 | GSM0808_IE_TIME_INDICATION = 47, |
| 208 | GSM0808_IE_RESOURCE_SITUATION = 48, |
| 209 | GSM0808_IE_CURRENT_CHANNEL_TYPE_1 = 49, |
| 210 | GSM0808_IE_QUEUEING_INDICATOR = 50, |
| 211 | GSM0808_IE_SPEECH_VERSION = 64, |
| 212 | GSM0808_IE_ASSIGNMENT_REQUIREMENT = 51, |
| 213 | GSM0808_IE_TALKER_FLAG = 53, |
| 214 | GSM0808_IE_CONNECTION_RELEASE_RQSTED = 54, |
| 215 | GSM0808_IE_GROUP_CALL_REFERENCE = 55, |
| 216 | GSM0808_IE_EMLPP_PRIORITY = 56, |
| 217 | GSM0808_IE_CONFIG_EVO_INDI = 57, |
| 218 | GSM0808_IE_OLD_BSS_TO_NEW_BSS_INFORMATION = 58, |
| 219 | GSM0808_IE_LSA_IDENTIFIER = 59, |
| 220 | GSM0808_IE_LSA_IDENTIFIER_LIST = 60, |
| 221 | GSM0808_IE_LSA_INFORMATION = 61, |
| 222 | GSM0808_IE_LCS_QOS = 62, |
| 223 | GSM0808_IE_LSA_ACCESS_CTRL_SUPPR = 63, |
| 224 | GSM0808_IE_LCS_PRIORITY = 67, |
| 225 | GSM0808_IE_LOCATION_TYPE = 68, |
| 226 | GSM0808_IE_LOCATION_ESTIMATE = 69, |
| 227 | GSM0808_IE_POSITIONING_DATA = 70, |
| 228 | GSM0808_IE_LCS_CAUSE = 71, |
| 229 | GSM0808_IE_LCS_CLIENT_TYPE = 72, |
| 230 | GSM0808_IE_APDU = 73, |
| 231 | GSM0808_IE_NETWORK_ELEMENT_IDENTITY = 74, |
| 232 | GSM0808_IE_GPS_ASSISTANCE_DATA = 75, |
| 233 | GSM0808_IE_DECIPHERING_KEYS = 76, |
| 234 | GSM0808_IE_RETURN_ERROR_RQST = 77, |
| 235 | GSM0808_IE_RETURN_ERROR_CAUSE = 78, |
| 236 | GSM0808_IE_SEGMENTATION = 79, |
| 237 | GSM0808_IE_SERVICE_HANDOVER = 80, |
| 238 | GSM0808_IE_SOURCE_RNC_TO_TARGET_RNC_TRANSPARENT_UMTS = 81, |
| 239 | GSM0808_IE_SOURCE_RNC_TO_TARGET_RNC_TRANSPARENT_CDMA2000= 82, |
| 240 | GSM0808_IE_RESERVED_5 = 65, |
| 241 | GSM0808_IE_RESERVED_6 = 66, |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 242 | GSM0808_IE_GERAN_CLASSMARK = 0x53, |
| 243 | GSM0808_IE_GERAN_BSC_CONTAINER = 0x54, |
| 244 | GSM0808_IE_NEW_BSS_TO_OLD_BSS_INFO = 0x61, |
| 245 | GSM0800_IE_INTER_SYSTEM_INFO = 0x63, |
| 246 | GSM0808_IE_SNA_ACCESS_INFO = 0x64, |
| 247 | GSM0808_IE_VSTK_RAND_INFO = 0x65, |
| 248 | GSM0808_IE_VSTK_INFO = 0x66, |
| 249 | GSM0808_IE_PAGING_INFO = 0x67, |
| 250 | GSM0808_IE_IMEI = 0x68, |
| 251 | GSM0808_IE_VELOCITY_ESTIMATE = 0x55, |
| 252 | GSM0808_IE_VGCS_FEATURE_FLAGS = 0x69, |
| 253 | GSM0808_IE_TALKER_PRIORITY = 0x6a, |
| 254 | GSM0808_IE_EMERGENCY_SET_INDICATION = 0x6b, |
| 255 | GSM0808_IE_TALKER_IDENTITY = 0x6c, |
| 256 | GSM0808_IE_CELL_ID_LIST_SEGMENT = 0x6d, |
Harald Welte | 92107df | 2014-06-21 23:16:20 +0200 | [diff] [blame] | 257 | GSM0808_IE_SMS_TO_VGCS = 0x6e, |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 258 | GSM0808_IE_VGCS_TALKER_MODE = 0x6f, |
| 259 | GSM0808_IE_VGCS_VBS_CELL_STATUS = 0x70, |
| 260 | GSM0808_IE_CELL_ID_LIST_SEG_EST_CELLS = 0x71, |
| 261 | GSM0808_IE_CELL_ID_LIST_SEG_CELLS_TBE = 0x72, |
| 262 | GSM0808_IE_CELL_ID_LIST_SEG_REL_CELLS = 0x73, |
| 263 | GSM0808_IE_CELL_ID_LIST_SEG_NE_CELLS = 0x74, |
| 264 | GSM0808_IE_GANSS_ASSISTANCE_DATA = 0x75, |
| 265 | GSM0808_IE_GANSS_POSITIONING_DATA = 0x76, |
| 266 | GSM0808_IE_GANSS_LOCATION_TYPE = 0x77, |
| 267 | GSM0808_IE_APP_DATA = 0x78, |
| 268 | GSM0808_IE_DATA_IDENTITY = 0x79, |
| 269 | GSM0808_IE_APP_DATA_INFO = 0x7a, |
| 270 | GSM0808_IE_MSISDN = 0x7b, |
| 271 | GSM0808_IE_AOIP_TRASP_ADDR = 0x7c, |
| 272 | GSM0808_IE_SPEECH_CODEC_LIST = 0x7d, |
| 273 | GSM0808_IE_SPEECH_CODEC = 0x7e, |
| 274 | GSM0808_IE_CALL_ID = 0x7f, |
| 275 | GSM0808_IE_CALL_ID_LIST = 0x80, |
| 276 | GSM0808_IE_A_IF_SEL_FOR_RESET = 0x81, |
| 277 | GSM0808_IE_KC_128 = 0x83, |
| 278 | GSM0808_IE_CSG_IDENTIFIER = 0x84, |
| 279 | GSM0808_IE_REDIR_ATTEMPT_FLAG = 0x85, |
| 280 | GSM0808_IE_REROUTE_REJ_CAUSE = 0x86, |
| 281 | GSM0808_IE_SEND_SEQ_NUM = 0x87, |
| 282 | GSM0808_IE_REROUTE_COMPL_OUTCOME = 0x88, |
| 283 | GSM0808_IE_GLOBAL_CALL_REF = 0x89, |
| 284 | GSM0808_IE_LCLS_CONFIG = 0x8a, |
| 285 | GSM0808_IE_LCLS_CONN_STATUS_CTRL = 0x8b, |
Harald Welte | 92107df | 2014-06-21 23:16:20 +0200 | [diff] [blame] | 286 | GSM0808_IE_LCLS_CORR_NOT_NEEDED = 0x8c, |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 287 | GSM0808_IE_LCLS_BSS_STATUS = 0x8d, |
| 288 | GSM0808_IE_LCLS_BREAK_REQ = 0x8e, |
| 289 | GSM0808_IE_CSFB_INDICATION = 0x8f, |
| 290 | GSM0808_IE_CS_TO_PS_SRVCC = 0x90, |
| 291 | GSM0808_IE_SRC_ENB_TO_TGT_ENB_TRANSP = 0x91, |
| 292 | GSM0808_IE_CS_TO_PS_SRVCC_IND = 0x92, |
| 293 | GSM0808_IE_CN_TO_MS_TRANSP_INFO = 0x93, |
| 294 | GSM0808_IE_SELECTED_PLMN_ID = 0x94, |
| 295 | GSM0808_IE_LAST_USED_EUTRAN_PLMN_ID = 0x95, |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 296 | }; |
| 297 | |
Neels Hofmeyr | 70aba3f | 2018-03-13 03:40:53 +0100 | [diff] [blame] | 298 | /* 3GPP TS 48.008 3.2.3 Signalling Field Element Coding */ |
| 299 | enum GSM0808_SIGNALLING_FIELD_ELEMENT_CODING { |
| 300 | GSM0808_FE_IE_EXTRA_INFORMATION = 0x01, /*< 3.2.3.1 */ |
| 301 | GSM0808_FE_IE_CURRENT_CHANNEL_TYPE_2 = 0x02, /*< 3.2.3.2 */ |
| 302 | GSM0808_FE_IE_TARGET_CELL_RADIO_INFORMATION = 0x03, /*< 3.2.3.3 */ |
| 303 | GSM0808_FE_IE_GPRS_SUSPEND_INFORMATION = 0x04, /*< 3.2.3.4 */ |
| 304 | GSM0808_FE_IE_MULTIRATE_CONFIGURATION_INFORMATION = 0x05, /*< 3.2.3.5 */ |
| 305 | GSM0808_FE_IE_DUAL_TRANSFER_MODE_INFORMATION = 0x06, /*< 3.2.3.6 */ |
| 306 | GSM0808_FE_IE_INTER_RAT_HANDOVER_INFO = 0x07, /*< 3.2.3.7 */ |
| 307 | GSM0808_FE_IE_CDMA2000_CAPABILITY_INFORMATION = 0x08, /*< 3.2.3.8 */ |
| 308 | GSM0808_FE_IE_DOWNLINK_CELL_LOAD_INFORMATION = 0x09, /*< 3.2.3.9 */ |
| 309 | GSM0808_FE_IE_UPLINK_CELL_LOAD_INFORMATION = 0x0a, /*< 3.2.3.10 */ |
| 310 | GSM0808_FE_IE_CELL_LOAD_INFORMATION_GROUP = 0x0b, /*< 3.2.3.11 */ |
| 311 | GSM0808_FE_IE_CELL_LOAD_INFORMATION = 0x0c, /*< 3.2.3.12 */ |
| 312 | GSM0808_FE_IE_PS_INDICATION = 0x0d, /*< 3.2.3.13 */ |
| 313 | GSM0808_FE_IE_DTM_HANDOVER_COMMAND_INDICATION = 0x0e, /*< 3.2.3.14 */ |
| 314 | GSM0808_FE_IE_D_RNTI = 0xfe, /*< 3.2.3.15 */ |
| 315 | GSM0808_FE_IE_IRAT_MEASUREMENT_CONFIGURATION = 0x0f, /*< 3.2.3.16 */ |
| 316 | GSM0808_FE_IE_SOURCE_CELL_ID = 0x10, /*< 3.2.3.17 */ |
| 317 | GSM0808_FE_IE_IRAT_MEASUREMENT_CONFIGURATION_EXTENDED_E_ARFCNS = 0x11, /*< 3.2.3.18 */ |
| 318 | }; |
| 319 | |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 320 | /* GSM 08.08 3.2.2.5 Cause */ |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 321 | enum gsm0808_cause { |
| 322 | GSM0808_CAUSE_RADIO_INTERFACE_MESSAGE_FAILURE = 0, |
| 323 | GSM0808_CAUSE_RADIO_INTERFACE_FAILURE = 1, |
| 324 | GSM0808_CAUSE_UPLINK_QUALITY = 2, |
| 325 | GSM0808_CAUSE_UPLINK_STRENGTH = 3, |
| 326 | GSM0808_CAUSE_DOWNLINK_QUALITY = 4, |
| 327 | GSM0808_CAUSE_DOWNLINK_STRENGTH = 5, |
| 328 | GSM0808_CAUSE_DISTANCE = 6, |
| 329 | GSM0808_CAUSE_O_AND_M_INTERVENTION = 7, |
| 330 | GSM0808_CAUSE_RESPONSE_TO_MSC_INVOCATION = 8, |
| 331 | GSM0808_CAUSE_CALL_CONTROL = 9, |
| 332 | GSM0808_CAUSE_RADIO_INTERFACE_FAILURE_REVERSION = 10, |
| 333 | GSM0808_CAUSE_HANDOVER_SUCCESSFUL = 11, |
| 334 | GSM0808_CAUSE_BETTER_CELL = 12, |
| 335 | GSM0808_CAUSE_DIRECTED_RETRY = 13, |
| 336 | GSM0808_CAUSE_JOINED_GROUP_CALL_CHANNEL = 14, |
| 337 | GSM0808_CAUSE_TRAFFIC = 15, |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 338 | GSM0808_CAUSE_REDUCE_LOAD_IN_SERVING_CELL = 0x10, |
| 339 | GSM0808_CAUSE_TRAFFIC_LOAD_IN_TGT_HIGHER_THAN_IN_SRC_CELL = 0x11, |
| 340 | GSM0808_CAUSE_RELOCATION_TRIGGERED = 0x12, |
Thorsten Alteholz | 0062a5f | 2018-05-15 15:28:55 +0200 | [diff] [blame] | 341 | GSM0808_CAUSE_REQUESTED_OPT_NOT_AUTHORISED = 0x14, |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 342 | GSM0808_CAUSE_ALT_CHAN_CONFIG_REQUESTED = 0x15, |
| 343 | GSM0808_CAUSE_RESP_TO_INT_HO_ENQ_MSG = 0x16, |
| 344 | GSM0808_CAUSE_INT_HO_ENQUIRY_REJECT = 0x17, |
| 345 | GSM0808_CAUSE_REDUNDANCY_LEVEL_NOT_ADEQUATE = 0x18, |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 346 | GSM0808_CAUSE_EQUIPMENT_FAILURE = 32, |
| 347 | GSM0808_CAUSE_NO_RADIO_RESOURCE_AVAILABLE = 33, |
| 348 | GSM0808_CAUSE_RQSTED_TERRESTRIAL_RESOURCE_UNAVAILABLE = 34, |
| 349 | GSM0808_CAUSE_CCCH_OVERLOAD = 35, |
| 350 | GSM0808_CAUSE_PROCESSOR_OVERLOAD = 36, |
| 351 | GSM0808_CAUSE_BSS_NOT_EQUIPPED = 37, |
| 352 | GSM0808_CAUSE_MS_NOT_EQUIPPED = 38, |
| 353 | GSM0808_CAUSE_INVALID_CELL = 39, |
| 354 | GSM0808_CAUSE_TRAFFIC_LOAD = 40, |
| 355 | GSM0808_CAUSE_PREEMPTION = 41, |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 356 | GSM0808_CAUSE_DTM_HO_SGSN_FAILURE = 0x2a, |
| 357 | GSM0808_CAUSE_DTM_HO_PS_ALLOC_FAILURE = 0x2b, |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 358 | GSM0808_CAUSE_RQSTED_TRANSCODING_RATE_ADAPTION_UNAVAILABLE = 48, |
| 359 | GSM0808_CAUSE_CIRCUIT_POOL_MISMATCH = 49, |
| 360 | GSM0808_CAUSE_SWITCH_CIRCUIT_POOL = 50, |
| 361 | GSM0808_CAUSE_RQSTED_SPEECH_VERSION_UNAVAILABLE = 51, |
| 362 | GSM0808_CAUSE_LSA_NOT_ALLOWED = 52, |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 363 | GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_UNAVAIL = 0x35, |
| 364 | GSM0808_CAUSE_REQ_A_IF_TYPE_UNAVAIL = 0x36, |
| 365 | GSM0808_CAUSE_INVALID_CSG_CELL = 0x37, |
| 366 | GSM0808_CAUSE_REQ_REDUND_LEVEL_NOT_AVAIL = 0x3f, |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 367 | GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED = 64, |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 368 | GSM0808_CAUSE_GERAN_IU_MODE_FAILURE = 0x41, |
| 369 | GSM0808_CAUSE_INC_RELOC_NOT_SUPP_DT_PUESBINE_FEATURE = 0x42, |
| 370 | GSM0808_CAUSE_ACCESS_RESTRICTED_DUE_TO_SHARED_NETWORKS = 0x43, |
| 371 | GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_NOT_SUPP = 0x44, |
| 372 | GSM0808_CAUSE_REQ_A_IF_TYPE_NOT_SUPP = 0x45, |
| 373 | GSM0808_CAUSE_REQ_REDUND_LVL_NOT_SUPP = 0x46, |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 374 | GSM0808_CAUSE_TERRESTRIAL_CIRCUIT_ALREADY_ALLOCATED = 80, |
| 375 | GSM0808_CAUSE_INVALID_MESSAGE_CONTENTS = 81, |
| 376 | GSM0808_CAUSE_INFORMATION_ELEMENT_OR_FIELD_MISSING = 82, |
| 377 | GSM0808_CAUSE_INCORRECT_VALUE = 83, |
| 378 | GSM0808_CAUSE_UNKNOWN_MESSAGE_TYPE = 84, |
| 379 | GSM0808_CAUSE_UNKNOWN_INFORMATION_ELEMENT = 85, |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 380 | GSM0808_CAUSE_DTM_HO_INVALID_PS_IND = 0x56, |
| 381 | GSM0808_CAUSE_CALL_ID_ALREADY_ALLOC = 0x57, |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 382 | GSM0808_CAUSE_PROTOCOL_ERROR_BETWEEN_BSS_AND_MSC = 96, |
Thorsten Alteholz | 0062a5f | 2018-05-15 15:28:55 +0200 | [diff] [blame] | 383 | GSM0808_CAUSE_VGCS_VBS_CALL_NON_EXISTENT = 0x61, |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 384 | GSM0808_CAUSE_DTM_HO_TIMER_EXPIRY = 0x62, |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 385 | }; |
| 386 | |
| 387 | /* GSM 08.08 3.2.2.11 Channel Type */ |
| 388 | enum gsm0808_chan_indicator { |
| 389 | GSM0808_CHAN_SPEECH = 1, |
| 390 | GSM0808_CHAN_DATA = 2, |
| 391 | GSM0808_CHAN_SIGN = 3, |
| 392 | }; |
| 393 | |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 394 | /* GSM 08.08 3.2.2.11 Channel Type */ |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 395 | enum gsm0808_chan_rate_type_data { |
| 396 | GSM0808_DATA_FULL_BM = 0x8, |
| 397 | GSM0808_DATA_HALF_LM = 0x9, |
| 398 | GSM0808_DATA_FULL_RPREF = 0xa, |
| 399 | GSM0808_DATA_HALF_PREF = 0xb, |
| 400 | GSM0808_DATA_FULL_PREF_NO_CHANGE = 0x1a, |
| 401 | GSM0808_DATA_HALF_PREF_NO_CHANGE = 0x1b, |
| 402 | GSM0808_DATA_MULTI_MASK = 0x20, |
| 403 | GSM0808_DATA_MULTI_MASK_NO_CHANGE = 0x30, |
| 404 | }; |
| 405 | |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 406 | /* GSM 08.08 3.2.2.11 Channel Type */ |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 407 | enum gsm0808_chan_rate_type_speech { |
| 408 | GSM0808_SPEECH_FULL_BM = 0x8, |
| 409 | GSM0808_SPEECH_HALF_LM = 0x9, |
| 410 | GSM0808_SPEECH_FULL_PREF= 0xa, |
| 411 | GSM0808_SPEECH_HALF_PREF= 0xb, |
| 412 | GSM0808_SPEECH_FULL_PREF_NO_CHANGE = 0x1a, |
| 413 | GSM0808_SPEECH_HALF_PREF_NO_CHANGE = 0x1b, |
| 414 | GSM0808_SPEECH_PERM = 0xf, |
| 415 | GSM0808_SPEECH_PERM_NO_CHANGE = 0x1f, |
| 416 | }; |
| 417 | |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 418 | /*! GSM 08.08 3.2.2.11 Channel Type |
Philipp Maier | 890f1f5 | 2017-06-16 16:59:06 +0200 | [diff] [blame] | 419 | * (see also 3GPP TS 48.008, section 3.2.2.11) */ |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 420 | enum gsm0808_permitted_speech { |
Philipp Maier | 890f1f5 | 2017-06-16 16:59:06 +0200 | [diff] [blame] | 421 | GSM0808_PERM_FR1 = 0x01, /*!< GSM FR */ |
| 422 | GSM0808_PERM_FR2 = 0x11, /*!< GSM EFR */ |
| 423 | GSM0808_PERM_FR3 = 0x21, /*!< FR AMR */ |
Philipp Maier | da38203 | 2017-06-01 12:11:56 +0200 | [diff] [blame] | 424 | GSM0808_PERM_FR4 = 0x41, /*!< OFR AMR-WB */ |
| 425 | GSM0808_PERM_FR5 = 0x42, /*!< FR AMR-WB */ |
Philipp Maier | 890f1f5 | 2017-06-16 16:59:06 +0200 | [diff] [blame] | 426 | GSM0808_PERM_HR1 = GSM0808_PERM_FR1 | 0x4, /*!< GSM HR */ |
| 427 | GSM0808_PERM_HR2 = GSM0808_PERM_FR2 | 0x4, /*!< (deprecated) */ |
| 428 | GSM0808_PERM_HR3 = GSM0808_PERM_FR3 | 0x4, /*!< HR AMR */ |
Philipp Maier | da38203 | 2017-06-01 12:11:56 +0200 | [diff] [blame] | 429 | GSM0808_PERM_HR4 = 0x46, /*!< OHR AMR-WB */ |
| 430 | GSM0808_PERM_HR6 = 0x45, /*!< OHR AMR */ |
| 431 | }; |
| 432 | |
Philipp Maier | cdd0581 | 2018-07-12 18:21:07 +0200 | [diff] [blame] | 433 | extern const struct value_string gsm0808_permitted_speech_names[]; |
| 434 | static inline const char *gsm0808_permitted_speech_name(enum gsm0808_permitted_speech val) |
| 435 | { return get_value_string(gsm0808_permitted_speech_names, val); } |
| 436 | |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 437 | /*! 3GPP TS 48.008, 3.2.2.103 Speech Codec Type */ |
Philipp Maier | da38203 | 2017-06-01 12:11:56 +0200 | [diff] [blame] | 438 | enum gsm0808_speech_codec_type { |
| 439 | GSM0808_SCT_FR1 = 0x0, /*!< GSM FR */ |
| 440 | GSM0808_SCT_FR2 = 0x2, /*!< GSM EFR */ |
| 441 | GSM0808_SCT_FR3 = 0x3, /*!< FR AMR */ |
| 442 | GSM0808_SCT_FR4 = 0xc, /*!< OFR AMR-WB */ |
| 443 | GSM0808_SCT_FR5 = 0x9, /*!< FR AMR-WB */ |
| 444 | GSM0808_SCT_HR1 = 0x1, /*!< GSM_HR */ |
| 445 | GSM0808_SCT_HR3 = 0x4, /*!< HR_AMR */ |
| 446 | GSM0808_SCT_HR4 = 0xd, /*!< OHR AMR-WB */ |
| 447 | GSM0808_SCT_HR6 = 0xb, /*!< OHR AMR */ |
| 448 | GSM0808_SCT_CSD = 0xfd, /*!< CSData (see also TS 26.103) */ |
Holger Hans Peter Freyther | ebaed74 | 2010-04-15 03:14:51 +0200 | [diff] [blame] | 449 | }; |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 450 | |
Neels Hofmeyr | ffad574 | 2018-01-12 05:34:03 +0100 | [diff] [blame] | 451 | extern const struct value_string gsm0808_speech_codec_type_names[]; |
| 452 | static inline const char *gsm0808_speech_codec_type_name(enum gsm0808_speech_codec_type val) |
| 453 | { return get_value_string(gsm0808_speech_codec_type_names, val); } |
| 454 | |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 455 | /* GSM 08.08 3.2.2.44 Chosen Encryption Algorithm */ |
| 456 | enum gsm0808_chosen_enc_alg { |
| 457 | GSM0808_ALG_ID_A5_0 = 0x01, |
| 458 | GSM0808_ALG_ID_A5_1 = 0x02, |
| 459 | GSM0808_ALG_ID_A5_2 = 0x03, |
| 460 | GSM0808_ALG_ID_A5_3 = 0x04, |
| 461 | GSM0808_ALG_ID_A5_4 = 0x05, |
| 462 | GSM0808_ALG_ID_A5_5 = 0x06, |
| 463 | GSM0808_ALG_ID_A5_6 = 0x07, |
| 464 | GSM0808_ALG_ID_A5_7 = 0x08, |
| 465 | }; |
Pau Espin Pedrol | f2cda62 | 2018-07-06 17:16:41 +0200 | [diff] [blame] | 466 | extern const struct value_string gsm0808_chosen_enc_alg_names[]; |
Harald Welte | c8585cf | 2014-06-21 22:28:12 +0200 | [diff] [blame] | 467 | |
| 468 | /* GSM 08.08 3.2.2.85 Paging Information */ |
| 469 | enum gsm0808_paging_info { |
| 470 | GSM0808_PAGINF_FOR_MT_CALL = 0x00, |
| 471 | GSM0808_PAGINF_FOR_SMS = 0x01, |
| 472 | GSM0808_PAGINF_FOR_USSD = 0x02, |
| 473 | }; |
Philipp Maier | 6f725d6 | 2017-03-24 18:03:17 +0100 | [diff] [blame] | 474 | |
| 475 | /* 3GPP TS 48.008 3.2.2.104 Speech Codec */ |
| 476 | struct gsm0808_speech_codec { |
| 477 | bool fi; |
| 478 | bool pi; |
| 479 | bool pt; |
| 480 | bool tf; |
| 481 | uint8_t type; |
| 482 | uint16_t cfg; |
Philipp Maier | 6f725d6 | 2017-03-24 18:03:17 +0100 | [diff] [blame] | 483 | }; |
| 484 | |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 485 | /*! Default speech codec configurations: Some codecs specified with |
Philipp Maier | a9b9276 | 2017-06-02 11:25:28 +0200 | [diff] [blame] | 486 | * struct gsm0808_speech_codec, require a configuration (cfg). The following |
| 487 | * default configuration will configure the codec (RTP) to match the |
| 488 | * configuration that is used on the air interface (Um). |
| 489 | * |
| 490 | * Default values for FR_AMR, HR_AMR and OHR_AMR: |
Philipp Maier | 7e27b14 | 2018-03-22 17:26:46 +0100 | [diff] [blame] | 491 | * See also: 3GPP TS 28.062, Table 7.11.3.1.3-2: Preferred Configurations for |
| 492 | * the Adaptive Multi-Rate Codec Types and 3GPP TS 48.008, Section 3.2.2.103. |
Philipp Maier | a9b9276 | 2017-06-02 11:25:28 +0200 | [diff] [blame] | 493 | * |
| 494 | * Default values for FR_AMR_WB, OFR_AMR_WB and OHR_AMR_WB: |
| 495 | * See also: 3GPP TS 26.103, Table 5.7-1: Allowed Configurations |
| 496 | * for the Adaptive Multi-Rate - Wideband Codec Types */ |
| 497 | enum gsm0808_speech_codec_defaults { |
Philipp Maier | 7e27b14 | 2018-03-22 17:26:46 +0100 | [diff] [blame] | 498 | GSM0808_SC_CFG_DEFAULT_FR_AMR = 0x57ff, |
Philipp Maier | a9b9276 | 2017-06-02 11:25:28 +0200 | [diff] [blame] | 499 | GSM0808_SC_CFG_DEFAULT_HR_AMR = 0x073f, |
Philipp Maier | 7e27b14 | 2018-03-22 17:26:46 +0100 | [diff] [blame] | 500 | GSM0808_SC_CFG_DEFAULT_OHR_AMR = 0x57ff, |
Philipp Maier | a9b9276 | 2017-06-02 11:25:28 +0200 | [diff] [blame] | 501 | GSM0808_SC_CFG_DEFAULT_FR_AMR_WB = 0x01, |
| 502 | GSM0808_SC_CFG_DEFAULT_OFR_AMR_WB = 0x3f, |
| 503 | GSM0808_SC_CFG_DEFAULT_OHR_AMR_WB = 0x01, |
| 504 | }; |
| 505 | |
Philipp Maier | 6f725d6 | 2017-03-24 18:03:17 +0100 | [diff] [blame] | 506 | /* 3GPP TS 48.008 3.2.2.103 Speech Codec List */ |
| 507 | #define SPEECH_CODEC_MAXLEN 255 |
| 508 | struct gsm0808_speech_codec_list { |
| 509 | struct gsm0808_speech_codec codec[SPEECH_CODEC_MAXLEN]; |
| 510 | uint8_t len; |
| 511 | }; |
Philipp Maier | e0c6530 | 2017-03-28 17:05:40 +0200 | [diff] [blame] | 512 | |
| 513 | /* 3GPP TS 48.008 3.2.2.11 Channel Type */ |
| 514 | #define CH_TYPE_PERM_SPCH_MAXLEN 9 |
| 515 | struct gsm0808_channel_type { |
| 516 | uint8_t ch_indctr; |
| 517 | uint8_t ch_rate_type; |
| 518 | uint8_t perm_spch[CH_TYPE_PERM_SPCH_MAXLEN]; |
| 519 | unsigned int perm_spch_len; |
| 520 | }; |
Philipp Maier | 14e76b9 | 2017-03-28 18:36:52 +0200 | [diff] [blame] | 521 | |
| 522 | /* 3GPP TS 48.008 3.2.2.10 Encryption Information */ |
| 523 | #define ENCRY_INFO_KEY_MAXLEN 252 |
| 524 | #define ENCRY_INFO_PERM_ALGO_MAXLEN 8 |
| 525 | struct gsm0808_encrypt_info { |
| 526 | uint8_t perm_algo[ENCRY_INFO_PERM_ALGO_MAXLEN]; |
| 527 | unsigned int perm_algo_len; |
| 528 | uint8_t key[ENCRY_INFO_KEY_MAXLEN]; |
| 529 | unsigned int key_len; |
| 530 | }; |
Philipp Maier | 783047e | 2017-03-29 11:35:50 +0200 | [diff] [blame] | 531 | |
Philipp Maier | 783047e | 2017-03-29 11:35:50 +0200 | [diff] [blame] | 532 | #define CELL_ID_LIST_LAC_MAXLEN 127 |
Stefan Sperling | 11a4d9d | 2018-02-15 18:28:04 +0100 | [diff] [blame] | 533 | /*! |
| 534 | * DEPRECATED: This definition of the cell identifier list is |
| 535 | * insufficient. It cannot support all types of cell identifiers. |
| 536 | * Use struct gsm0808_cell_id_list2 in gsm0808_utils.h instead. |
| 537 | * |
| 538 | * 3GPP TS 48.008 3.2.2.27 Cell Identifier List */ |
Philipp Maier | 783047e | 2017-03-29 11:35:50 +0200 | [diff] [blame] | 539 | struct gsm0808_cell_id_list { |
| 540 | uint8_t id_discr; |
| 541 | uint16_t id_list_lac[CELL_ID_LIST_LAC_MAXLEN]; |
| 542 | unsigned int id_list_len; |
| 543 | }; |
Harald Welte | 2f51684 | 2018-05-29 19:21:03 +0200 | [diff] [blame] | 544 | |
| 545 | /* TS 48.008 3.2.2.116 */ |
| 546 | enum gsm0808_lcls_config { |
| 547 | GSM0808_LCLS_CFG_BOTH_WAY = 0x00, |
| 548 | GSM0808_LCLS_CFG_BOTH_WAY_AND_BICAST_UL = 0x01, |
| 549 | GSM0808_LCLS_CFG_BOTH_WAY_AND_SEND_DL = 0x02, |
| 550 | GSM0808_LCLS_CFG_BOTH_WAY_AND_SEND_DL_BLOCK_LOCAL_DL = 0x03, |
| 551 | GSM0808_LCLS_CFG_BOTH_WAY_AND_BICAST_UL_SEND_DL = 0x04, |
| 552 | GSM0808_LCLS_CFG_BOTH_WAY_AND_BICAST_UL_SEND_DL_BLOCK_LOCAL_DL = 0x05, |
| 553 | }; |
| 554 | |
| 555 | /* TS 48.008 3.2.2.117 */ |
| 556 | enum gsm0808_lcls_control { |
| 557 | GSM0808_LCLS_CSC_CONNECT = 0x00, |
| 558 | GSM0808_LCLS_CSC_DO_NOT_CONNECT = 0x01, |
| 559 | GSM0808_LCLS_CSC_RELEASE_LCLS = 0x02, |
| 560 | GSM0808_LCLS_CSC_BICAST_UL_AT_HANDOVER = 0x03, |
| 561 | GSM0808_LCLS_CSC_BICAST_UL_AND_RECV_DL_AT_HANDOVER = 0x04, |
| 562 | }; |
| 563 | |
| 564 | /* TS 48.008 3.2.2.119 */ |
| 565 | enum gsm0808_lcls_status { |
| 566 | GSM0808_LCLS_STS_NOT_YET_LS = 0x00, |
| 567 | GSM0808_LCLS_STS_NOT_POSSIBLE_LS = 0x01, |
| 568 | GSM0808_LCLS_STS_NO_LONGER_LS = 0x02, |
| 569 | GSM0808_LCLS_STS_REQ_LCLS_NOT_SUPP = 0x03, |
| 570 | GSM0808_LCLS_STS_LOCALLY_SWITCHED = 0x04, |
| 571 | }; |