diff --git a/lib/core/ogs-3gpp-types.c b/lib/core/ogs-3gpp-types.c index 3a22a69b3..446cb2d96 100644 --- a/lib/core/ogs-3gpp-types.c +++ b/lib/core/ogs-3gpp-types.c @@ -208,7 +208,9 @@ char *ogs_supi_from_suci(char *suci) p = tmp; i = 0; - while((array[i++] = strsep(&p, "-"))); + while((array[i++] = strsep(&p, "-"))) { + /* Empty Body */ + } SWITCH(array[0]) CASE("suci") diff --git a/lib/pfcp/message.c b/lib/pfcp/message.c index e11a1671d..45802afff 100644 --- a/lib/pfcp/message.c +++ b/lib/pfcp/message.c @@ -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-11 23:49:11.025259 by acetcom + * Created on: 2022-06-12 08:57:15.347805 by acetcom * from 29244-g91-modified.docx ******************************************************************************/ @@ -2052,10 +2052,10 @@ ogs_tlv_desc_t ogs_pfcp_tlv_desc_pfcpasreq_flags = ogs_tlv_desc_t ogs_pfcp_tlv_desc_data_status = { - OGS_TLV_VAR_STR, + OGS_TLV_UINT8, "Data Status", OGS_PFCP_DATA_STATUS_TYPE, - 0, + 1, 0, sizeof(ogs_pfcp_tlv_data_status_t), { NULL } diff --git a/lib/pfcp/message.h b/lib/pfcp/message.h index cb914772d..f23cd6e38 100644 --- a/lib/pfcp/message.h +++ b/lib/pfcp/message.h @@ -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-11 23:49:11.012732 by acetcom + * Created on: 2022-06-12 08:57:15.335605 by acetcom * from 29244-g91-modified.docx ******************************************************************************/ @@ -845,7 +845,7 @@ typedef ogs_tlv_octet_t ogs_pfcp_tlv_nf_instance_id_t; typedef ogs_tlv_octet_t ogs_pfcp_tlv_s_nssai_t; typedef ogs_tlv_octet_t ogs_pfcp_tlv_ip_version_t; typedef ogs_tlv_octet_t ogs_pfcp_tlv_pfcpasreq_flags_t; -typedef ogs_tlv_octet_t ogs_pfcp_tlv_data_status_t; +typedef ogs_tlv_uint8_t ogs_pfcp_tlv_data_status_t; typedef ogs_tlv_octet_t ogs_pfcp_tlv_rds_configuration_information_t; typedef ogs_tlv_octet_t ogs_pfcp_tlv_mptcp_applicable_indication_t; typedef ogs_tlv_octet_t ogs_pfcp_tlv_bridge_management_information_container_t; diff --git a/lib/pfcp/support/pfcp-tlv.py b/lib/pfcp/support/pfcp-tlv.py index 7f1850ee6..8680ecbf4 100644 --- a/lib/pfcp/support/pfcp-tlv.py +++ b/lib/pfcp/support/pfcp-tlv.py @@ -493,6 +493,7 @@ type_list["Paging Policy Indicator"]["size"] = 1 # Type 158 type_list["PFCPSRReq-Flags"]["size"] = 1 # Type 161 type_list["PFCPAUReq-Flags"]["size"] = 1 # Type 162 type_list["Quota Validity Time"]["size"] = 4 # Type 181 +type_list["Data Status"]["size"] = 1 # Type 260 f = open(outdir + 'message.h', 'w') output_header_to_file(f) diff --git a/lib/pfcp/types.h b/lib/pfcp/types.h index 03ebd6dc5..976661b3b 100644 --- a/lib/pfcp/types.h +++ b/lib/pfcp/types.h @@ -297,6 +297,8 @@ ED2(uint8_t reserved:7;, /* * 8.2.26 Apply Action * + * The octet 5 shall be encoded as follows: + * * Bit 1 – DROP (Drop): when set to 1, this indicates a request * to drop the packets. * Bit 2 – FORW (Forward): when set to 1, this indicates a request @@ -308,17 +310,49 @@ ED2(uint8_t reserved:7;, * arrival of a first downlink packet being buffered. * Bit 5 – DUPL (Duplicate): when set to 1, this indicates a request * to duplicate the packets. - * Bit 6 to 8 – Spare, for future use and set to 0. + * Bit 6 – IPMA (IP Multicast Accept): when set to "1", this indicates + * a request to accept UE requests to join an IP multicast group. + * Bit 7 – IPMD (IP Multicast Deny): when set to "1", this indicates + * a request to deny UE requests to join an IP multicast group. + * Bit 8 – DFRT (Duplicate for Redundant Transmission): when set to "1", + * this indicates a request to duplicate the packets + * for redundant transmission (see clause 5.24.2). * - * One and only one of the DROP, FORW and BUFF flags shall be set to 1. - * The NOCP flag may only be set if the BUFF flag is set. + * The octet 6 shall be encoded as follows: + * + * Bit 1 – EDRT (Eliminate Duplicate Packets for Redundant Transmission): + * when set to "1", this indicates a request to eliminate duplicate packets + * used for redundant transmission (see clause 5.24.2). + * Bit 2 – BDPN (Buffered Downlink Packet Notification): when set to "1", + * this indicates a request to notify the CP function about the first buffered + * DL packet for downlink data delivery status notification. + * Bit 3 – DDPN (Discarded Downlink Packet Notification): when set to "1", + * this indicates a request to notify the CP function about the first discarded + * DL packet for downlink data delivery status notification if the DL Buffering + * Duration or DL Buffering Suggested Packet Count is exceeded or + * it is discarded directly. See clause 5.2.3.1. + * Bit 4 to 8 – Spare, for future use and seto to "0". + * + * One and only one of the DROP, FORW, BUFF, IPMA and IPMD flags shall be + * set to "1". + * + * The NOCP flag and BDPN flag may only be set if the BUFF flag is set. * The DUPL flag may be set with any of the DROP, FORW, BUFF and NOCP flags. + * The DFRN flag may only be set if the FORW flag is set. + * The EDRT flag may be set if the FORW flag is set. + * The DDPN flag may be set with any of the DROP and BUFF flags. */ -#define OGS_PFCP_APPLY_ACTION_DROP 1 -#define OGS_PFCP_APPLY_ACTION_FORW 2 -#define OGS_PFCP_APPLY_ACTION_BUFF 4 -#define OGS_PFCP_APPLY_ACTION_NOCP 8 -#define OGS_PFCP_APPLY_ACTION_DUPL 16 +#define OGS_PFCP_APPLY_ACTION_DROP (1<<0) +#define OGS_PFCP_APPLY_ACTION_FORW (1<<1) +#define OGS_PFCP_APPLY_ACTION_BUFF (1<<2) +#define OGS_PFCP_APPLY_ACTION_NOCP (1<<3) +#define OGS_PFCP_APPLY_ACTION_DUPL (1<<4) +#define OGS_PFCP_APPLY_ACTION_IPMA (1<<5) +#define OGS_PFCP_APPLY_ACTION_IPMD (1<<6) +#define OGS_PFCP_APPLY_ACTION_DFRT (1<<7) +#define OGS_PFCP_APPLY_ACTION_EDRT (1<<8) +#define OGS_PFCP_APPLY_ACTION_BDPN (1<<9) +#define OGS_PFCP_APPLY_ACTION_DDPN (1<<10) typedef uint8_t ogs_pfcp_apply_action_t; /* 8.2.58 CP Function Features */ @@ -1318,6 +1352,21 @@ ED6(uint8_t spare:3;, }; } __attribute__ ((packed)) ogs_pfcp_measurement_information_t; +/* + * 8.2.179 Data Status + * + * The following flags are coded within Octet 5: + * + * Bit 1 – DROP: when set to "1", this indicates first DL packet is + * discarded by the UP function. + * Bit 2 – BUFF: when set to "1", this indicates first DL packet is + * received and buffered by the UP function. + * Bit 3 to 8 Spare, for future use and set to "0". + */ +#define OGS_PFCP_DATA_STATUS_DROP (1<<0) +#define OGS_PFCP_DATA_STATUS_BUFF (1<<1) +typedef uint8_t ogs_pfcp_data_status_t; + typedef struct ogs_pfcp_user_plane_report_s { ogs_pfcp_report_type_t type; struct {