| /***************************************************************************** |
| * Copyright Statement: |
| * -------------------- |
| * This software is protected by Copyright and the information contained |
| * herein is confidential. The software may not be copied and the information |
| * contained herein may not be used or disclosed except with the written |
| * permission of MediaTek Inc. (C) 2012 |
| * |
| * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES |
| * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") |
| * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON |
| * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, |
| * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF |
| * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. |
| * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE |
| * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR |
| * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH |
| * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO |
| * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S |
| * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. |
| * |
| * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE |
| * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, |
| * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, |
| * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO |
| * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. |
| * |
| * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE |
| * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF |
| * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND |
| * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER |
| * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC). |
| * |
| *****************************************************************************/ |
| |
| /******************************************************************************* |
| * Filename: |
| * --------- |
| * tftlib_common_enum.h |
| * |
| * Project: |
| * -------- |
| * MOLY |
| * |
| * Description: |
| * ------------ |
| * TFT library common enum & define constants |
| * |
| * Author: |
| * ------- |
| * ------- |
| * |
| * ========================================================================== |
| * $Log$ |
| * |
| * 08 12 2020 terence.kuo |
| * [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 |
| * . Provide a new API which constructs context for default bearer without tft to TCM. |
| * |
| * 04 15 2020 terence.kuo |
| * [MOLY00508241] Memory reduction - l4 ps cid reduction and reduce maximum number of support flow |
| * 1. Support setting null for pf_act_list parameter. |
| * 2. Support qos flow deactivation. |
| * 3. Record qr's precedence into context in tftlib_set_user_defined_tft() if rate is 5g. |
| * 4. Add primitive traces to record current applied qr/ tft status for analysis. |
| * 5. trace enhancement |
| * |
| * 04 11 2020 terence.kuo |
| * [MOLY00508241] Memory reduction - l4 ps cid reduction and reduce maximum number of support flow |
| * |
| * . trace enhancement |
| * |
| * 04 06 2020 terence.kuo |
| * [MOLY00508241] Memory reduction - l4 ps cid reduction and reduce maximum number of support flow |
| * . Add primitive traces to record current applied qr/ tft status for analysis. |
| * |
| * 09 23 2019 terence.kuo |
| * [MOLY00442505] Update for March CR and trace enhancements. |
| * |
| * . Update for March CR and trace enhancements. |
| * |
| * 09 04 2019 terence.kuo |
| * [MOLY00434754] Upgrade CGTFT to support 5GC |
| * |
| * . Update CGTFT behaviors in tftlib. |
| * |
| * 06 26 2019 terence.kuo |
| * [MOLY00416314] Fix UTMD trace API setting error |
| * |
| * . Fix UTMD API setting error. |
| * |
| * 04 19 2019 jeffery.chen |
| * [MOLY00399993] [Gen97][VMOLY] interworking withN26 features |
| * |
| * [TFTLIB] two params development. |
| * |
| * 03 26 2019 jeffery.chen |
| * [MOLY00393456] [Gen97][VMOLY] 45G InterRAT & interSystem feature |
| * |
| * [TFTLIB] interface part. |
| * |
| * 03 26 2019 jeffery.chen |
| * [MOLY00393456] [Gen97][VMOLY] 45G InterRAT & interSystem feature |
| * |
| * [TFTLIB] interface part. |
| * |
| * 12 14 2018 jeffery.chen |
| * [MOLY00372635] [VMOLY] L4/TCM/TFTLIB/VGSM phase2 check-in |
| * |
| * [TFTLIB] phase2 check-in. |
| * |
| * 09 14 2018 jeffery.chen |
| * [MOLY00306148] [NAS] pangu giant CR |
| * |
| * [TFTLIB] pass 1st NAS MoDIS IT. |
| * |
| * 08 28 2018 jeffery.chen |
| * [MOLY00306148] [NAS] pangu giant CR |
| * [TFTLIB] fix non-gemini build error. |
| * |
| * 08 17 2018 jeffery.chen |
| * [MOLY00306148] [NAS] pangu giant CR |
| * [TFTLIB] re-architecture. |
| * |
| * 08 17 2018 jeffery.chen |
| * [MOLY00306148] [NAS] pangu giant CR |
| * |
| * [TFTLIB] re-architecture. |
| * |
| * 06 27 2018 willy-wj.chen |
| * [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. |
| * |
| * 10 16 2016 renhuang.liu |
| * [MOLY00205035][TFTLIB] Memory management in TFT internal |
| * |
| * 11 17 2014 jeffery.chen |
| * [MOLY00084634] [UMOLY][R10][R11] NAS check-in from 6291_DEV to UMOLY |
| * [R10][R11] NAS check-in from 6291_DEV to UMOLY |
| * |
| * 03 06 2014 joe.chang |
| * [MOLY00058412] [MOLY] TFT validate revision |
| * [ESM/TFTLIB] Modification fot "TFT validate" and "PS init deactivation" |
| * |
| * 01 29 2014 joe.chang |
| * [MOLY00055334] [MT6290][SGLTE DSDS] New feature check-in MOLY |
| * [TFTLIB] Modify compile options for GEMINI (tweak) |
| * |
| * 01 29 2014 joe.chang |
| * [MOLY00055334] [MT6290][SGLTE DSDS] New feature check-in MOLY |
| * [TFTLIB] Modify compile options for GEMINI |
| * |
| * 01 29 2014 joe.chang |
| * [MOLY00055334] [MT6290][SGLTE DSDS] New feature check-in MOLY |
| * TFTLIB check-in related interface |
| * |
| * 01 21 2014 wcpuser_integrator |
| * [MOLY00054475] SGLTE option rename |
| * . |
| * |
| * 12 31 2013 joe.chang |
| * [MOLY00052135] [MT6290] TFT packet filter number handling improvement |
| * [TFTLIB] Check-in related changes |
| * |
| * 12 25 2013 joe.chang |
| * [MOLY00051497] [MOLY][NRSPCA] NRSPCA phase 2 implementation |
| * [TFTLIB] Check-in related changes |
| * |
| * 11 18 2013 joe.chang |
| * [MOLY00045033] [MOLY][SM][ESM][TCM][TFT][Custom] NRSPCA(NISPCA) Network Requested/Initiated Secondary PDP Context Activation |
| * Check-in TFTLIB part |
| * |
| * 11 06 2013 joe.chang |
| * [MOLY00045302] [MT6290][LTE] TFTLIB API update for multi-context project |
| * Check-in TFTLIB part |
| * |
| * 10 31 2013 joe.chang |
| * [MOLY00044423] [MT6290] New TFT AT command development merge back to MOLY |
| * check in TFTLIB related change |
| * |
| * 10 23 2013 joe.chang |
| * [MOLY00042307] [klocwork_95][LTE] in tftlib_internal_api.c, line 413 |
| * [TFTLIB] checkin missing header file |
| * |
| * 10 01 2013 moja.hsu |
| * [MOLY00039686] [MT6290E1][Ericsson][Pre-IOT][MM] TC 7.2.3.4.30 Assert at tft_pf#719 |
| * drop corrupted fragment v6 packet. |
| * |
| * 07 19 2013 joe.chang |
| * [MOLY00030496] [MT6290][LTE MM][TFTLIB] ASSERT review trace & work around |
| * add trace error/warning & work around |
| * |
| * 06 10 2013 joe.chang |
| * [MOLY00025286] [MT7208][NW-UE SIM] [TC 10.8.1] AT+CGCMOD Error due to TFT compose issue |
| * TFTLIB modification for AT+CGTFT interpretation (support both difference set & full set) |
| * |
| * 05 27 2013 joe.chang |
| * [MOLY00023789] [MT6290][TFTLIB] New architecture & EM support |
| * TFTLIB part check-in |
| * |
| * 05 06 2013 joe.chang |
| * [MOLY00021542] Trace revision merge back to MOLY |
| * [TFTLIB] revise trace |
| * |
| * 04 12 2013 joe.chang |
| * [MOLY00014197] TFTLIB new feature |
| * [MT6290][TFTLIB] update TFT parameter list with new structure |
| * |
| * 02 05 2013 benjamin.kuo |
| * [MOLY00009163] LTE Multimode merge back to MOLY |
| * Rename MT7208 to MT6290 in CR title. |
| * |
| * 01 24 2013 joe.chang |
| * [MOLY00009163] LTE Multimode merge back to MOLY |
| * TFTLIB merge from PreIT to MOLY trunk |
| * |
| * 12 04 2012 joe.chang |
| * [MOLY00007051] [MT6290][LTE Single Mode] enum rename & memory allocation mechansim change |
| * |
| * 11 07 2012 joe.chang |
| * [MOLY00005322] TATAKA merge to MOLY |
| * [Joe] TFTLIB part is check in done. |
| ****************************************************************************/ |
| |
| #ifndef TFTLIB_COMMON_ENUM_H_ |
| #define TFTLIB_COMMON_ENUM_H_ |
| |
| #include "ps_public_enum_public.h" |
| |
| #define TFTLIB_MAX(x, y) ((x) > (y) ? (x) : (y)) |
| |
| /* TFT global setting */ |
| #define TFTLIB_MAX_FIC_NUM MAX_NUM_OF_SUPPORTED_QOS_FLOW |
| #define TFTLIB_MAX_QR_NUM_PER_PDUS MAX_NUM_OF_SUPPORTED_QOS_RULE_PER_PDUS |
| #define TFTLIB_MAX_QR_NUM MAX_NUM_OF_SUPPORTED_QOS_RULE |
| #define TFTLIB_MAX_RQOS_NUM MAX_NUM_OF_SUPPORTED_RQOS_RULE |
| //#define TFTLIB_MAX_EPSB_NUM MAX_NUM_OF_SUPPORTED_EPSB |
| |
| /* Common define constant */ |
| #define MAX_PACKET_FILTER_NUM 16 // This number is defined in 3GPP, TS 24.008, 10.5.6.12 |
| #define MAX_PACKET_FILTER_NUM_IN_TRANSACTION 15 // This number is defined in 3GPP, TS 24.008, 10.5.6.12 |
| #define MAX_PACKET_FILTER_NUM_SUPPORT_BY_NW 16 // TODO: Modify this to global variable, which can be run-time adjusted |
| #define MIN_PACKET_FILTER_ID 0 |
| #define MAX_PACKET_FILTER_ID 15 |
| |
| #define MAX_PACKET_FILTER_PRECED_NUM 256 |
| #define MIN_PACKET_FILTER_PRECED_IDX 0 |
| #define MAX_PACKET_FILTER_PRECED_IDX 255 |
| |
| #define QFI_NOT_FOUND 0xBE |
| #define NULL_EBI 0 |
| #define NULL_QRI 0 |
| |
| #define TOTAL_QRI_NUM 256 |
| #define MIN_QRI 0 |
| #define MAX_QRI 255 |
| |
| #define MAX_REMOTE_ADDR_AND_MASK_LEN 32 |
| #define MAX_LOCAL_ADDR_AND_MASK_LEN 32 |
| #define MAX_LOCAL_ADDR_AND_PREFIX_LEN 17 |
| #define MAX_TFT_LEN 255 |
| #define PACKET_FILTER_ID_LEN 1 |
| |
| #define MAX_QOS_RULES_LEN MAX_TFT_LEN * MAX_NUM_OF_SUPPORTED_QOS_RULE_PER_PDUS // 255*8 |
| |
| #define TFTLIB_MIN_BEARER_ID 5 |
| #define TFTLIB_MAX_BEARER_ID 15 |
| #define TFTLIB_MAX_BEARER_ID_TOTAL_NUM 16 |
| #define TFTLIB_MAX_BEARER_CTXT_NUM 11 |
| |
| #define TFTLIB_MAX_DEACT_LIST_NUM TFTLIB_MAX(TFTLIB_MAX_BEARER_CTXT_NUM, TFTLIB_MAX_QR_NUM) |
| #define TFTLIB_DEACT_LIST_TOTAL_NUM TFTLIB_MAX(TFTLIB_MAX_BEARER_ID_TOTAL_NUM, TOTAL_QRI_NUM) |
| |
| #define TFTLIB_SIM_DONT_CARE 0xFF |
| |
| #define TFTLIB_SIM1 0 |
| #if defined(__GEMINI__) |
| #define TFTLIB_SIM2 1 |
| #if (GEMINI_PLUS >= 3) |
| #define TFTLIB_SIM3 2 |
| #endif /* GEMINI_PLUS >= 3 */ |
| #if (GEMINI_PLUS >= 4) |
| #define TFTLIB_SIM4 3 |
| #endif /* GEMINI_PLUS >= 4 */ |
| #endif /* __GEMINI__ */ |
| |
| #define TFTLIB_MAX_PF_NUM_IN_POOL 64 //max 8 bearer simultaneously and assume 8 pf for each bearer. |
| #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 |
| #define TFTLIB_RESERVED_PF_NUM 16 //in tftlib_set_applied_tft(), a new tft_info_struct is duplicated, and extra pf space is required. |
| #define TFTLIB_MAX_PF_IN_CTRL_BUF_NUM (TFTLIB_MAX_PF_NUM - TFTLIB_MAX_PF_NUM_IN_POOL + TFTLIB_RESERVED_PF_NUM) |
| #define TFTLIB_MAX_NON_PF_IN_CTRL_BUF_NUM 16 //allocate memory from ctrl buf for other purpose (not PF) |
| |
| #define TFTLIB_PF_BITMAP_UNIT 32 //because type of pf_is_occupied is kal_uint32, which is 32 bit |
| |
| #define TFTLIB_QOS_RULE_PRECEDENCE_RESERVED 80 |
| |
| #define TFTLIB_RQOS_TSTAMP_UINT 200 //ms (time stamp unit) |
| |
| /* Packet filter component length (octet) define */ |
| #define IPV4_REMOTE_ADDR_AND_MASK_LEN 8 |
| #define IPV4_LOCAL_ADDR_AND_MASK_LEN 8 |
| #define IPV6_REMOTE_ADDR_AND_MASK_LEN 32 |
| #define IPV6_REMOTE_ADDR_AND_PREFIX_LEN 17 |
| #define IPV6_LOCAL_ADDR_AND_MASK_LEN 32 |
| #define IPV6_LOCAL_ADDR_AND_PREFIX_LEN 17 |
| #define IPV6_LOCAL_ADDR_LEN 16 |
| #define IPV6_LOCAL_MASK_LEN 16 |
| #define IPV6_LOCAL_PREFIX_LEN 1 |
| #define PROTOCOL_ID_NEXT_HEADER_LEN 1 |
| #define SINGLE_LOCAL_PORT_LEN 2 |
| #define LOCAL_PORT_RANGE_LEN 4 |
| #define SINGLE_REMOTE_PORT_LEN 2 |
| #define REMOTE_PORT_RANGE_LEN 4 |
| #define SECURITY_PARAMETER_ID_LEN 4 |
| #define TYPE_OF_SERVICE_TRAFFIC_CLASS_AND_MASK_LEN 2 |
| #define FLOW_LABEL_LEN 3 |
| #define MATCH_ALL_LEN 0 |
| |
| /* Parameter list define */ |
| #define MAX_AUTHTOKEN_FLOWID_NUM 4 // temp max num (TS 24.008 10.5.162 does not restrict its max number...) |
| #define MAX_PARAMETER_LIST_NUM 16 |
| #define MAX_PARAMETER_LIST_SIZE 255 |
| #define MAX_AUTHORIZATION_TOKEN_LEN 16 // temp max length (it could be very long...) |
| #define MAX_FLOW_IDENTIFIER_NUM 4 // temp max num (TS 24.008 10.5.162 does not restrict its max number...) |
| #define FLOW_IDENTIFIER_LEN 4 |
| |
| /* Temp define constant */ |
| #define MAX_PF_COMP_TYPE_NUM 15 |
| #define MAX_PACKET_FILTER_CONTENT_LEN 47 |
| #define MAX_TFT_PDU_ENCODE_LEN 1500 |
| |
| /* define constants for BITMAP */ |
| #define BMP_NONE 0x00000000 |
| #define BMP_V4_ADDR 0x00000001 |
| #define BMP_V6_ADDR 0x00000002 |
| #define BMP_PROTOCOL 0x00000004 |
| #define BMP_LOCAL_PORT_SINGLE 0x00000008 |
| #define BMP_LOCAL_PORT_RANGE 0x00000010 |
| #define BMP_REMOTE_PORT_SINGLE 0x00000020 |
| #define BMP_REMOTE_PORT_RANGE 0x00000040 |
| #define BMP_SPI 0x00000080 |
| #define BMP_TOS 0x00000100 |
| #define BMP_FLOW_LABEL 0x00000200 |
| #define BMP_V4_LOCAL_ADDR 0x00000400 |
| #define BMP_V6_LOCAL_ADDR 0x00000800 |
| #define BMP_MATCH_ALL 0x00001000 |
| #define BMP_EMPTY_TCP_ACK 0x80000000 |
| #define BMP_IP_FRAGMENT 0x40000000 |
| #define BMP_IP_FRAGMENT_FIRST 0x01000000 |
| #define BMP_IP_FRAGMENT_MID 0x02000000 |
| #define BMP_IP_FRAGMENT_LAST 0x04000000 |
| #define BMP_IP_FRAGMENT_NOT 0x08000000 |
| #define BMP_CORRUPTED 0x20000000 |
| |
| /* enum declaration */ |
| typedef enum { |
| TFT_CTXT_TYPE_DEFINED_TFT = 0, |
| TFT_CTXT_TYPE_APPLIED_TFT, |
| TFT_CTXT_TYPE_APPLIED_QR, |
| TFT_CTXT_TYPE_APPLIED_RQOS, |
| TFT_CTXT_TYPE_DEFINED_QR, |
| TFT_CTXT_TYPE_ALL |
| } tft_ctxt_type_enum; |
| |
| typedef enum { |
| TFT_PROC_DIR_NONE = 0, // 0x00 |
| TFT_PROC_DIR_MO, // 0x01 |
| TFT_PROC_DIR_MT, // 0x02 |
| } tft_proc_dir_enum; |
| |
| typedef enum { |
| TFT_BEARER_NO_ACTION = 0, // 0x00 |
| TFT_BEARER_ACTIVATION, // 0x01 |
| TFT_BEARER_MODIFICATION, // 0x02 |
| TFT_BEARER_DEACTIVATION // 0x03 |
| } tft_bearer_act_enum; |
| |
| // pdus mod |
| // flow act/ deact |
| typedef enum { |
| VG_ACT_NO_ACTION = 0, |
| VG_ACT_PDUS_MOD, |
| VG_ACT_QOS_FLOW_ACTIVATION, |
| VG_ACT_QOS_FLOW_DEACTIVATION |
| } vg_act_enum; |
| |
| typedef enum { |
| TFT_CHECK_PASS = 1, // (0x01) Validate pass |
| TFT_CHECK_FAILED_SEMANTIC_ERROR_IN_TFT, // (0x02) Validate error, SM/ESM should reject the procedure with cause "Semantic errors in TFT operations (#41)" |
| TFT_CHECK_FAILED_SYNTACTICAL_ERROR_IN_TFT, // (0x03) Validate error, SM/ESM should reject the procedure with cause "Syntactical errors in TFT operations (#42)" |
| TFT_CHECK_FAILED_SEMANTIC_ERROR_IN_PF, // (0x04) Validate error, SM/ESM should reject the procedure with cause "Semantic errors in packet filters (#44)" |
| TFT_CHECK_FAILED_SYNTACTICAL_ERROR_IN_PF, // (0x05) Validate error, SM/ESM should reject the procedure with cause "Syntactical errors in packet filters (#45)" |
| TFT_CHECK_FAILED_BCM_VIOLATION, // (0x06) Validate error, SM should reject the procedure with cause "Bearer Control Mode violation (#48)" |
| |
| TFT_CHECK_FAILED_SEMANTIC_ERROR_IN_QOS_OPERATION, //#83 |
| TFT_CHECK_FAILED_SYNTACTICAL_ERROR_IN_QOS_OPERATION, //#84 |
| |
| TFT_CHECK_FAILED_INSUFFICIENT_RESOURCES, |
| TFT_CHECK_FAILED_SERIOUS_ERROR, |
| |
| } tft_validate_result_enum; |
| |
| typedef enum { |
| TFT_FAIL_ACTION_NONE = 0, |
| TFT_FAIL_ACTION_RELEASE_PDUS, |
| TFT_FAIL_ACTION_MODIFICATION_REJECT, |
| TFT_FAIL_ACTION_DELETE_QR, |
| |
| } tft_fail_action_enum; |
| |
| typedef enum |
| { |
| PF_ACT_NONE = 0, |
| PF_ACT_ADD = 1, |
| PF_ACT_MOD = 2, |
| PF_ACT_DEL = 3, |
| PF_ACT_DEL_ALL = 4, |
| PF_ACT_DEL_BEARER = 5, |
| PF_ACT_REPLACE_QFI = 6 |
| }pkt_filter_act_enum; |
| |
| typedef enum |
| { |
| PF_DIRECTION_PRE_REL7_TFT = 0x00, |
| PF_DIRECTION_DL_ONLY = 0x01, |
| PF_DIRECTION_UL_ONLY = 0x02, |
| PF_DIRECTION_BIDIRECTION = 0x03, |
| }pf_direction_enum; |
| |
| typedef enum |
| { |
| PF_OWN_ENTITY_NONE = 0, |
| PF_OWN_ENTITY_UE, |
| PF_OWN_ENTITY_NW |
| }pf_own_entity_enum; |
| |
| typedef enum { |
| TFT_OPCODE_SPARE = 0, // (0x00) Spare = (5G) Reserved |
| TFT_OPCODE_CREATE_NEW_TFT, // (0x01) Create new TFT = (5G) Create new QoS rule |
| TFT_OPCODE_DELETE_TFT, // (0x02) Delete existing TFT = (5G) Delete existing QoS rule |
| TFT_OPCODE_ADD_PF, // (0x03) Add packet filters to existing TFT = (5G) Modify existing QoS rule and add packet filters |
| TFT_OPCODE_REPLACE_PF, // (0x04) Replace packet filters in existing TFT = (5G) Modify existing QoS rule and replace all packet filters |
| TFT_OPCODE_DELETE_PF, // (0x05) Delete packet filters from existing TFT = (5G) Modify existing QoS rule and delete packet filters |
| TFT_OPCODE_NOTFT_OP, // (0x06) No TFT operation = (5G) Modify existing QoS rule without modifying packtet filters |
| TFT_OPCODE_RESERVED // (0x07) Reserved |
| } tft_operation_enum; |
| |
| typedef enum { |
| PF_COMP_ID_MATCH_ALL = 0x01, // new for 5G |
| PF_COMP_ID_IPV4_REMOTE_ADDR = 0x10, |
| PF_COMP_ID_IPV4_LOCAL_ADDR = 0x11, |
| PF_COMP_ID_IPV6_REMOTE_ADDR = 0x20, |
| PF_COMP_ID_IPV6_REMOTE_ADDR_PREFIX_LENGTH = 0x21, |
| PF_COMP_ID_IPV6_LOCAL_ADDR_PREFIX_LENGTH = 0x23, |
| PF_COMP_ID_PROTOCOL_ID_NEXT_HEADER = 0x30, |
| PF_COMP_ID_SINGLE_LOCAL_PORT = 0x40, |
| PF_COMP_ID_LOCAL_PORT_RANGE = 0x41, |
| PF_COMP_ID_SINGLE_REMOTE_PORT = 0x50, |
| PF_COMP_ID_REMOTE_PORT_RANGE = 0x51, |
| PF_COMP_ID_SECURITY_PARAMETER_ID = 0x60, |
| PF_COMP_ID_TYPE_OF_SERVICE_TRAFFIC_CLASS = 0x70, |
| PF_COMP_ID_FLOW_LABEL = 0x80, |
| PF_COMP_ID_DESTINATION_MAC_ADDR = 0x81, // new for 5G, however, Not supported now |
| PF_COMP_ID_SOURCE_MAC_ADDR = 0x82, // new for 5G, however, Not supported now |
| PF_COMP_ID_802_1Q_C_TAG_VID = 0x83, // new for 5G, however, Not supported now |
| PF_COMP_ID_802_1Q_S_TAG_VID = 0x84, // new for 5G, however, Not supported now |
| PF_COMP_ID_802_1Q_C_TAG_PCP_DEI = 0x85, // new for 5G, however, Not supported now |
| PF_COMP_ID_802_1Q_S_TAG_PCP_DEI = 0x86, // new for 5G, however, Not supported now |
| PF_COMP_ID_ETHERTYPE = 0x87, // new for 5G, however, Not supported now |
| } pf_comp_id_enum; |
| |
| typedef enum { |
| TFT_PARA_LIST_ID_UNDEFINED = 0x00, // (0x00) Undefined (not defined in spec 24.008) |
| TFT_PARA_LIST_ID_AUTH_TOKEN = 0x01, // (0x01) Authorization token |
| TFT_PARA_LIST_ID_FLOW_ID = 0x02, // (0x02) Flow identifier |
| TFT_PARA_LIST_ID_PF_ID = 0x03 // (0x03) Packet filter identifier |
| } tft_para_list_id_enum; |
| |
| typedef enum { |
| BEARER_TYPE_UNKNOWN = 0, |
| BEARER_TYPE_PRIMARY_PDP, // (2G/3G) PRIMARY PDP CONTEXT |
| BEARER_TYPE_SECONDARY_PDP, // (2G/3G) SECONDARY PDP CONTEXT |
| BEARER_TYPE_DEFAULT_BEARER, // (LTE) DEFAULT EPS BEARER |
| BEARER_TYPE_DEDICATED_BEARER, // (LTE) DEDICATED EPS BEARER |
| BEARER_TYPE_QOS_FLOW // (5G) QoS Flow |
| } bearer_type_enum; |
| |
| typedef enum { |
| RAT_IND_2G3G = 1, // 0x01 |
| RAT_IND_LTE, // 0x02 |
| RAT_IND_234G, // 0x03 |
| RAT_IND_5G // 0x04 |
| } rat_ind_enum; |
| |
| typedef enum { |
| TFT_COMPOSE_TYPE_NONE = 0, // Reserved value |
| TFT_COMPOSE_TYPE_MOD_TFT, // Only TFT is requested to be modified |
| TFT_COMPOSE_TYPE_MOD_QOS, // Only QoS is requested to be modified |
| TFT_COMPOSE_TYPE_MOD_TFT_QOS, // Both TFT and QoS are requested to be modified |
| TFT_COMPOSE_TYPE_UNDEFINE_TFT, // TFT is requested to be undefined (deleted) |
| TFT_COMPOSE_TYPE_DEL_EPSB // [LTE only] Dedicated EPS bearer is requested to be deactivated |
| } tft_compose_type_enum; |
| |
| /* DHL trace use */ |
| typedef enum { |
| TFTLIB_TFT_DECODE = 0, |
| TFTLIB_TFT_ENCODE, |
| TFTLIB_TFT_DIR_EXTRACT, |
| TFTLIB_SET_APPLIED_TFT, |
| TFTLIB_SET_APPLIED_QR, |
| TFTLIB_COMPOSE_TFT_TO_NW, |
| TFTLIB_DEL_TFT, |
| TFTLIB_DEL_QR, |
| TFTLIB_GET_USER_DEFINED_TFT, |
| TFTLIB_GET_APPLIED_TFT, |
| TFTLIB_SET_USER_DEFINED_TFT, |
| TFTLIB_SET_USR_DELPF, |
| TFTLIB_GET_USR_DELPF, |
| TFTLIB_CLEAR_USR_DELPF, |
| TFTLIB_SET_USR_LNKPF, |
| TFTLIB_GET_USR_LNKPF, |
| TFTLIB_CLEAR_USR_LNKPF, |
| TFTLIB_REL_PF, |
| UPDATE_TFT, |
| TFT_DECODE, |
| TFT_ENCODE, |
| PF_CONTENT_DECODE, |
| TFT_COMPOSE, |
| PF_FIELD_CHECK, |
| PF_COMP_CHECK, |
| TFT_EMPTY_COLLISION_CHECK, |
| PF_PRECEDENCE_COLLISION_CHECK, |
| COMPOSE_PF_ACT_LIST, |
| COMPOSE_BEARER_DEACT_LIST, |
| BCM_RESTRICT_CHK, |
| TFTLIB_TFT_GET_PC_ACT_LIST, |
| TFTLIB_GET_APPLIED_QR, |
| |
| TFTLIB_QRS_PRECHECK, |
| TFTLIB_QR_LENGTH_DECODE, |
| TFTLIB_BACKUP_APPLIED_QR, |
| TFTLIB_RESOTRE_APPLIED_QR, |
| TFTLIB_DEL_APPLIED_QR_BY_PSI, |
| TFTLIB_DEL_APPLIED_QR_BY_PSI_QRI, |
| TFTLIB_DEL_APPLIED_QR_BY_PSI_QFI, |
| TFTLIB_DEL_APPLIED_TFT_BY_EBI, |
| TFTLIB_SET_CID_FOR_APPLIED_QR, |
| |
| TFTLIB_SET_APPLIED_TFT_BY_EBI, |
| TFTLIB_SET_CID_FOR_APPLIED_TFT, |
| TFTLIB_UPDATE_DEACT_QR_LIST_TO_DEL_QF, |
| TFTLIB_CONSTRUCT_CONTEXT_FOR_DEFAULT_BEARER_WO_TFT, |
| |
| } tftlib_trc_func_name_enum; |
| |
| typedef enum { |
| TFT_PTR = 0, |
| TFT_RAW_PTR, |
| PF_ACT_LIST, |
| PF_PTR, |
| DEACT_BEARER_LIST, |
| COMPOSED_TFT_PTR |
| } tftlib_trc_func_arg_name_enum; |
| |
| typedef enum { |
| SOURCE_TFT = 0, |
| SOURCE_TFT_RAW, |
| DECODED_TFT, |
| ENCODED_TFT_RAW, |
| ENCODED_QRS_RAW, |
| COMPOSED_TFT, |
| EXTRACTED_TFT, |
| CURRENT_USER_DEFINED_TFT, |
| UPDATED_USER_DEFINED_TFT, |
| CURRENT_APPLIED_TFT, |
| UPDATED_APPLIED_TFT, |
| USER_REQUEST_CGTFT, |
| CURRENT_APPLIED_QR, |
| CURRENT_APPLIED_RQOS |
| } tftlib_trc_tft_type_enum; |
| |
| typedef enum { |
| TFTLIB_TRC_PARA_TYPE_NONE = 0, |
| TFTLIB_TRC_PARA_TYPE_FUNC_ARG_IN, |
| TFTLIB_TRC_PARA_TYPE_FUNC_ARG_OUT, |
| TFTLIB_TRC_PARA_TYPE_INTERNAL_FUNC_ARG_OUT, |
| TFTLIB_TRC_PARA_TYPE_TFT_CONTEXT |
| } tftlib_trc_para_type_enum; |
| |
| typedef enum { |
| QF_HAS_NO_RULE = 0, |
| QF_HAS_DEFAULT_RULE = 1, |
| QF_HAS_ONLY_NON_DEFAULT_RULE = 2 |
| } tftlib_qf_has_rule_enum; |
| |
| typedef enum { |
| QOS_RULE_LEN_TYPE_NO_PRECEDENCE_QFI, |
| QOS_RULE_LEN_TYPE_WITH_PRECEDENCE_QFI, |
| QOS_RULE_LEN_TYPE_WITH_PRECEDENCE, |
| } qos_rule_len_type; |
| |
| #endif /* TFTLIB_COMMON_ENUM_H_ */ |