Changes MAX TLV MORE to 16

OGS_MAX_NUM_OF_PDR is 16, but OGS_TLV_MAX_MORE is 8.
To match the size of two macros, increased OGS_TLV_MAX_MORE to 16.
This commit is contained in:
Sukchan Lee 2022-06-29 14:35:01 +09:00
parent b5956e5596
commit 051c19b7c8
10 changed files with 150 additions and 120 deletions

View File

@ -36,6 +36,22 @@ ogs_tlv_desc_t ogs_tlv_desc_more7 = {
OGS_TLV_MORE, "More", 0, 7, 0, 0, { NULL } };
ogs_tlv_desc_t ogs_tlv_desc_more8 = {
OGS_TLV_MORE, "More", 0, 8, 0, 0, { NULL } };
ogs_tlv_desc_t ogs_tlv_desc_more9 = {
OGS_TLV_MORE, "More", 0, 9, 0, 0, { NULL } };
ogs_tlv_desc_t ogs_tlv_desc_more10 = {
OGS_TLV_MORE, "More", 0, 10, 0, 0, { NULL } };
ogs_tlv_desc_t ogs_tlv_desc_more11 = {
OGS_TLV_MORE, "More", 0, 11, 0, 0, { NULL } };
ogs_tlv_desc_t ogs_tlv_desc_more12 = {
OGS_TLV_MORE, "More", 0, 12, 0, 0, { NULL } };
ogs_tlv_desc_t ogs_tlv_desc_more13 = {
OGS_TLV_MORE, "More", 0, 13, 0, 0, { NULL } };
ogs_tlv_desc_t ogs_tlv_desc_more14 = {
OGS_TLV_MORE, "More", 0, 14, 0, 0, { NULL } };
ogs_tlv_desc_t ogs_tlv_desc_more15 = {
OGS_TLV_MORE, "More", 0, 15, 0, 0, { NULL } };
ogs_tlv_desc_t ogs_tlv_desc_more16 = {
OGS_TLV_MORE, "More", 0, 16, 0, 0, { NULL } };
/* Return specific TLV mode based on its TLV description type and the msg
* provided mode (used to know the type length) */

View File

