yu.dong | c592bc7 | 2024-04-24 22:45:13 -0700 | [diff] [blame] | 1 | /***************************************************************************** |
| 2 | * |
| 3 | * Copyright (c) 2021, MediaTek Inc. All rights reserved. |
| 4 | * This software/firmware and related documentation ("MediaTek Software") are |
| 5 | * protected under relevant copyright laws. The information contained herein is |
| 6 | * confidential and proprietary to MediaTek Inc. and/or its licensors. Except as |
| 7 | * otherwise provided in the applicable licensing terms with MediaTek Inc. |
| 8 | * and/or its licensors, any reproduction, modification, use or disclosure of |
| 9 | * MediaTek Software, and information contained herein, in whole or in part, |
| 10 | * shall be strictly prohibited. |
| 11 | * |
| 12 | *****************************************************************************/ |
| 13 | |
rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 14 | #ifndef _ATP_URSP_STRUCT_H |
| 15 | #define _ATP_URSP_STRUCT_H |
| 16 | |
| 17 | #include "kal_general_types.h" |
| 18 | #include "kal_public_defs.h" |
yu.dong | c592bc7 | 2024-04-24 22:45:13 -0700 | [diff] [blame] | 19 | #include "d2_public_defs.h" |
rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 20 | #include "atcmd_struct.h" |
| 21 | #include "ursp_public_defs.h" |
| 22 | #include "ursp_struct.h" |
| 23 | |
| 24 | /*******************************************************************************/ |
| 25 | /* Caution!! */ |
| 26 | /* LOCAL_PARA_HDR and src_id MUST be the 1st and 2nd parameters, respectively. */ |
| 27 | /*******************************************************************************/ |
| 28 | #define ATP_URSP_REQ_LOCAL_PARA_HDR \ |
| 29 | LOCAL_PARA_HDR \ |
| 30 | kal_uint32 src_id; \ |
| 31 | kal_uint32 cmd_mode; |
| 32 | |
| 33 | #define ATP_URSP_CNF_LOCAL_PARA_HDR \ |
| 34 | LOCAL_PARA_HDR \ |
| 35 | kal_uint32 src_id; \ |
| 36 | kal_bool is_success; \ |
| 37 | kal_uint16 err_cause; |
| 38 | |
| 39 | #define ATP_URSP_IND_LOCAL_PARA_HDR \ |
| 40 | LOCAL_PARA_HDR \ |
| 41 | kal_uint32 src_id; |
| 42 | |
| 43 | |
| 44 | /******************************************************************************* |
| 45 | * URSP Internal * |
| 46 | *******************************************************************************/ |
| 47 | |
| 48 | // => Internal data type for URSP |
| 49 | typedef struct |
| 50 | { |
| 51 | atcmd_SSC_mode_enum ssc_mode; // by default ATCMD_SSC_MODE_MAX |
| 52 | at_s_nssai_struct s_nssai; // by default is_sst_present, is_sd_present, is_mapped_configured_sst_present, is_mapped_configured_sd_present) = (KAL_FALSE, KAL_FALSE, KAL_FALSE, KAL_FALSE) |
| 53 | kal_char dnn[URSP_DNN_SIZE]; // by default a NULL string |
| 54 | pdp_addr_type_enum pdx_type; // by default NULL_PDP_ADDR_TYPE in ps_public_enum_public.h |
| 55 | atcmd_Access_type_enum access_type; // by default ATCMD_ACCESS_TYPE_MAX |
yu.dong | c592bc7 | 2024-04-24 22:45:13 -0700 | [diff] [blame] | 56 | atcmd_request_type_enum multi_access; // by default ATCMD_REQUEST_TYPE_MAX |
rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 57 | }ursp_at_ue_local_conf_struct; |
| 58 | typedef ursp_at_ue_local_conf_struct ursp_at_est_req_param_struct; |
| 59 | |
| 60 | /****************************************************************************************************************************************************************************** |
| 61 | * AT+EGURSPRDP[=<cid>] * |
| 62 | *******************************************************************************************************************************************************************************/ |
| 63 | |
| 64 | // MSG_ID_ATP_D2AT_EGURSPRDP_REQ |
| 65 | typedef struct |
| 66 | { |
| 67 | ATP_URSP_REQ_LOCAL_PARA_HDR |
| 68 | |
| 69 | kal_int32 cid; |
| 70 | }atp_d2at_egursprdp_req_struct; |
| 71 | |
| 72 | // MSG_ID_ATP_D2AT_EGURSPRDP_IND |
| 73 | typedef struct |
| 74 | { |
| 75 | ATP_URSP_IND_LOCAL_PARA_HDR |
| 76 | |
| 77 | kal_int32 cid; |
| 78 | |
| 79 | int type; |
| 80 | union |
| 81 | { |
| 82 | ursp_est_req_param_struct est_req; |
| 83 | struct |
| 84 | { |
| 85 | ursp_traffic_desc_struct traffic_desc; |
| 86 | ursp_ue_local_conf_struct ue_local_conf; |
| 87 | kal_bool match_all_disallow; |
| 88 | }app_req; |
| 89 | }param; |
| 90 | }atp_d2at_egursprdp_ind_struct; |
| 91 | |
| 92 | // MSG_ID_ATP_D2AT_EGURSPRDP_CNF |
| 93 | typedef struct |
| 94 | { |
| 95 | ATP_URSP_CNF_LOCAL_PARA_HDR |
| 96 | |
| 97 | kal_int32 res; |
| 98 | }atp_d2at_egursprdp_cnf_struct; |
| 99 | |
| 100 | |
| 101 | /****************************************************************************************************************************************************************************** |
| 102 | * +EGURSPREEVALU: <cid>,<event> * |
| 103 | *******************************************************************************************************************************************************************************/ |
| 104 | |
| 105 | // MSG_ID_ATP_D2AT_EGURSPREEVAL_URC_IND |
| 106 | typedef struct |
| 107 | { |
| 108 | ATP_URSP_IND_LOCAL_PARA_HDR |
| 109 | |
| 110 | kal_int32 cid; |
| 111 | kal_uint32 event; |
| 112 | }atp_d2at_egurspreeval_urc_ind_struct; |
| 113 | |
| 114 | |
| 115 | /****************************************************************************************************************************************************************************** |
| 116 | * AT+EGUEPOLICY=0,"<plmn_id>"[,"<ue_policy_part_content>"] * |
| 117 | * AT+EGUEPOLICY=1,"<plmn_id>"[,<rule_precedence>,"<traffic_desc>",<num_of_route_sel_desc>[,<route_sel_desc_precedence>,"<route_sel_desc>"][...]][...]
] * |
| 118 | *******************************************************************************************************************************************************************************/ |
| 119 | |
| 120 | // MSG_ID_ATP_D2AT_EGUEPOLICY_REQ |
| 121 | typedef struct |
| 122 | { |
| 123 | ATP_URSP_REQ_LOCAL_PARA_HDR |
| 124 | |
| 125 | plmn_id_struct plmn_id; |
| 126 | kal_uint8 num_of_rule; |
| 127 | ursp_rule_struct rule_list[URSP_UE_POLICY_MAX_RULE_LIST_SIZE]; // 'eight' refers to the maximum size of allowed NSSAI, i.e. at most eight different slices |
| 128 | }atp_d2at_eguepolicy_req_struct; |
| 129 | |
| 130 | // MSG_ID_ATP_D2AT_EGUEPOLICY_CNF |
| 131 | typedef struct |
| 132 | { |
| 133 | ATP_URSP_CNF_LOCAL_PARA_HDR |
| 134 | |
| 135 | kal_int32 res; |
| 136 | }atp_d2at_eguepolicy_cnf_struct; |
| 137 | |
| 138 | |
| 139 | /****************************************************************************************************************************************************************************** |
| 140 | * +EGUEPOLICYU:<plmn_id> * |
| 141 | *******************************************************************************************************************************************************************************/ |
| 142 | |
| 143 | // MSG_ID_ATP_D2AT_EGUEPOLICY_URC_IND |
| 144 | typedef struct |
| 145 | { |
| 146 | ATP_URSP_IND_LOCAL_PARA_HDR |
| 147 | |
| 148 | plmn_id_struct plmn_id; |
| 149 | }atp_d2at_eguepolicy_urc_ind_struct; |
| 150 | |
| 151 | |
| 152 | /****************************************************************************************************************************************************************************** |
| 153 | * AT+EGUEPOLICYRDP=<msg_type>[,"<plmn_id>"] * |
| 154 | *******************************************************************************************************************************************************************************/ |
| 155 | |
| 156 | // MSG_ID_ATP_D2AT_EGUEPOLICYRDP_REQ |
| 157 | typedef struct |
| 158 | { |
| 159 | ATP_URSP_REQ_LOCAL_PARA_HDR |
| 160 | |
| 161 | kal_int8 msg_type; |
| 162 | plmn_id_struct plmn_id; |
| 163 | }atp_d2at_eguepolicyrdp_req_struct; |
| 164 | |
| 165 | // MSG_ID_ATP_D2AT_EGUEPOLICYRDP_IND |
| 166 | typedef struct |
| 167 | { |
| 168 | ATP_URSP_IND_LOCAL_PARA_HDR |
| 169 | |
| 170 | kal_int8 msg_type; |
| 171 | plmn_id_struct plmn_id; |
| 172 | kal_uint8 num_of_rule; |
| 173 | ursp_rule_struct rule_list[URSP_UE_POLICY_MAX_RULE_LIST_SIZE]; // 'eight' refers to the maximum size of allowed NSSAI, i.e. at most eight different slices |
| 174 | }atp_d2at_eguepolicyrdp_ind_struct; |
| 175 | |
| 176 | // MSG_ID_ATP_D2AT_EGUEPOLICYRDP_CNF |
| 177 | typedef struct |
| 178 | { |
| 179 | ATP_URSP_CNF_LOCAL_PARA_HDR |
| 180 | |
| 181 | kal_int32 res; |
| 182 | }atp_d2at_eguepolicyrdp_cnf_struct; |
| 183 | |
| 184 | #endif |