rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 1 | /***************************************************************************** |
| 2 | * Copyright Statement: |
| 3 | * -------------------- |
| 4 | * This software is protected by Copyright and the information contained |
| 5 | * herein is confidential. The software may not be copied and the information |
| 6 | * contained herein may not be used or disclosed except with the written |
| 7 | * permission of MediaTek Inc. (C) 2012 |
| 8 | * |
| 9 | * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES |
| 10 | * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") |
| 11 | * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON |
| 12 | * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, |
| 13 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF |
| 14 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. |
| 15 | * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE |
| 16 | * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR |
| 17 | * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH |
| 18 | * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO |
| 19 | * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S |
| 20 | * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. |
| 21 | * |
| 22 | * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE |
| 23 | * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, |
| 24 | * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, |
| 25 | * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO |
| 26 | * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. |
| 27 | * |
| 28 | * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE |
| 29 | * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF |
| 30 | * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND |
| 31 | * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER |
| 32 | * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC). |
| 33 | * |
| 34 | *****************************************************************************/ |
| 35 | |
| 36 | /******************************************************************************* |
| 37 | * Filename: |
| 38 | * --------- |
| 39 | * tftlib_common_enum.h |
| 40 | * |
| 41 | * Project: |
| 42 | * -------- |
| 43 | * MOLY |
| 44 | * |
| 45 | * Description: |
| 46 | * ------------ |
| 47 | * TFT library common enum & define constants |
| 48 | * |
| 49 | * Author: |
| 50 | * ------- |
| 51 | * ------- |
| 52 | * |
| 53 | * ========================================================================== |
| 54 | * $Log$ |
| 55 | * |
| 56 | * 08 12 2020 terence.kuo |
| 57 | * [MOLY00557318] [MT6875][Margaux][Q0][R3][MP6][SQC][Internal][WW FT][China][Quzhou][5GMM][MDST][SWIFT][S][CMCC+Invalid][Error times:1]System API Dump,1165,29,99,/data/vendor/core/,1,,mtkrild:AT command pending too long. assert!!! AT cmd: EAPNACT.timer: 900000ms |
| 58 | * . Provide a new API which constructs context for default bearer without tft to TCM. |
| 59 | * |
| 60 | * 04 15 2020 terence.kuo |
| 61 | * [MOLY00508241] Memory reduction - l4 ps cid reduction and reduce maximum number of support flow |
| 62 | * 1. Support setting null for pf_act_list parameter. |
| 63 | * 2. Support qos flow deactivation. |
| 64 | * 3. Record qr's precedence into context in tftlib_set_user_defined_tft() if rate is 5g. |
| 65 | * 4. Add primitive traces to record current applied qr/ tft status for analysis. |
| 66 | * 5. trace enhancement |
| 67 | * |
| 68 | * 04 11 2020 terence.kuo |
| 69 | * [MOLY00508241] Memory reduction - l4 ps cid reduction and reduce maximum number of support flow |
| 70 | * |
| 71 | * . trace enhancement |
| 72 | * |
| 73 | * 04 06 2020 terence.kuo |
| 74 | * [MOLY00508241] Memory reduction - l4 ps cid reduction and reduce maximum number of support flow |
| 75 | * . Add primitive traces to record current applied qr/ tft status for analysis. |
| 76 | * |
| 77 | * 09 23 2019 terence.kuo |
| 78 | * [MOLY00442505] Update for March CR and trace enhancements. |
| 79 | * |
| 80 | * . Update for March CR and trace enhancements. |
| 81 | * |
| 82 | * 09 04 2019 terence.kuo |
| 83 | * [MOLY00434754] Upgrade CGTFT to support 5GC |
| 84 | * |
| 85 | * . Update CGTFT behaviors in tftlib. |
| 86 | * |
| 87 | * 06 26 2019 terence.kuo |
| 88 | * [MOLY00416314] Fix UTMD trace API setting error |
| 89 | * |
| 90 | * . Fix UTMD API setting error. |
| 91 | * |
| 92 | * 04 19 2019 jeffery.chen |
| 93 | * [MOLY00399993] [Gen97][VMOLY] interworking withN26 features |
| 94 | * |
| 95 | * [TFTLIB] two params development. |
| 96 | * |
| 97 | * 03 26 2019 jeffery.chen |
| 98 | * [MOLY00393456] [Gen97][VMOLY] 45G InterRAT & interSystem feature |
| 99 | * |
| 100 | * [TFTLIB] interface part. |
| 101 | * |
| 102 | * 03 26 2019 jeffery.chen |
| 103 | * [MOLY00393456] [Gen97][VMOLY] 45G InterRAT & interSystem feature |
| 104 | * |
| 105 | * [TFTLIB] interface part. |
| 106 | * |
| 107 | * 12 14 2018 jeffery.chen |
| 108 | * [MOLY00372635] [VMOLY] L4/TCM/TFTLIB/VGSM phase2 check-in |
| 109 | * |
| 110 | * [TFTLIB] phase2 check-in. |
| 111 | * |
| 112 | * 09 14 2018 jeffery.chen |
| 113 | * [MOLY00306148] [NAS] pangu giant CR |
| 114 | * |
| 115 | * [TFTLIB] pass 1st NAS MoDIS IT. |
| 116 | * |
| 117 | * 08 28 2018 jeffery.chen |
| 118 | * [MOLY00306148] [NAS] pangu giant CR |
| 119 | * [TFTLIB] fix non-gemini build error. |
| 120 | * |
| 121 | * 08 17 2018 jeffery.chen |
| 122 | * [MOLY00306148] [NAS] pangu giant CR |
| 123 | * [TFTLIB] re-architecture. |
| 124 | * |
| 125 | * 08 17 2018 jeffery.chen |
| 126 | * [MOLY00306148] [NAS] pangu giant CR |
| 127 | * |
| 128 | * [TFTLIB] re-architecture. |
| 129 | * |
| 130 | * 06 27 2018 willy-wj.chen |
| 131 | * [MOLY00330676][SE8 Internal Test][MT3967][UMOLYE][Pre-MTBF][2018/06/01-06/04][ASSERT] file:mcu/protocol/nas_multimode/tft_pf/tft_pf.c line:2078. |
| 132 | * |
| 133 | * 10 16 2016 renhuang.liu |
| 134 | * [MOLY00205035][TFTLIB] Memory management in TFT internal |
| 135 | * |
| 136 | * 11 17 2014 jeffery.chen |
| 137 | * [MOLY00084634] [UMOLY][R10][R11] NAS check-in from 6291_DEV to UMOLY |
| 138 | * [R10][R11] NAS check-in from 6291_DEV to UMOLY |
| 139 | * |
| 140 | * 03 06 2014 joe.chang |
| 141 | * [MOLY00058412] [MOLY] TFT validate revision |
| 142 | * [ESM/TFTLIB] Modification fot "TFT validate" and "PS init deactivation" |
| 143 | * |
| 144 | * 01 29 2014 joe.chang |
| 145 | * [MOLY00055334] [MT6290][SGLTE DSDS] New feature check-in MOLY |
| 146 | * [TFTLIB] Modify compile options for GEMINI (tweak) |
| 147 | * |
| 148 | * 01 29 2014 joe.chang |
| 149 | * [MOLY00055334] [MT6290][SGLTE DSDS] New feature check-in MOLY |
| 150 | * [TFTLIB] Modify compile options for GEMINI |
| 151 | * |
| 152 | * 01 29 2014 joe.chang |
| 153 | * [MOLY00055334] [MT6290][SGLTE DSDS] New feature check-in MOLY |
| 154 | * TFTLIB check-in related interface |
| 155 | * |
| 156 | * 01 21 2014 wcpuser_integrator |
| 157 | * [MOLY00054475] SGLTE option rename |
| 158 | * . |
| 159 | * |
| 160 | * 12 31 2013 joe.chang |
| 161 | * [MOLY00052135] [MT6290] TFT packet filter number handling improvement |
| 162 | * [TFTLIB] Check-in related changes |
| 163 | * |
| 164 | * 12 25 2013 joe.chang |
| 165 | * [MOLY00051497] [MOLY][NRSPCA] NRSPCA phase 2 implementation |
| 166 | * [TFTLIB] Check-in related changes |
| 167 | * |
| 168 | * 11 18 2013 joe.chang |
| 169 | * [MOLY00045033] [MOLY][SM][ESM][TCM][TFT][Custom] NRSPCA(NISPCA) Network Requested/Initiated Secondary PDP Context Activation |
| 170 | * Check-in TFTLIB part |
| 171 | * |
| 172 | * 11 06 2013 joe.chang |
| 173 | * [MOLY00045302] [MT6290][LTE] TFTLIB API update for multi-context project |
| 174 | * Check-in TFTLIB part |
| 175 | * |
| 176 | * 10 31 2013 joe.chang |
| 177 | * [MOLY00044423] [MT6290] New TFT AT command development merge back to MOLY |
| 178 | * check in TFTLIB related change |
| 179 | * |
| 180 | * 10 23 2013 joe.chang |
| 181 | * [MOLY00042307] [klocwork_95][LTE] in tftlib_internal_api.c, line 413 |
| 182 | * [TFTLIB] checkin missing header file |
| 183 | * |
| 184 | * 10 01 2013 moja.hsu |
| 185 | * [MOLY00039686] [MT6290E1][Ericsson][Pre-IOT][MM] TC 7.2.3.4.30 Assert at tft_pf#719 |
| 186 | * drop corrupted fragment v6 packet. |
| 187 | * |
| 188 | * 07 19 2013 joe.chang |
| 189 | * [MOLY00030496] [MT6290][LTE MM][TFTLIB] ASSERT review trace & work around |
| 190 | * add trace error/warning & work around |
| 191 | * |
| 192 | * 06 10 2013 joe.chang |
| 193 | * [MOLY00025286] [MT7208][NW-UE SIM] [TC 10.8.1] AT+CGCMOD Error due to TFT compose issue |
| 194 | * TFTLIB modification for AT+CGTFT interpretation (support both difference set & full set) |
| 195 | * |
| 196 | * 05 27 2013 joe.chang |
| 197 | * [MOLY00023789] [MT6290][TFTLIB] New architecture & EM support |
| 198 | * TFTLIB part check-in |
| 199 | * |
| 200 | * 05 06 2013 joe.chang |
| 201 | * [MOLY00021542] Trace revision merge back to MOLY |
| 202 | * [TFTLIB] revise trace |
| 203 | * |
| 204 | * 04 12 2013 joe.chang |
| 205 | * [MOLY00014197] TFTLIB new feature |
| 206 | * [MT6290][TFTLIB] update TFT parameter list with new structure |
| 207 | * |
| 208 | * 02 05 2013 benjamin.kuo |
| 209 | * [MOLY00009163] LTE Multimode merge back to MOLY |
| 210 | * Rename MT7208 to MT6290 in CR title. |
| 211 | * |
| 212 | * 01 24 2013 joe.chang |
| 213 | * [MOLY00009163] LTE Multimode merge back to MOLY |
| 214 | * TFTLIB merge from PreIT to MOLY trunk |
| 215 | * |
| 216 | * 12 04 2012 joe.chang |
| 217 | * [MOLY00007051] [MT6290][LTE Single Mode] enum rename & memory allocation mechansim change |
| 218 | * |
| 219 | * 11 07 2012 joe.chang |
| 220 | * [MOLY00005322] TATAKA merge to MOLY |
| 221 | * [Joe] TFTLIB part is check in done. |
| 222 | ****************************************************************************/ |
| 223 | |
| 224 | #ifndef TFTLIB_COMMON_ENUM_H_ |
| 225 | #define TFTLIB_COMMON_ENUM_H_ |
| 226 | |
| 227 | #include "ps_public_enum_public.h" |
| 228 | |
| 229 | #define TFTLIB_MAX(x, y) ((x) > (y) ? (x) : (y)) |
| 230 | |
| 231 | /* TFT global setting */ |
| 232 | #define TFTLIB_MAX_FIC_NUM MAX_NUM_OF_SUPPORTED_QOS_FLOW |
| 233 | #define TFTLIB_MAX_QR_NUM_PER_PDUS MAX_NUM_OF_SUPPORTED_QOS_RULE_PER_PDUS |
| 234 | #define TFTLIB_MAX_QR_NUM MAX_NUM_OF_SUPPORTED_QOS_RULE |
| 235 | #define TFTLIB_MAX_RQOS_NUM MAX_NUM_OF_SUPPORTED_RQOS_RULE |
| 236 | //#define TFTLIB_MAX_EPSB_NUM MAX_NUM_OF_SUPPORTED_EPSB |
| 237 | |
| 238 | /* Common define constant */ |
| 239 | #define MAX_PACKET_FILTER_NUM 16 // This number is defined in 3GPP, TS 24.008, 10.5.6.12 |
| 240 | #define MAX_PACKET_FILTER_NUM_IN_TRANSACTION 15 // This number is defined in 3GPP, TS 24.008, 10.5.6.12 |
| 241 | #define MAX_PACKET_FILTER_NUM_SUPPORT_BY_NW 16 // TODO: Modify this to global variable, which can be run-time adjusted |
| 242 | #define MIN_PACKET_FILTER_ID 0 |
| 243 | #define MAX_PACKET_FILTER_ID 15 |
| 244 | |
| 245 | #define MAX_PACKET_FILTER_PRECED_NUM 256 |
| 246 | #define MIN_PACKET_FILTER_PRECED_IDX 0 |
| 247 | #define MAX_PACKET_FILTER_PRECED_IDX 255 |
| 248 | |
| 249 | #define QFI_NOT_FOUND 0xBE |
| 250 | #define NULL_EBI 0 |
| 251 | #define NULL_QRI 0 |
| 252 | |
| 253 | #define TOTAL_QRI_NUM 256 |
| 254 | #define MIN_QRI 0 |
| 255 | #define MAX_QRI 255 |
| 256 | |
| 257 | #define MAX_REMOTE_ADDR_AND_MASK_LEN 32 |
| 258 | #define MAX_LOCAL_ADDR_AND_MASK_LEN 32 |
| 259 | #define MAX_LOCAL_ADDR_AND_PREFIX_LEN 17 |
| 260 | #define MAX_TFT_LEN 255 |
| 261 | #define PACKET_FILTER_ID_LEN 1 |
| 262 | |
| 263 | #define MAX_QOS_RULES_LEN MAX_TFT_LEN * MAX_NUM_OF_SUPPORTED_QOS_RULE_PER_PDUS // 255*8 |
| 264 | |
| 265 | #define TFTLIB_MIN_BEARER_ID 5 |
| 266 | #define TFTLIB_MAX_BEARER_ID 15 |
| 267 | #define TFTLIB_MAX_BEARER_ID_TOTAL_NUM 16 |
| 268 | #define TFTLIB_MAX_BEARER_CTXT_NUM 11 |
| 269 | |
| 270 | #define TFTLIB_MAX_DEACT_LIST_NUM TFTLIB_MAX(TFTLIB_MAX_BEARER_CTXT_NUM, TFTLIB_MAX_QR_NUM) |
| 271 | #define TFTLIB_DEACT_LIST_TOTAL_NUM TFTLIB_MAX(TFTLIB_MAX_BEARER_ID_TOTAL_NUM, TOTAL_QRI_NUM) |
| 272 | |
| 273 | #define TFTLIB_SIM_DONT_CARE 0xFF |
| 274 | |
| 275 | #define TFTLIB_SIM1 0 |
| 276 | #if defined(__GEMINI__) |
| 277 | #define TFTLIB_SIM2 1 |
| 278 | #if (GEMINI_PLUS >= 3) |
| 279 | #define TFTLIB_SIM3 2 |
| 280 | #endif /* GEMINI_PLUS >= 3 */ |
| 281 | #if (GEMINI_PLUS >= 4) |
| 282 | #define TFTLIB_SIM4 3 |
| 283 | #endif /* GEMINI_PLUS >= 4 */ |
| 284 | #endif /* __GEMINI__ */ |
| 285 | |
| 286 | #define TFTLIB_MAX_PF_NUM_IN_POOL 64 //max 8 bearer simultaneously and assume 8 pf for each bearer. |
| 287 | #define TFTLIB_MAX_PF_NUM 256 //max 8 bearer simultaneously and each bearer has 2 TFT (user defined and applied), each TFT has 16 pf; 8*2*16=256 PF |
| 288 | #define TFTLIB_RESERVED_PF_NUM 16 //in tftlib_set_applied_tft(), a new tft_info_struct is duplicated, and extra pf space is required. |
| 289 | #define TFTLIB_MAX_PF_IN_CTRL_BUF_NUM (TFTLIB_MAX_PF_NUM - TFTLIB_MAX_PF_NUM_IN_POOL + TFTLIB_RESERVED_PF_NUM) |
| 290 | #define TFTLIB_MAX_NON_PF_IN_CTRL_BUF_NUM 16 //allocate memory from ctrl buf for other purpose (not PF) |
| 291 | |
| 292 | #define TFTLIB_PF_BITMAP_UNIT 32 //because type of pf_is_occupied is kal_uint32, which is 32 bit |
| 293 | |
| 294 | #define TFTLIB_QOS_RULE_PRECEDENCE_RESERVED 80 |
| 295 | |
| 296 | #define TFTLIB_RQOS_TSTAMP_UINT 200 //ms (time stamp unit) |
| 297 | |
| 298 | /* Packet filter component length (octet) define */ |
| 299 | #define IPV4_REMOTE_ADDR_AND_MASK_LEN 8 |
| 300 | #define IPV4_LOCAL_ADDR_AND_MASK_LEN 8 |
| 301 | #define IPV6_REMOTE_ADDR_AND_MASK_LEN 32 |
| 302 | #define IPV6_REMOTE_ADDR_AND_PREFIX_LEN 17 |
| 303 | #define IPV6_LOCAL_ADDR_AND_MASK_LEN 32 |
| 304 | #define IPV6_LOCAL_ADDR_AND_PREFIX_LEN 17 |
| 305 | #define IPV6_LOCAL_ADDR_LEN 16 |
| 306 | #define IPV6_LOCAL_MASK_LEN 16 |
| 307 | #define IPV6_LOCAL_PREFIX_LEN 1 |
| 308 | #define PROTOCOL_ID_NEXT_HEADER_LEN 1 |
| 309 | #define SINGLE_LOCAL_PORT_LEN 2 |
| 310 | #define LOCAL_PORT_RANGE_LEN 4 |
| 311 | #define SINGLE_REMOTE_PORT_LEN 2 |
| 312 | #define REMOTE_PORT_RANGE_LEN 4 |
| 313 | #define SECURITY_PARAMETER_ID_LEN 4 |
| 314 | #define TYPE_OF_SERVICE_TRAFFIC_CLASS_AND_MASK_LEN 2 |
| 315 | #define FLOW_LABEL_LEN 3 |
| 316 | #define MATCH_ALL_LEN 0 |
| 317 | |
| 318 | /* Parameter list define */ |
| 319 | #define MAX_AUTHTOKEN_FLOWID_NUM 4 // temp max num (TS 24.008 10.5.162 does not restrict its max number...) |
| 320 | #define MAX_PARAMETER_LIST_NUM 16 |
| 321 | #define MAX_PARAMETER_LIST_SIZE 255 |
| 322 | #define MAX_AUTHORIZATION_TOKEN_LEN 16 // temp max length (it could be very long...) |
| 323 | #define MAX_FLOW_IDENTIFIER_NUM 4 // temp max num (TS 24.008 10.5.162 does not restrict its max number...) |
| 324 | #define FLOW_IDENTIFIER_LEN 4 |
| 325 | |
| 326 | /* Temp define constant */ |
| 327 | #define MAX_PF_COMP_TYPE_NUM 15 |
| 328 | #define MAX_PACKET_FILTER_CONTENT_LEN 47 |
| 329 | #define MAX_TFT_PDU_ENCODE_LEN 1500 |
| 330 | |
| 331 | /* define constants for BITMAP */ |
| 332 | #define BMP_NONE 0x00000000 |
| 333 | #define BMP_V4_ADDR 0x00000001 |
| 334 | #define BMP_V6_ADDR 0x00000002 |
| 335 | #define BMP_PROTOCOL 0x00000004 |
| 336 | #define BMP_LOCAL_PORT_SINGLE 0x00000008 |
| 337 | #define BMP_LOCAL_PORT_RANGE 0x00000010 |
| 338 | #define BMP_REMOTE_PORT_SINGLE 0x00000020 |
| 339 | #define BMP_REMOTE_PORT_RANGE 0x00000040 |
| 340 | #define BMP_SPI 0x00000080 |
| 341 | #define BMP_TOS 0x00000100 |
| 342 | #define BMP_FLOW_LABEL 0x00000200 |
| 343 | #define BMP_V4_LOCAL_ADDR 0x00000400 |
| 344 | #define BMP_V6_LOCAL_ADDR 0x00000800 |
| 345 | #define BMP_MATCH_ALL 0x00001000 |
| 346 | #define BMP_EMPTY_TCP_ACK 0x80000000 |
| 347 | #define BMP_IP_FRAGMENT 0x40000000 |
| 348 | #define BMP_IP_FRAGMENT_FIRST 0x01000000 |
| 349 | #define BMP_IP_FRAGMENT_MID 0x02000000 |
| 350 | #define BMP_IP_FRAGMENT_LAST 0x04000000 |
| 351 | #define BMP_IP_FRAGMENT_NOT 0x08000000 |
| 352 | #define BMP_CORRUPTED 0x20000000 |
| 353 | |
| 354 | /* enum declaration */ |
| 355 | typedef enum { |
| 356 | TFT_CTXT_TYPE_DEFINED_TFT = 0, |
| 357 | TFT_CTXT_TYPE_APPLIED_TFT, |
| 358 | TFT_CTXT_TYPE_APPLIED_QR, |
| 359 | TFT_CTXT_TYPE_APPLIED_RQOS, |
| 360 | TFT_CTXT_TYPE_DEFINED_QR, |
| 361 | TFT_CTXT_TYPE_ALL |
| 362 | } tft_ctxt_type_enum; |
| 363 | |
| 364 | typedef enum { |
| 365 | TFT_PROC_DIR_NONE = 0, // 0x00 |
| 366 | TFT_PROC_DIR_MO, // 0x01 |
| 367 | TFT_PROC_DIR_MT, // 0x02 |
| 368 | } tft_proc_dir_enum; |
| 369 | |
| 370 | typedef enum { |
| 371 | TFT_BEARER_NO_ACTION = 0, // 0x00 |
| 372 | TFT_BEARER_ACTIVATION, // 0x01 |
| 373 | TFT_BEARER_MODIFICATION, // 0x02 |
| 374 | TFT_BEARER_DEACTIVATION // 0x03 |
| 375 | } tft_bearer_act_enum; |
| 376 | |
| 377 | // pdus mod |
| 378 | // flow act/ deact |
| 379 | typedef enum { |
| 380 | VG_ACT_NO_ACTION = 0, |
| 381 | VG_ACT_PDUS_MOD, |
| 382 | VG_ACT_QOS_FLOW_ACTIVATION, |
| 383 | VG_ACT_QOS_FLOW_DEACTIVATION |
| 384 | } vg_act_enum; |
| 385 | |
| 386 | typedef enum { |
| 387 | TFT_CHECK_PASS = 1, // (0x01) Validate pass |
| 388 | TFT_CHECK_FAILED_SEMANTIC_ERROR_IN_TFT, // (0x02) Validate error, SM/ESM should reject the procedure with cause "Semantic errors in TFT operations (#41)" |
| 389 | TFT_CHECK_FAILED_SYNTACTICAL_ERROR_IN_TFT, // (0x03) Validate error, SM/ESM should reject the procedure with cause "Syntactical errors in TFT operations (#42)" |
| 390 | TFT_CHECK_FAILED_SEMANTIC_ERROR_IN_PF, // (0x04) Validate error, SM/ESM should reject the procedure with cause "Semantic errors in packet filters (#44)" |
| 391 | TFT_CHECK_FAILED_SYNTACTICAL_ERROR_IN_PF, // (0x05) Validate error, SM/ESM should reject the procedure with cause "Syntactical errors in packet filters (#45)" |
| 392 | TFT_CHECK_FAILED_BCM_VIOLATION, // (0x06) Validate error, SM should reject the procedure with cause "Bearer Control Mode violation (#48)" |
| 393 | |
| 394 | TFT_CHECK_FAILED_SEMANTIC_ERROR_IN_QOS_OPERATION, //#83 |
| 395 | TFT_CHECK_FAILED_SYNTACTICAL_ERROR_IN_QOS_OPERATION, //#84 |
| 396 | |
| 397 | TFT_CHECK_FAILED_INSUFFICIENT_RESOURCES, |
| 398 | TFT_CHECK_FAILED_SERIOUS_ERROR, |
| 399 | |
| 400 | } tft_validate_result_enum; |
| 401 | |
| 402 | typedef enum { |
| 403 | TFT_FAIL_ACTION_NONE = 0, |
| 404 | TFT_FAIL_ACTION_RELEASE_PDUS, |
| 405 | TFT_FAIL_ACTION_MODIFICATION_REJECT, |
| 406 | TFT_FAIL_ACTION_DELETE_QR, |
| 407 | |
| 408 | } tft_fail_action_enum; |
| 409 | |
| 410 | typedef enum |
| 411 | { |
| 412 | PF_ACT_NONE = 0, |
| 413 | PF_ACT_ADD = 1, |
| 414 | PF_ACT_MOD = 2, |
| 415 | PF_ACT_DEL = 3, |
| 416 | PF_ACT_DEL_ALL = 4, |
| 417 | PF_ACT_DEL_BEARER = 5, |
| 418 | PF_ACT_REPLACE_QFI = 6 |
| 419 | }pkt_filter_act_enum; |
| 420 | |
| 421 | typedef enum |
| 422 | { |
| 423 | PF_DIRECTION_PRE_REL7_TFT = 0x00, |
| 424 | PF_DIRECTION_DL_ONLY = 0x01, |
| 425 | PF_DIRECTION_UL_ONLY = 0x02, |
| 426 | PF_DIRECTION_BIDIRECTION = 0x03, |
| 427 | }pf_direction_enum; |
| 428 | |
| 429 | typedef enum |
| 430 | { |
| 431 | PF_OWN_ENTITY_NONE = 0, |
| 432 | PF_OWN_ENTITY_UE, |
| 433 | PF_OWN_ENTITY_NW |
| 434 | }pf_own_entity_enum; |
| 435 | |
| 436 | typedef enum { |
| 437 | TFT_OPCODE_SPARE = 0, // (0x00) Spare = (5G) Reserved |
| 438 | TFT_OPCODE_CREATE_NEW_TFT, // (0x01) Create new TFT = (5G) Create new QoS rule |
| 439 | TFT_OPCODE_DELETE_TFT, // (0x02) Delete existing TFT = (5G) Delete existing QoS rule |
| 440 | TFT_OPCODE_ADD_PF, // (0x03) Add packet filters to existing TFT = (5G) Modify existing QoS rule and add packet filters |
| 441 | TFT_OPCODE_REPLACE_PF, // (0x04) Replace packet filters in existing TFT = (5G) Modify existing QoS rule and replace all packet filters |
| 442 | TFT_OPCODE_DELETE_PF, // (0x05) Delete packet filters from existing TFT = (5G) Modify existing QoS rule and delete packet filters |
| 443 | TFT_OPCODE_NOTFT_OP, // (0x06) No TFT operation = (5G) Modify existing QoS rule without modifying packtet filters |
| 444 | TFT_OPCODE_RESERVED // (0x07) Reserved |
| 445 | } tft_operation_enum; |
| 446 | |
| 447 | typedef enum { |
| 448 | PF_COMP_ID_MATCH_ALL = 0x01, // new for 5G |
| 449 | PF_COMP_ID_IPV4_REMOTE_ADDR = 0x10, |
| 450 | PF_COMP_ID_IPV4_LOCAL_ADDR = 0x11, |
| 451 | PF_COMP_ID_IPV6_REMOTE_ADDR = 0x20, |
| 452 | PF_COMP_ID_IPV6_REMOTE_ADDR_PREFIX_LENGTH = 0x21, |
| 453 | PF_COMP_ID_IPV6_LOCAL_ADDR_PREFIX_LENGTH = 0x23, |
| 454 | PF_COMP_ID_PROTOCOL_ID_NEXT_HEADER = 0x30, |
| 455 | PF_COMP_ID_SINGLE_LOCAL_PORT = 0x40, |
| 456 | PF_COMP_ID_LOCAL_PORT_RANGE = 0x41, |
| 457 | PF_COMP_ID_SINGLE_REMOTE_PORT = 0x50, |
| 458 | PF_COMP_ID_REMOTE_PORT_RANGE = 0x51, |
| 459 | PF_COMP_ID_SECURITY_PARAMETER_ID = 0x60, |
| 460 | PF_COMP_ID_TYPE_OF_SERVICE_TRAFFIC_CLASS = 0x70, |
| 461 | PF_COMP_ID_FLOW_LABEL = 0x80, |
| 462 | PF_COMP_ID_DESTINATION_MAC_ADDR = 0x81, // new for 5G, however, Not supported now |
| 463 | PF_COMP_ID_SOURCE_MAC_ADDR = 0x82, // new for 5G, however, Not supported now |
| 464 | PF_COMP_ID_802_1Q_C_TAG_VID = 0x83, // new for 5G, however, Not supported now |
| 465 | PF_COMP_ID_802_1Q_S_TAG_VID = 0x84, // new for 5G, however, Not supported now |
| 466 | PF_COMP_ID_802_1Q_C_TAG_PCP_DEI = 0x85, // new for 5G, however, Not supported now |
| 467 | PF_COMP_ID_802_1Q_S_TAG_PCP_DEI = 0x86, // new for 5G, however, Not supported now |
| 468 | PF_COMP_ID_ETHERTYPE = 0x87, // new for 5G, however, Not supported now |
| 469 | } pf_comp_id_enum; |
| 470 | |
| 471 | typedef enum { |
| 472 | TFT_PARA_LIST_ID_UNDEFINED = 0x00, // (0x00) Undefined (not defined in spec 24.008) |
| 473 | TFT_PARA_LIST_ID_AUTH_TOKEN = 0x01, // (0x01) Authorization token |
| 474 | TFT_PARA_LIST_ID_FLOW_ID = 0x02, // (0x02) Flow identifier |
| 475 | TFT_PARA_LIST_ID_PF_ID = 0x03 // (0x03) Packet filter identifier |
| 476 | } tft_para_list_id_enum; |
| 477 | |
| 478 | typedef enum { |
| 479 | BEARER_TYPE_UNKNOWN = 0, |
| 480 | BEARER_TYPE_PRIMARY_PDP, // (2G/3G) PRIMARY PDP CONTEXT |
| 481 | BEARER_TYPE_SECONDARY_PDP, // (2G/3G) SECONDARY PDP CONTEXT |
| 482 | BEARER_TYPE_DEFAULT_BEARER, // (LTE) DEFAULT EPS BEARER |
| 483 | BEARER_TYPE_DEDICATED_BEARER, // (LTE) DEDICATED EPS BEARER |
| 484 | BEARER_TYPE_QOS_FLOW // (5G) QoS Flow |
| 485 | } bearer_type_enum; |
| 486 | |
| 487 | typedef enum { |
| 488 | RAT_IND_2G3G = 1, // 0x01 |
| 489 | RAT_IND_LTE, // 0x02 |
| 490 | RAT_IND_234G, // 0x03 |
| 491 | RAT_IND_5G // 0x04 |
| 492 | } rat_ind_enum; |
| 493 | |
| 494 | typedef enum { |
| 495 | TFT_COMPOSE_TYPE_NONE = 0, // Reserved value |
| 496 | TFT_COMPOSE_TYPE_MOD_TFT, // Only TFT is requested to be modified |
| 497 | TFT_COMPOSE_TYPE_MOD_QOS, // Only QoS is requested to be modified |
| 498 | TFT_COMPOSE_TYPE_MOD_TFT_QOS, // Both TFT and QoS are requested to be modified |
| 499 | TFT_COMPOSE_TYPE_UNDEFINE_TFT, // TFT is requested to be undefined (deleted) |
| 500 | TFT_COMPOSE_TYPE_DEL_EPSB // [LTE only] Dedicated EPS bearer is requested to be deactivated |
| 501 | } tft_compose_type_enum; |
| 502 | |
| 503 | /* DHL trace use */ |
| 504 | typedef enum { |
| 505 | TFTLIB_TFT_DECODE = 0, |
| 506 | TFTLIB_TFT_ENCODE, |
| 507 | TFTLIB_TFT_DIR_EXTRACT, |
| 508 | TFTLIB_SET_APPLIED_TFT, |
| 509 | TFTLIB_SET_APPLIED_QR, |
| 510 | TFTLIB_COMPOSE_TFT_TO_NW, |
| 511 | TFTLIB_DEL_TFT, |
| 512 | TFTLIB_DEL_QR, |
| 513 | TFTLIB_GET_USER_DEFINED_TFT, |
| 514 | TFTLIB_GET_APPLIED_TFT, |
| 515 | TFTLIB_SET_USER_DEFINED_TFT, |
| 516 | TFTLIB_SET_USR_DELPF, |
| 517 | TFTLIB_GET_USR_DELPF, |
| 518 | TFTLIB_CLEAR_USR_DELPF, |
| 519 | TFTLIB_SET_USR_LNKPF, |
| 520 | TFTLIB_GET_USR_LNKPF, |
| 521 | TFTLIB_CLEAR_USR_LNKPF, |
| 522 | TFTLIB_REL_PF, |
| 523 | UPDATE_TFT, |
| 524 | TFT_DECODE, |
| 525 | TFT_ENCODE, |
| 526 | PF_CONTENT_DECODE, |
| 527 | TFT_COMPOSE, |
| 528 | PF_FIELD_CHECK, |
| 529 | PF_COMP_CHECK, |
| 530 | TFT_EMPTY_COLLISION_CHECK, |
| 531 | PF_PRECEDENCE_COLLISION_CHECK, |
| 532 | COMPOSE_PF_ACT_LIST, |
| 533 | COMPOSE_BEARER_DEACT_LIST, |
| 534 | BCM_RESTRICT_CHK, |
| 535 | TFTLIB_TFT_GET_PC_ACT_LIST, |
| 536 | TFTLIB_GET_APPLIED_QR, |
| 537 | |
| 538 | TFTLIB_QRS_PRECHECK, |
| 539 | TFTLIB_QR_LENGTH_DECODE, |
| 540 | TFTLIB_BACKUP_APPLIED_QR, |
| 541 | TFTLIB_RESOTRE_APPLIED_QR, |
| 542 | TFTLIB_DEL_APPLIED_QR_BY_PSI, |
| 543 | TFTLIB_DEL_APPLIED_QR_BY_PSI_QRI, |
| 544 | TFTLIB_DEL_APPLIED_QR_BY_PSI_QFI, |
| 545 | TFTLIB_DEL_APPLIED_TFT_BY_EBI, |
| 546 | TFTLIB_SET_CID_FOR_APPLIED_QR, |
| 547 | |
| 548 | TFTLIB_SET_APPLIED_TFT_BY_EBI, |
| 549 | TFTLIB_SET_CID_FOR_APPLIED_TFT, |
| 550 | TFTLIB_UPDATE_DEACT_QR_LIST_TO_DEL_QF, |
| 551 | TFTLIB_CONSTRUCT_CONTEXT_FOR_DEFAULT_BEARER_WO_TFT, |
| 552 | |
| 553 | } tftlib_trc_func_name_enum; |
| 554 | |
| 555 | typedef enum { |
| 556 | TFT_PTR = 0, |
| 557 | TFT_RAW_PTR, |
| 558 | PF_ACT_LIST, |
| 559 | PF_PTR, |
| 560 | DEACT_BEARER_LIST, |
| 561 | COMPOSED_TFT_PTR |
| 562 | } tftlib_trc_func_arg_name_enum; |
| 563 | |
| 564 | typedef enum { |
| 565 | SOURCE_TFT = 0, |
| 566 | SOURCE_TFT_RAW, |
| 567 | DECODED_TFT, |
| 568 | ENCODED_TFT_RAW, |
| 569 | ENCODED_QRS_RAW, |
| 570 | COMPOSED_TFT, |
| 571 | EXTRACTED_TFT, |
| 572 | CURRENT_USER_DEFINED_TFT, |
| 573 | UPDATED_USER_DEFINED_TFT, |
| 574 | CURRENT_APPLIED_TFT, |
| 575 | UPDATED_APPLIED_TFT, |
| 576 | USER_REQUEST_CGTFT, |
| 577 | CURRENT_APPLIED_QR, |
| 578 | CURRENT_APPLIED_RQOS |
| 579 | } tftlib_trc_tft_type_enum; |
| 580 | |
| 581 | typedef enum { |
| 582 | TFTLIB_TRC_PARA_TYPE_NONE = 0, |
| 583 | TFTLIB_TRC_PARA_TYPE_FUNC_ARG_IN, |
| 584 | TFTLIB_TRC_PARA_TYPE_FUNC_ARG_OUT, |
| 585 | TFTLIB_TRC_PARA_TYPE_INTERNAL_FUNC_ARG_OUT, |
| 586 | TFTLIB_TRC_PARA_TYPE_TFT_CONTEXT |
| 587 | } tftlib_trc_para_type_enum; |
| 588 | |
| 589 | typedef enum { |
| 590 | QF_HAS_NO_RULE = 0, |
| 591 | QF_HAS_DEFAULT_RULE = 1, |
| 592 | QF_HAS_ONLY_NON_DEFAULT_RULE = 2 |
| 593 | } tftlib_qf_has_rule_enum; |
| 594 | |
| 595 | typedef enum { |
| 596 | QOS_RULE_LEN_TYPE_NO_PRECEDENCE_QFI, |
| 597 | QOS_RULE_LEN_TYPE_WITH_PRECEDENCE_QFI, |
| 598 | QOS_RULE_LEN_TYPE_WITH_PRECEDENCE, |
| 599 | } qos_rule_len_type; |
| 600 | |
| 601 | #endif /* TFTLIB_COMMON_ENUM_H_ */ |