@ -31,7 +31,7 @@ extern "C" {
#define OGS_TLV_MAX_HEADROOM 16
#define OGS_TLV_VARIABLE_LEN 0
#define OGS_TLV_MAX_MORE 8
#define OGS_TLV_MAX_MORE 16
#define OGS_TLV_1_OR_MORE(__v) __v[OGS_TLV_MAX_MORE]
#define OGS_TLV_MAX_CHILD_DESC 128
@ -83,6 +83,14 @@ extern ogs_tlv_desc_t ogs_tlv_desc_more5;
extern ogs_tlv_desc_t ogs_tlv_desc_more6;
extern ogs_tlv_desc_t ogs_tlv_desc_more7;
extern ogs_tlv_desc_t ogs_tlv_desc_more8;
extern ogs_tlv_desc_t ogs_tlv_desc_more9;
extern ogs_tlv_desc_t ogs_tlv_desc_more10;
extern ogs_tlv_desc_t ogs_tlv_desc_more11;
extern ogs_tlv_desc_t ogs_tlv_desc_more12;
extern ogs_tlv_desc_t ogs_tlv_desc_more13;
extern ogs_tlv_desc_t ogs_tlv_desc_more14;
extern ogs_tlv_desc_t ogs_tlv_desc_more15;
extern ogs_tlv_desc_t ogs_tlv_desc_more16;
typedef uint64_t ogs_tlv_presence_t;

View File

@ -20,7 +20,7 @@
/*******************************************************************************
* This file had been created by pfcp-tlv.py script v0.1.0
* Please do not modify this file but regenerate it via script.
* Created on: 2022-06-12 08:57:15.347805 by acetcom
* Created on: 2022-06-29 14:29:16.181253 by acetcom
* from 29244-g91-modified.docx
******************************************************************************/
@ -3778,11 +3778,11 @@ ogs_tlv_desc_t ogs_pfcp_msg_desc_pfcp_session_establishment_request =
&ogs_pfcp_tlv_desc_node_id,
&ogs_pfcp_tlv_desc_f_seid,
&ogs_pfcp_tlv_desc_create_pdr,
&ogs_tlv_desc_more8,
&ogs_tlv_desc_more16,
&ogs_pfcp_tlv_desc_create_far,
&ogs_tlv_desc_more8,
&ogs_tlv_desc_more16,
&ogs_pfcp_tlv_desc_create_urr,
&ogs_tlv_desc_more2,
&ogs_tlv_desc_more16,
&ogs_pfcp_tlv_desc_create_qer,
&ogs_tlv_desc_more4,
&ogs_pfcp_tlv_desc_create_bar,
@ -3818,7 +3818,7 @@ ogs_tlv_desc_t ogs_pfcp_msg_desc_pfcp_session_establishment_response =
&ogs_pfcp_tlv_desc_offending_ie,
&ogs_pfcp_tlv_desc_f_seid,
&ogs_pfcp_tlv_desc_created_pdr,
&ogs_tlv_desc_more8,
&ogs_tlv_desc_more16,
&ogs_pfcp_tlv_desc_load_control_information,
&ogs_pfcp_tlv_desc_overload_control_information,
&ogs_pfcp_tlv_desc_fq_csid,
@ -3837,31 +3837,31 @@ ogs_tlv_desc_t ogs_pfcp_msg_desc_pfcp_session_modification_request =
0, 0, 0, 0, {
&ogs_pfcp_tlv_desc_f_seid,
&ogs_pfcp_tlv_desc_remove_pdr,
&ogs_tlv_desc_more8,
&ogs_tlv_desc_more16,
&ogs_pfcp_tlv_desc_remove_far,
&ogs_tlv_desc_more8,
&ogs_tlv_desc_more16,
&ogs_pfcp_tlv_desc_remove_urr,
&ogs_tlv_desc_more2,
&ogs_tlv_desc_more16,
&ogs_pfcp_tlv_desc_remove_qer,
&ogs_tlv_desc_more4,
&ogs_pfcp_tlv_desc_remove_bar,
&ogs_pfcp_tlv_desc_remove_traffic_endpoint,
&ogs_pfcp_tlv_desc_create_pdr,
&ogs_tlv_desc_more8,
&ogs_tlv_desc_more16,
&ogs_pfcp_tlv_desc_create_far,
&ogs_tlv_desc_more8,
&ogs_tlv_desc_more16,
&ogs_pfcp_tlv_desc_create_urr,
&ogs_tlv_desc_more2,
&ogs_tlv_desc_more16,
&ogs_pfcp_tlv_desc_create_qer,
&ogs_tlv_desc_more4,
&ogs_pfcp_tlv_desc_create_bar,
&ogs_pfcp_tlv_desc_create_traffic_endpoint,
&ogs_pfcp_tlv_desc_update_pdr,
&ogs_tlv_desc_more8,
&ogs_tlv_desc_more16,
&ogs_pfcp_tlv_desc_update_far,
&ogs_tlv_desc_more8,
&ogs_tlv_desc_more16,
&ogs_pfcp_tlv_desc_update_urr,
&ogs_tlv_desc_more2,
&ogs_tlv_desc_more16,
&ogs_pfcp_tlv_desc_update_qer,
&ogs_tlv_desc_more4,
&ogs_pfcp_tlv_desc_update_bar_session_modification_request,
@ -3900,7 +3900,7 @@ ogs_tlv_desc_t ogs_pfcp_msg_desc_pfcp_session_modification_response =
&ogs_pfcp_tlv_desc_cause,
&ogs_pfcp_tlv_desc_offending_ie,
&ogs_pfcp_tlv_desc_created_pdr,
&ogs_tlv_desc_more8,
&ogs_tlv_desc_more16,
&ogs_pfcp_tlv_desc_load_control_information,
&ogs_pfcp_tlv_desc_overload_control_information,
&ogs_pfcp_tlv_desc_usage_report_session_modification_response,

View File

@ -20,7 +20,7 @@
/*******************************************************************************
* This file had been created by pfcp-tlv.py script v0.1.0
* Please do not modify this file but regenerate it via script.
* Created on: 2022-06-12 08:57:15.335605 by acetcom
* Created on: 2022-06-29 14:29:16.169884 by acetcom
* from 29244-g91-modified.docx
******************************************************************************/
@ -1699,9 +1699,9 @@ typedef struct ogs_pfcp_session_set_deletion_response_s {
typedef struct ogs_pfcp_session_establishment_request_s {
ogs_pfcp_tlv_node_id_t node_id;
ogs_pfcp_tlv_f_seid_t cp_f_seid;
ogs_pfcp_tlv_create_pdr_t create_pdr[8];
ogs_pfcp_tlv_create_far_t create_far[8];
ogs_pfcp_tlv_create_urr_t create_urr[2];
ogs_pfcp_tlv_create_pdr_t create_pdr[16];
ogs_pfcp_tlv_create_far_t create_far[16];
ogs_pfcp_tlv_create_urr_t create_urr[16];
ogs_pfcp_tlv_create_qer_t create_qer[4];
ogs_pfcp_tlv_create_bar_t create_bar;
ogs_pfcp_tlv_create_traffic_endpoint_t create_traffic_endpoint;
@ -1730,7 +1730,7 @@ typedef struct ogs_pfcp_session_establishment_response_s {
ogs_pfcp_tlv_cause_t cause;
ogs_pfcp_tlv_offending_ie_t offending_ie;
ogs_pfcp_tlv_f_seid_t up_f_seid;
ogs_pfcp_tlv_created_pdr_t created_pdr[8];
ogs_pfcp_tlv_created_pdr_t created_pdr[16];
ogs_pfcp_tlv_load_control_information_t load_control_information;
ogs_pfcp_tlv_overload_control_information_t overload_control_information;
ogs_pfcp_tlv_fq_csid_t pgw_u_sgw_u_fq_csid;
@ -1743,21 +1743,21 @@ typedef struct ogs_pfcp_session_establishment_response_s {
typedef struct ogs_pfcp_session_modification_request_s {
ogs_pfcp_tlv_f_seid_t cp_f_seid;
ogs_pfcp_tlv_remove_pdr_t remove_pdr[8];
ogs_pfcp_tlv_remove_far_t remove_far[8];
ogs_pfcp_tlv_remove_urr_t remove_urr[2];
ogs_pfcp_tlv_remove_pdr_t remove_pdr[16];
ogs_pfcp_tlv_remove_far_t remove_far[16];
ogs_pfcp_tlv_remove_urr_t remove_urr[16];
ogs_pfcp_tlv_remove_qer_t remove_qer[4];
ogs_pfcp_tlv_remove_bar_t remove_bar;
ogs_pfcp_tlv_remove_traffic_endpoint_t remove_traffic_endpoint;
ogs_pfcp_tlv_create_pdr_t create_pdr[8];
ogs_pfcp_tlv_create_far_t create_far[8];
ogs_pfcp_tlv_create_urr_t create_urr[2];
ogs_pfcp_tlv_create_pdr_t create_pdr[16];
ogs_pfcp_tlv_create_far_t create_far[16];
ogs_pfcp_tlv_create_urr_t create_urr[16];
ogs_pfcp_tlv_create_qer_t create_qer[4];
ogs_pfcp_tlv_create_bar_t create_bar;
ogs_pfcp_tlv_create_traffic_endpoint_t create_traffic_endpoint;
ogs_pfcp_tlv_update_pdr_t update_pdr[8];
ogs_pfcp_tlv_update_far_t update_far[8];
ogs_pfcp_tlv_update_urr_t update_urr[2];
ogs_pfcp_tlv_update_pdr_t update_pdr[16];
ogs_pfcp_tlv_update_far_t update_far[16];
ogs_pfcp_tlv_update_urr_t update_urr[16];
ogs_pfcp_tlv_update_qer_t update_qer[4];
ogs_pfcp_tlv_update_bar_session_modification_request_t update_bar;
ogs_pfcp_tlv_update_traffic_endpoint_t update_traffic_endpoint;
@ -1789,7 +1789,7 @@ typedef struct ogs_pfcp_session_modification_request_s {
typedef struct ogs_pfcp_session_modification_response_s {
ogs_pfcp_tlv_cause_t cause;
ogs_pfcp_tlv_offending_ie_t offending_ie;
ogs_pfcp_tlv_created_pdr_t created_pdr[8];
ogs_pfcp_tlv_created_pdr_t created_pdr[16];
ogs_pfcp_tlv_load_control_information_t load_control_information;
ogs_pfcp_tlv_overload_control_information_t overload_control_information;
ogs_pfcp_tlv_usage_report_session_modification_response_t usage_report[8];

View File

@ -1,12 +1,12 @@
ies = []
ies.append({ "ie_type" : "Node ID", "ie_value" : "Node ID", "presence" : "M", "tlv_more" : "0", "comment" : "This IE shall contain the unique identifier of the sending Node."})
ies.append({ "ie_type" : "F-SEID", "ie_value" : "CP F-SEID", "presence" : "M", "tlv_more" : "0", "comment" : "This IE shall contain the unique identifier allocated by the CP function identifying the session."})
type_list["Create PDR"]["max_tlv_more"] = "7"
ies.append({ "ie_type" : "Create PDR", "ie_value" : "Create PDR", "presence" : "M", "tlv_more" : "7", "comment" : "This IE shall be present for at least one PDR to be associated to the PFCP session.Several IEs with the same IE type may be present to represent multiple PDRs.See Table 7.5.2.2-1."})
type_list["Create FAR"]["max_tlv_more"] = "7"
ies.append({ "ie_type" : "Create FAR", "ie_value" : "Create FAR", "presence" : "M", "tlv_more" : "7", "comment" : "This IE shall be present for at least one FAR to be associated to the PFCP session.Several IEs with the same IE type may be present to represent multiple FARs.See Table 7.5.2.3-1."})
type_list["Create URR"]["max_tlv_more"] = "1"
ies.append({ "ie_type" : "Create URR", "ie_value" : "Create URR", "presence" : "C", "tlv_more" : "1", "comment" : "This IE shall be present if a measurement action shall be applied to packets matching one or more PDR(s) of this PFCP session.Several IEs within the same IE type may be present to represent multiple URRs.See Table 7.5.2.4-1."})
type_list["Create PDR"]["max_tlv_more"] = "15"
ies.append({ "ie_type" : "Create PDR", "ie_value" : "Create PDR", "presence" : "M", "tlv_more" : "15", "comment" : "This IE shall be present for at least one PDR to be associated to the PFCP session.Several IEs with the same IE type may be present to represent multiple PDRs.See Table 7.5.2.2-1."})
type_list["Create FAR"]["max_tlv_more"] = "15"
ies.append({ "ie_type" : "Create FAR", "ie_value" : "Create FAR", "presence" : "M", "tlv_more" : "15", "comment" : "This IE shall be present for at least one FAR to be associated to the PFCP session.Several IEs with the same IE type may be present to represent multiple FARs.See Table 7.5.2.3-1."})
type_list["Create URR"]["max_tlv_more"] = "15"
ies.append({ "ie_type" : "Create URR", "ie_value" : "Create URR", "presence" : "C", "tlv_more" : "15", "comment" : "This IE shall be present if a measurement action shall be applied to packets matching one or more PDR(s) of this PFCP session.Several IEs within the same IE type may be present to represent multiple URRs.See Table 7.5.2.4-1."})
type_list["Create QER"]["max_tlv_more"] = "3"
ies.append({ "ie_type" : "Create QER", "ie_value" : "Create QER", "presence" : "C", "tlv_more" : "3", "comment" : "This IE shall be present if a QoS enforcement or QoS marking action shall be applied to packets matching one or more PDR(s) of this PFCP session.Several IEs within the same IE type may be present to represent multiple QERs.See Table 7.5.2.5-1."})
ies.append({ "ie_type" : "Create BAR", "ie_value" : "Create BAR", "presence" : "O", "tlv_more" : "0", "comment" : "When present, this IE shall contain the buffering instructions to be applied by the UP function to any FAR of this PFCP session set with the Apply Action requesting the packets to be buffered and with a BAR ID IE referring to this BAR. See table 7.5.2.6-1."})

View File

@ -3,8 +3,8 @@ ies.append({ "ie_type" : "Node ID", "ie_value" : "Node ID", "presence" : "M", "t
ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "tlv_more" : "0", "comment" : "This IE shall indicate the acceptance or the rejection of the corresponding request message."})
ies.append({ "ie_type" : "Offending IE", "ie_value" : "Offending IE", "presence" : "C", "tlv_more" : "0", "comment" : "This IE shall be included if the rejection is due to a conditional or mandatory IE missing or faulty."})
ies.append({ "ie_type" : "F-SEID", "ie_value" : "UP F-SEID", "presence" : "C", "tlv_more" : "0", "comment" : "This IE shall be present if the cause is set to Request accepted (success). When present, it shall contain the unique identifier allocated by the UP function identifying the session."})
type_list["Created PDR"]["max_tlv_more"] = "7"
ies.append({ "ie_type" : "Created PDR", "ie_value" : "Created PDR", "presence" : "C", "tlv_more" : "7", "comment" : "This IE shall be present if the cause is set to success and the UP function was requested to allocate a local F-TEID or a UE IP address/prefix for the PDR.When present, this IE shall contain the PDR information associated to the PFCP session. There may be several instances of this IE.See table 7.5.3.2-1."})
type_list["Created PDR"]["max_tlv_more"] = "15"
ies.append({ "ie_type" : "Created PDR", "ie_value" : "Created PDR", "presence" : "C", "tlv_more" : "15", "comment" : "This IE shall be present if the cause is set to success and the UP function was requested to allocate a local F-TEID or a UE IP address/prefix for the PDR.When present, this IE shall contain the PDR information associated to the PFCP session. There may be several instances of this IE.See table 7.5.3.2-1."})
ies.append({ "ie_type" : "Load Control Information", "ie_value" : "Load Control Information", "presence" : "O", "tlv_more" : "0", "comment" : "The UP function may include this IE if it supports the load control feature and the feature is activated in the network.See Table 7.5.3.3-1."})
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "Overload Control Information", "presence" : "O", "tlv_more" : "0", "comment" : "During an overload condition, the UP function may include this IE if it supports the overload control feature and the feature is activated in the network.See Table 7.5.3.4-1."})
ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "PGW-U/SGW-U FQ-CSID", "presence" : "C", "tlv_more" : "0", "comment" : "This IE shall be included according to the requirements in clause23 of 3GPPTS23.007[24]."})

View File

@ -1,27 +1,27 @@
ies = []
ies.append({ "ie_type" : "F-SEID", "ie_value" : "CP F-SEID", "presence" : "C", "tlv_more" : "0", "comment" : "This IE shall be present if the CP function decides to change its F-SEID for the PFCP session. The UP function shall use the new CP F-SEID for subsequent PFCP Session related messages for this PFCP Session. See Note 2."})
type_list["Remove PDR"]["max_tlv_more"] = "7"
ies.append({ "ie_type" : "Remove PDR", "ie_value" : "Remove PDR", "presence" : "C", "tlv_more" : "7", "comment" : "When present, this IE shall contain the PDR Rule which is requested to be removed. See Table 7.5.4-6-1.Several IEs within the same IE type may be present to represent a list of PDRs to remove."})
type_list["Remove FAR"]["max_tlv_more"] = "7"
ies.append({ "ie_type" : "Remove FAR", "ie_value" : "Remove FAR", "presence" : "C", "tlv_more" : "7", "comment" : "When present, this IE shall contain the FAR Rule which is requested to be removed. See Table 7.5.4-7-1.Several IEs within the same IE type may be present to represent a list of FARs to remove."})
type_list["Remove URR"]["max_tlv_more"] = "1"
ies.append({ "ie_type" : "Remove URR", "ie_value" : "Remove URR", "presence" : "C", "tlv_more" : "1", "comment" : "When present, this shall contain the URR Rule which is requested to be removed. See Table 7.5.4-8-1.Several IEs within the same IE type may be present to represent a list of URRs to remove."})
type_list["Remove PDR"]["max_tlv_more"] = "15"
ies.append({ "ie_type" : "Remove PDR", "ie_value" : "Remove PDR", "presence" : "C", "tlv_more" : "15", "comment" : "When present, this IE shall contain the PDR Rule which is requested to be removed. See Table 7.5.4-6-1.Several IEs within the same IE type may be present to represent a list of PDRs to remove."})
type_list["Remove FAR"]["max_tlv_more"] = "15"
ies.append({ "ie_type" : "Remove FAR", "ie_value" : "Remove FAR", "presence" : "C", "tlv_more" : "15", "comment" : "When present, this IE shall contain the FAR Rule which is requested to be removed. See Table 7.5.4-7-1.Several IEs within the same IE type may be present to represent a list of FARs to remove."})
type_list["Remove URR"]["max_tlv_more"] = "15"
ies.append({ "ie_type" : "Remove URR", "ie_value" : "Remove URR", "presence" : "C", "tlv_more" : "15", "comment" : "When present, this shall contain the URR Rule which is requested to be removed. See Table 7.5.4-8-1.Several IEs within the same IE type may be present to represent a list of URRs to remove."})
type_list["Remove QER"]["max_tlv_more"] = "3"
ies.append({ "ie_type" : "Remove QER", "ie_value" : "Remove QER", "presence" : "C", "tlv_more" : "3", "comment" : "When present, this IE shall contain the QER Rule which is requested to be removed. See Table 7.5.4-9-1.Several IEs within the same IE type may be present to represent a list of QERs to remove."})
ies.append({ "ie_type" : "Remove BAR", "ie_value" : "Remove BAR", "presence" : "C", "tlv_more" : "0", "comment" : "When present, this IE shall contain the BAR Rule which is requested to be removed. See Table 7.5.4.12-1."})
ies.append({ "ie_type" : "Remove Traffic Endpoint", "ie_value" : "Remove Traffic Endpoint", "presence" : "C", "tlv_more" : "0", "comment" : "When present, this IE shall contain the Traffic Endpoint ID identifying the traffic endpoint to be removed, if the UP function has indicated support of PDI optimization.All the PDRs that refer to the removed Traffic Endpoint shall be deleted.See Table 7.5.4.14-1."})
ies.append({ "ie_type" : "Create PDR", "ie_value" : "Create PDR", "presence" : "C", "tlv_more" : "7", "comment" : "This IE shall be present if the CP function requests the UP function to create a new PDR.See Table 7.5.2.2-1.Several IEs within the same IE type may be present to represent a list of PDRs to create."})
ies.append({ "ie_type" : "Create FAR", "ie_value" : "Create FAR", "presence" : "C", "tlv_more" : "7", "comment" : "This IE shall be present if the CP function requests the UP function to create a new FAR. See Table 7.5.2.3-1.Several IEs within the same IE type may be present to represent a list of FARs to create."})
ies.append({ "ie_type" : "Create URR", "ie_value" : "Create URR", "presence" : "C", "tlv_more" : "1", "comment" : "This IE shall be present if the CP function requests the UP function to create a new URR. See Table 7.5.2.4-1.Several IEs within the same IE type may be present to represent a list of URRs to create."})
ies.append({ "ie_type" : "Create PDR", "ie_value" : "Create PDR", "presence" : "C", "tlv_more" : "15", "comment" : "This IE shall be present if the CP function requests the UP function to create a new PDR.See Table 7.5.2.2-1.Several IEs within the same IE type may be present to represent a list of PDRs to create."})
ies.append({ "ie_type" : "Create FAR", "ie_value" : "Create FAR", "presence" : "C", "tlv_more" : "15", "comment" : "This IE shall be present if the CP function requests the UP function to create a new FAR. See Table 7.5.2.3-1.Several IEs within the same IE type may be present to represent a list of FARs to create."})
ies.append({ "ie_type" : "Create URR", "ie_value" : "Create URR", "presence" : "C", "tlv_more" : "15", "comment" : "This IE shall be present if the CP function requests the UP function to create a new URR. See Table 7.5.2.4-1.Several IEs within the same IE type may be present to represent a list of URRs to create."})
ies.append({ "ie_type" : "Create QER", "ie_value" : "Create QER", "presence" : "C", "tlv_more" : "3", "comment" : "This IE shall be present if the CP function requests the UP function to create a new QER. See Table 7.5.2.5-1.Several IEs within the same IE type may be present to represent a list of QERs to create."})
ies.append({ "ie_type" : "Create BAR", "ie_value" : "Create BAR", "presence" : "C", "tlv_more" : "0", "comment" : "This IE shall be present if the CP function requests the UP function to create a new BAR.See Table 7.5.2.6-1."})
ies.append({ "ie_type" : "Create Traffic Endpoint", "ie_value" : "Create Traffic Endpoint", "presence" : "C", "tlv_more" : "0", "comment" : "When present this IE shall contain the information associated with the Traffic Endpoint to be created, if the UP function has indicated support of PDI optimization. See Table 7.5.2.7-1."})
type_list["Update PDR"]["max_tlv_more"] = "7"
ies.append({ "ie_type" : "Update PDR", "ie_value" : "Update PDR", "presence" : "C", "tlv_more" : "7", "comment" : "This IE shall be present if a PDR previously created for the PFCP session need to be modified. See Table 7.5.4.2-1.Several IEs within the same IE type may be present to represent a list of PDRs to update."})
type_list["Update FAR"]["max_tlv_more"] = "7"
ies.append({ "ie_type" : "Update FAR", "ie_value" : "Update FAR", "presence" : "C", "tlv_more" : "7", "comment" : "This IE shall be present if a FAR previously created for the PFCP session need to be modified. See Table 7.5.4.3-1. Several IEs within the same IE type may be present to represent a list of FARs to update."})
type_list["Update URR"]["max_tlv_more"] = "1"
ies.append({ "ie_type" : "Update URR", "ie_value" : "Update URR", "presence" : "C", "tlv_more" : "1", "comment" : "This IE shall be present if URR(s) previously created for the PFCP session need to be modified.Several IEs within the same IE type may be present to represent a list of modified URRs. Previously URRs that are not modified shall not be included. See Table 7.5.4.4-1."})
type_list["Update PDR"]["max_tlv_more"] = "15"
ies.append({ "ie_type" : "Update PDR", "ie_value" : "Update PDR", "presence" : "C", "tlv_more" : "15", "comment" : "This IE shall be present if a PDR previously created for the PFCP session need to be modified. See Table 7.5.4.2-1.Several IEs within the same IE type may be present to represent a list of PDRs to update."})
type_list["Update FAR"]["max_tlv_more"] = "15"
ies.append({ "ie_type" : "Update FAR", "ie_value" : "Update FAR", "presence" : "C", "tlv_more" : "15", "comment" : "This IE shall be present if a FAR previously created for the PFCP session need to be modified. See Table 7.5.4.3-1. Several IEs within the same IE type may be present to represent a list of FARs to update."})
type_list["Update URR"]["max_tlv_more"] = "15"
ies.append({ "ie_type" : "Update URR", "ie_value" : "Update URR", "presence" : "C", "tlv_more" : "15", "comment" : "This IE shall be present if URR(s) previously created for the PFCP session need to be modified.Several IEs within the same IE type may be present to represent a list of modified URRs. Previously URRs that are not modified shall not be included. See Table 7.5.4.4-1."})
type_list["Update QER"]["max_tlv_more"] = "3"
ies.append({ "ie_type" : "Update QER", "ie_value" : "Update QER", "presence" : "C", "tlv_more" : "3", "comment" : "This IE shall be present if QER(s) previously created for the PFCP session need to be modified.Several IEs within the same IE type may be present to represent a list of modified QERs.Previously created QERs that are not modified shall not be included.See Table 7.5.4.5-1."})
ies.append({ "ie_type" : "Update BAR Session Modification Request", "ie_value" : "Update BAR", "presence" : "C", "tlv_more" : "0", "comment" : "This IE shall be present if a BAR previously created for the PFCP session needs to be modified.A previously created BAR that is not modified shall not be included.See Table 7.5.4.11-1."})

View File

@ -1,7 +1,7 @@
ies = []
ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "tlv_more" : "0", "comment" : "This IE shall indicate the acceptance or the rejection of the corresponding request message."})
ies.append({ "ie_type" : "Offending IE", "ie_value" : "Offending IE", "presence" : "C", "tlv_more" : "0", "comment" : "This IE shall be included if the rejection is due to a conditional or mandatory IE missing or faulty."})
ies.append({ "ie_type" : "Created PDR", "ie_value" : "Created PDR", "presence" : "C", "tlv_more" : "7", "comment" : "This IE shall be present if the cause is set to success, new PDR(s) were requested to be created and the UP function was requested to allocate the local F-TEID or a UE IP address/prefix for the PDR(s).When present, this IE shall contain the PDR information associated to the PFCP session.See Table 7.5.3.2-1."})
ies.append({ "ie_type" : "Created PDR", "ie_value" : "Created PDR", "presence" : "C", "tlv_more" : "15", "comment" : "This IE shall be present if the cause is set to success, new PDR(s) were requested to be created and the UP function was requested to allocate the local F-TEID or a UE IP address/prefix for the PDR(s).When present, this IE shall contain the PDR information associated to the PFCP session.See Table 7.5.3.2-1."})
ies.append({ "ie_type" : "Load Control Information", "ie_value" : "Load Control Information", "presence" : "O", "tlv_more" : "0", "comment" : "The UP function may include this IE if it supports the load control feature and the feature is activated in the network.See Table 7.5.3.3-1."})
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "Overload Control Information", "presence" : "O", "tlv_more" : "0", "comment" : "During an overload condition, the UP function may include this IE if it supports the overload control feature and the feature is activated in the network."})
type_list["Usage Report Session Modification Response"]["max_tlv_more"] = "7"

View File

@ -160,11 +160,11 @@ def get_cells(cells):
tlv_more = "0" # PFCP has no tlv_more
if ie_type == 'Create PDR' or ie_type == 'Created PDR' or ie_type == 'Update PDR' or ie_type == "Remove PDR":
tlv_more = "7"
tlv_more = "15"
if ie_type == 'Create FAR' or ie_type == 'Update FAR' or ie_type == "Remove FAR":
tlv_more = "7"
tlv_more = "15"
if ie_type == 'Create URR' or ie_type == 'Update URR' or ie_type == "Remove URR":
tlv_more = "1"
tlv_more = "15"
if ie_type == 'Create QER' or ie_type == 'Update QER' or ie_type == "Remove QER":
tlv_more = "3"
if ie_type == 'User Plane IP Resource Information':

View File

@ -635,54 +635,53 @@ static void test5_func(abts_case *tc, void *data)
return;
}
#if 0
/* Sample header for tlv_msg */
#define TLV_AUTHORIZATION_POLICY_SUPPORT_TYPE 21
#define TLV_AUTHORIZATION_POLICY_SUPPORT_LEN 1
typedef tlv_uint8_t tlv_authorization_policy_support_t;
extern tlv_desc_t tlv_desc_authorization_policy_support;
typedef ogs_tlv_uint8_t tlv_authorization_policy_support_t;
extern ogs_tlv_desc_t tlv_desc_authorization_policy_support;
#define TLV_CLIENT_SECURITY_HISTORY_TYPE 108
#define TLV_CLIENT_SECURITY_HISTORY_LEN TLV_VARIABLE_LEN
#define TLV_CLIENT_SECURITY_HISTORY_LEN OGS_TLV_VARIABLE_LEN
typedef struct _tlv_client_security_history_t {
tlv_presence_t presence;
ogs_tlv_presence_t presence;
tlv_authorization_policy_support_t authorization_policy_support0;
tlv_authorization_policy_support_t authorization_policy_support2;
} tlv_client_security_history_t;
extern tlv_desc_t tlv_desc_client_security_history;
extern ogs_tlv_desc_t tlv_desc_client_security_history;
#define TLV_CLIENT_INFO_TYPE 103
#define TLV_CLIENT_INFO_LEN TLV_VARIABLE_LEN
#define TLV_CLIENT_INFO_LEN OGS_TLV_VARIABLE_LEN
typedef struct _tlv_client_info_t {
tlv_presence_t presence;
ogs_tlv_presence_t presence;
tlv_client_security_history_t client_security_history;
} tlv_client_info_t;
extern tlv_desc_t tlv_desc_client_info;
extern ogs_tlv_desc_t tlv_desc_client_info;
#define TLV_SERVER_NAME_TYPE 25
#define TLV_SERVER_NAME_LEN TLV_VARIABLE_LEN
typedef tlv_octet_t tlv_server_name_t;
extern tlv_desc_t tlv_desc_server_name;
#define TLV_SERVER_NAME_LEN OGS_TLV_VARIABLE_LEN
typedef ogs_tlv_octet_t tlv_server_name_t;
extern ogs_tlv_desc_t tlv_desc_server_name;
#define TLV_SERVER_INFO_TYPE 26
#define TLV_SERVER_INFO_LEN TLV_VARIABLE_LEN
#define TLV_SERVER_INFO_LEN OGS_TLV_VARIABLE_LEN
typedef struct _tlv_server_info_t {
tlv_presence_t presence;
tlv_server_name_t TLV_1_OR_MORE(server_name);
ogs_tlv_presence_t presence;
tlv_server_name_t OGS_TLV_1_OR_MORE(server_name);
} tlv_server_info_t;
extern tlv_desc_t tlv_desc_server_info;
extern ogs_tlv_desc_t tlv_desc_server_info;
typedef struct _tlv_attach_req {
tlv_client_info_t client_info;
tlv_server_info_t server_info;
} tlv_attach_req;
extern tlv_desc_t tlv_desc_attach_req;
extern ogs_tlv_desc_t tlv_desc_attach_req;
/* Sample source for tlv_msg */
tlv_desc_t tlv_desc_authorization_policy_support0 =
ogs_tlv_desc_t tlv_desc_authorization_policy_support0 =
{
TLV_UINT8,
OGS_TLV_UINT8,
"Auth Policy0",
TLV_AUTHORIZATION_POLICY_SUPPORT_TYPE,
TLV_AUTHORIZATION_POLICY_SUPPORT_LEN,
@ -690,9 +689,9 @@ tlv_desc_t tlv_desc_authorization_policy_support0 =
sizeof(tlv_authorization_policy_support_t),
{ NULL }
};
tlv_desc_t tlv_desc_authorization_policy_support2 =
ogs_tlv_desc_t tlv_desc_authorization_policy_support2 =
{
TLV_UINT8,
OGS_TLV_UINT8,
"Auth Policy2",
TLV_AUTHORIZATION_POLICY_SUPPORT_TYPE,
TLV_AUTHORIZATION_POLICY_SUPPORT_LEN,
@ -701,9 +700,9 @@ tlv_desc_t tlv_desc_authorization_policy_support2 =
{ NULL }
};
tlv_desc_t tlv_desc_client_security_history =
ogs_tlv_desc_t tlv_desc_client_security_history =
{
TLV_COMPOUND,
OGS_TLV_COMPOUND,
"Sec History",
TLV_CLIENT_SECURITY_HISTORY_TYPE,
TLV_CLIENT_SECURITY_HISTORY_LEN,
@ -716,9 +715,9 @@ tlv_desc_t tlv_desc_client_security_history =
}
};
tlv_desc_t tlv_desc_client_info =
ogs_tlv_desc_t tlv_desc_client_info =
{
TLV_COMPOUND,
OGS_TLV_COMPOUND,
"Client Info",
TLV_CLIENT_INFO_TYPE,
TLV_CLIENT_INFO_LEN,
@ -730,9 +729,9 @@ tlv_desc_t tlv_desc_client_info =
}
};
tlv_desc_t tlv_desc_server_name =
ogs_tlv_desc_t tlv_desc_server_name =
{
TLV_VAR_STR,
OGS_TLV_VAR_STR,
"Server Name",
TLV_SERVER_NAME_TYPE,
TLV_SERVER_NAME_LEN,
@ -741,22 +740,22 @@ tlv_desc_t tlv_desc_server_name =
{ NULL }
};
tlv_desc_t tlv_desc_server_info =
ogs_tlv_desc_t tlv_desc_server_info =
{
TLV_COMPOUND,
OGS_TLV_COMPOUND,
"Server Info",
TLV_SERVER_INFO_TYPE,
TLV_SERVER_INFO_LEN,
0,
sizeof(tlv_server_info_t),
{
&tlv_desc_server_name, &tlv_desc_more2,
&tlv_desc_server_name, &ogs_tlv_desc_more16,
NULL,
}
};
tlv_desc_t tlv_desc_attach_req = {
TLV_MESSAGE, "Attach Req", 0, 0, 0, 0, {
ogs_tlv_desc_t tlv_desc_attach_req = {
OGS_TLV_MESSAGE, "Attach Req", 0, 0, 0, 0, {
&tlv_desc_client_info,
&tlv_desc_server_info,
NULL,
@ -767,9 +766,11 @@ static void test6_func(abts_case *tc, void *data)
tlv_attach_req reqv;
tlv_attach_req reqv2;
pkbuf_t *req = NULL;
ogs_pkbuf_t *req = NULL;
char testbuf[1024];
int i;
/* Initialize message value structure */
memset(&reqv, 0, sizeof(tlv_attach_req));
@ -786,34 +787,44 @@ static void test6_func(abts_case *tc, void *data)
authorization_policy_support2.u8 = 0x9;
reqv.server_info.presence = 1;
reqv.server_info.server_name[0].presence = 1;
reqv.server_info.server_name[0].data =
(uint8_t*)"\x11\x22\x33\x44\x55\x66";
reqv.server_info.server_name[0].len = 6;
for (i = 0; i < 16; i++) {
reqv.server_info.server_name[i].presence = 1;
reqv.server_info.server_name[i].data =
(uint8_t*)"\x11\x22\x33\x44\x55\x66";
reqv.server_info.server_name[i].len = 6;
reqv.server_info.presence = 1;
reqv.server_info.server_name[1].presence = 1;
reqv.server_info.server_name[1].data =
(uint8_t*)"\xaa\xbb\xcc\xdd\xee\xff";
reqv.server_info.server_name[1].len = 6;
req = ogs_tlv_build_msg(
&tlv_desc_attach_req, &reqv, OGS_TLV_MODE_T1_L2_I1);
ABTS_INT_EQUAL(tc, 32+i*10, req->len);
ogs_pkbuf_free(req);
}
/* Build message */
tlv_build_msg(&req, &tlv_desc_attach_req, &reqv, OGS_TLV_MODE_T1_L2_I1);
req = ogs_tlv_build_msg(&tlv_desc_attach_req, &reqv, OGS_TLV_MODE_T1_L2_I1);
#define TEST_TLV_BUILD_MSG \
"67000e00 6c000a00 15000100 03150001" \
"02091a00 14001900 06001122 33445566" \
"19000600 aabbccdd eeff"
"02091a00 a0001900 06001122 33445566" \
"19000600 11223344 55661900 06001122" \
"33445566 19000600 11223344 55661900" \
"06001122 33445566 19000600 11223344" \
"55661900 06001122 33445566 19000600" \
"11223344 55661900 06001122 33445566" \
"19000600 11223344 55661900 06001122" \
"33445566 19000600 11223344 55661900" \
"06001122 33445566 19000600 11223344" \
"55661900 06001122 33445566 19000600" \
"11223344 5566"
ABTS_INT_EQUAL(tc, 42, req->len);
ABTS_TRUE(tc, memcmp(req->payload,
CORE_HEX(TEST_TLV_BUILD_MSG, strlen(TEST_TLV_BUILD_MSG), testbuf),
ABTS_INT_EQUAL(tc, 182, req->len);
ABTS_TRUE(tc, memcmp(req->data,
OGS_HEX(TEST_TLV_BUILD_MSG, strlen(TEST_TLV_BUILD_MSG), testbuf),
req->len) == 0);
/* Initialize message value structure */
memset(&reqv2, 0, sizeof(tlv_attach_req));
/* Parse message */
tlv_parse_msg(&reqv2, &tlv_desc_attach_req, req,
ogs_tlv_parse_msg(&reqv2, &tlv_desc_attach_req, req,
OGS_TLV_MODE_T1_L2_I1);
ABTS_INT_EQUAL(tc, 1, reqv2.client_info.presence);
@ -830,19 +841,16 @@ static void test6_func(abts_case *tc, void *data)
ABTS_INT_EQUAL(tc, 0x9, reqv2.client_info.
client_security_history.authorization_policy_support2.u8);
ABTS_INT_EQUAL(tc, 1, reqv2.server_info.presence);
ABTS_INT_EQUAL(tc, 1, reqv2.server_info.server_name[0].presence);
ABTS_INT_EQUAL(tc, 1, reqv2.server_info.server_name[1].presence);
ABTS_INT_EQUAL(tc, 6, reqv2.server_info.server_name[0].len);
ABTS_TRUE(tc, memcmp(reqv2.server_info.server_name[0].data,
(uint8_t*)"\x11\x22\x33\x44\x55\x66", 6) == 0);
ABTS_INT_EQUAL(tc, 6, reqv2.server_info.server_name[1].len);
ABTS_TRUE(tc, memcmp(reqv2.server_info.server_name[1].data,
(uint8_t*)"\xaa\xbb\xcc\xdd\xee\xff", 6) == 0);
for (i = 0; i < 16; i++) {
ABTS_INT_EQUAL(tc, 1, reqv2.server_info.presence);
ABTS_INT_EQUAL(tc, 1, reqv2.server_info.server_name[i].presence);
ABTS_INT_EQUAL(tc, 6, reqv2.server_info.server_name[i].len);
ABTS_TRUE(tc, memcmp(reqv2.server_info.server_name[i].data,
(uint8_t*)"\x11\x22\x33\x44\x55\x66", 6) == 0);
}
pkbuf_free(req);
ogs_pkbuf_free(req);
}
#endif
abts_suite *test_tlv(abts_suite *suite)
{
@ -866,9 +874,7 @@ abts_suite *test_tlv(abts_suite *suite)
abts_run_test(suite, test4_func, (void*)OGS_TLV_MODE_T1_L2_I1);
abts_run_test(suite, test5_func, (void*)OGS_TLV_MODE_T1_L2_I1);
#if 0
abts_run_test(suite, test6_func, NULL);
#endif
return suite;
}