rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 1 | #ifndef _ATP_URSP_STRUCT_H |
| 2 | #define _ATP_URSP_STRUCT_H |
| 3 | |
| 4 | #include "kal_general_types.h" |
| 5 | #include "kal_public_defs.h" |
| 6 | #include "mcd_l3_inc_struct.h" |
| 7 | #include "atcmd_struct.h" |
| 8 | #include "ursp_public_defs.h" |
| 9 | #include "ursp_struct.h" |
| 10 | |
| 11 | /*******************************************************************************/ |
| 12 | /* Caution!! */ |
| 13 | /* LOCAL_PARA_HDR and src_id MUST be the 1st and 2nd parameters, respectively. */ |
| 14 | /*******************************************************************************/ |
| 15 | #define ATP_URSP_REQ_LOCAL_PARA_HDR \ |
| 16 | LOCAL_PARA_HDR \ |
| 17 | kal_uint32 src_id; \ |
| 18 | kal_uint32 cmd_mode; |
| 19 | |
| 20 | #define ATP_URSP_CNF_LOCAL_PARA_HDR \ |
| 21 | LOCAL_PARA_HDR \ |
| 22 | kal_uint32 src_id; \ |
| 23 | kal_bool is_success; \ |
| 24 | kal_uint16 err_cause; |
| 25 | |
| 26 | #define ATP_URSP_IND_LOCAL_PARA_HDR \ |
| 27 | LOCAL_PARA_HDR \ |
| 28 | kal_uint32 src_id; |
| 29 | |
| 30 | |
| 31 | /******************************************************************************* |
| 32 | * URSP Internal * |
| 33 | *******************************************************************************/ |
| 34 | |
| 35 | // => Internal data type for URSP |
| 36 | typedef struct |
| 37 | { |
| 38 | atcmd_SSC_mode_enum ssc_mode; // by default ATCMD_SSC_MODE_MAX |
| 39 | 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) |
| 40 | kal_char dnn[URSP_DNN_SIZE]; // by default a NULL string |
| 41 | pdp_addr_type_enum pdx_type; // by default NULL_PDP_ADDR_TYPE in ps_public_enum_public.h |
| 42 | atcmd_Access_type_enum access_type; // by default ATCMD_ACCESS_TYPE_MAX |
| 43 | }ursp_at_ue_local_conf_struct; |
| 44 | typedef ursp_at_ue_local_conf_struct ursp_at_est_req_param_struct; |
| 45 | |
| 46 | /****************************************************************************************************************************************************************************** |
| 47 | * AT+EGURSPRDP[=<cid>] * |
| 48 | *******************************************************************************************************************************************************************************/ |
| 49 | |
| 50 | // MSG_ID_ATP_D2AT_EGURSPRDP_REQ |
| 51 | typedef struct |
| 52 | { |
| 53 | ATP_URSP_REQ_LOCAL_PARA_HDR |
| 54 | |
| 55 | kal_int32 cid; |
| 56 | }atp_d2at_egursprdp_req_struct; |
| 57 | |
| 58 | // MSG_ID_ATP_D2AT_EGURSPRDP_IND |
| 59 | typedef struct |
| 60 | { |
| 61 | ATP_URSP_IND_LOCAL_PARA_HDR |
| 62 | |
| 63 | kal_int32 cid; |
| 64 | |
| 65 | int type; |
| 66 | union |
| 67 | { |
| 68 | ursp_est_req_param_struct est_req; |
| 69 | struct |
| 70 | { |
| 71 | ursp_traffic_desc_struct traffic_desc; |
| 72 | ursp_ue_local_conf_struct ue_local_conf; |
| 73 | kal_bool match_all_disallow; |
| 74 | }app_req; |
| 75 | }param; |
| 76 | }atp_d2at_egursprdp_ind_struct; |
| 77 | |
| 78 | // MSG_ID_ATP_D2AT_EGURSPRDP_CNF |
| 79 | typedef struct |
| 80 | { |
| 81 | ATP_URSP_CNF_LOCAL_PARA_HDR |
| 82 | |
| 83 | kal_int32 res; |
| 84 | }atp_d2at_egursprdp_cnf_struct; |
| 85 | |
| 86 | |
| 87 | /****************************************************************************************************************************************************************************** |
| 88 | * +EGURSPREEVALU: <cid>,<event> * |
| 89 | *******************************************************************************************************************************************************************************/ |
| 90 | |
| 91 | // MSG_ID_ATP_D2AT_EGURSPREEVAL_URC_IND |
| 92 | typedef struct |
| 93 | { |
| 94 | ATP_URSP_IND_LOCAL_PARA_HDR |
| 95 | |
| 96 | kal_int32 cid; |
| 97 | kal_uint32 event; |
| 98 | }atp_d2at_egurspreeval_urc_ind_struct; |
| 99 | |
| 100 | |
| 101 | /****************************************************************************************************************************************************************************** |
| 102 | * AT+EGUEPOLICY=0,"<plmn_id>"[,"<ue_policy_part_content>"] * |
| 103 | * AT+EGUEPOLICY=1,"<plmn_id>"[,<rule_precedence>,"<traffic_desc>",<num_of_route_sel_desc>[,<route_sel_desc_precedence>,"<route_sel_desc>"][...]][...]
] * |
| 104 | *******************************************************************************************************************************************************************************/ |
| 105 | |
| 106 | // MSG_ID_ATP_D2AT_EGUEPOLICY_REQ |
| 107 | typedef struct |
| 108 | { |
| 109 | ATP_URSP_REQ_LOCAL_PARA_HDR |
| 110 | |
| 111 | plmn_id_struct plmn_id; |
| 112 | kal_uint8 num_of_rule; |
| 113 | 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 |
| 114 | }atp_d2at_eguepolicy_req_struct; |
| 115 | |
| 116 | // MSG_ID_ATP_D2AT_EGUEPOLICY_CNF |
| 117 | typedef struct |
| 118 | { |
| 119 | ATP_URSP_CNF_LOCAL_PARA_HDR |
| 120 | |
| 121 | kal_int32 res; |
| 122 | }atp_d2at_eguepolicy_cnf_struct; |
| 123 | |
| 124 | |
| 125 | /****************************************************************************************************************************************************************************** |
| 126 | * +EGUEPOLICYU:<plmn_id> * |
| 127 | *******************************************************************************************************************************************************************************/ |
| 128 | |
| 129 | // MSG_ID_ATP_D2AT_EGUEPOLICY_URC_IND |
| 130 | typedef struct |
| 131 | { |
| 132 | ATP_URSP_IND_LOCAL_PARA_HDR |
| 133 | |
| 134 | plmn_id_struct plmn_id; |
| 135 | }atp_d2at_eguepolicy_urc_ind_struct; |
| 136 | |
| 137 | |
| 138 | /****************************************************************************************************************************************************************************** |
| 139 | * AT+EGUEPOLICYRDP=<msg_type>[,"<plmn_id>"] * |
| 140 | *******************************************************************************************************************************************************************************/ |
| 141 | |
| 142 | // MSG_ID_ATP_D2AT_EGUEPOLICYRDP_REQ |
| 143 | typedef struct |
| 144 | { |
| 145 | ATP_URSP_REQ_LOCAL_PARA_HDR |
| 146 | |
| 147 | kal_int8 msg_type; |
| 148 | plmn_id_struct plmn_id; |
| 149 | }atp_d2at_eguepolicyrdp_req_struct; |
| 150 | |
| 151 | // MSG_ID_ATP_D2AT_EGUEPOLICYRDP_IND |
| 152 | typedef struct |
| 153 | { |
| 154 | ATP_URSP_IND_LOCAL_PARA_HDR |
| 155 | |
| 156 | kal_int8 msg_type; |
| 157 | plmn_id_struct plmn_id; |
| 158 | kal_uint8 num_of_rule; |
| 159 | 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 |
| 160 | }atp_d2at_eguepolicyrdp_ind_struct; |
| 161 | |
| 162 | // MSG_ID_ATP_D2AT_EGUEPOLICYRDP_CNF |
| 163 | typedef struct |
| 164 | { |
| 165 | ATP_URSP_CNF_LOCAL_PARA_HDR |
| 166 | |
| 167 | kal_int32 res; |
| 168 | }atp_d2at_eguepolicyrdp_cnf_struct; |
| 169 | |
| 170 | #endif |