forked from osmocom/wireshark
[PFCP] Fixed FAR ID, QER ID and URR ID Allocation Type String appended to the Tree in UI
Change-Id: Ib73c6d3d514b3fc464127246ad229df97cdccf35 Reviewed-on: https://code.wireshark.org/review/26443 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
2a227f72bf
commit
0f45f4bcf7
|
@ -2392,17 +2392,20 @@ static int
|
|||
decode_pfcp_urr_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint offset)
|
||||
{
|
||||
guint32 urr_id;
|
||||
guint8 urr_id_flag;
|
||||
/* Octet 5 to 8 URR ID value
|
||||
* The bit 8 of octet 5 is used to indicate if the Rule ID is dynamically allocated by the CP function
|
||||
* or predefined in the UP function. If set to 0, it indicates that the Rule is dynamically provisioned
|
||||
* by the CP Function. If set to 1, it indicates that the Rule is predefined in the UP Function
|
||||
*/
|
||||
urr_id_flag = tvb_get_guint8(tvb, offset) & 0x80;
|
||||
|
||||
proto_tree_add_item(tree, hf_pfcp_urr_id_flg, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item_ret_uint(tree, hf_pfcp_urr_id, tvb, offset, 4, ENC_BIG_ENDIAN, &urr_id);
|
||||
offset += 4;
|
||||
|
||||
proto_item_append_text(item, "%s %u",
|
||||
((urr_id & 80000000) ? pfcp_id_predef_dynamic_tfs.true_string : pfcp_id_predef_dynamic_tfs.false_string),
|
||||
((urr_id_flag)? pfcp_id_predef_dynamic_tfs.true_string : pfcp_id_predef_dynamic_tfs.false_string),
|
||||
(urr_id & 0x7fffffff));
|
||||
|
||||
return offset;
|
||||
|
@ -3016,18 +3019,21 @@ static int
|
|||
decode_pfcp_far_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, gint offset)
|
||||
{
|
||||
guint32 far_id;
|
||||
guint8 far_id_flag;
|
||||
/* Octet 5 to 8 FAR ID value
|
||||
* The bit 8 of octet 5 is used to indicate if the Rule ID is dynamically allocated
|
||||
* by the CP function or predefined in the UP function. If set to 0, it indicates that
|
||||
* the Rule is dynamically provisioned by the CP Function. If set to 1, it indicates that
|
||||
* the Rule is predefined in the UP Function.
|
||||
*/
|
||||
far_id_flag = tvb_get_guint8(tvb,offset) & 0x80;
|
||||
|
||||
proto_tree_add_item(tree, hf_pfcp_far_id_flg, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item_ret_uint(tree, hf_pfcp_far_id, tvb, offset, 4, ENC_BIG_ENDIAN, &far_id);
|
||||
offset += 4;
|
||||
|
||||
proto_item_append_text(item, "%s %u",
|
||||
((far_id&80000000)? pfcp_id_predef_dynamic_tfs.true_string : pfcp_id_predef_dynamic_tfs.false_string),
|
||||
((far_id_flag)? pfcp_id_predef_dynamic_tfs.true_string : pfcp_id_predef_dynamic_tfs.false_string),
|
||||
(far_id & 0x7fffffff));
|
||||
|
||||
return offset;
|
||||
|
@ -3051,17 +3057,20 @@ static int
|
|||
decode_pfcp_qer_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint offset)
|
||||
{
|
||||
guint32 qer_id;
|
||||
guint8 qer_id_flag;
|
||||
/* Octet 5 to 8 QER ID value
|
||||
* The bit 8 of octet 5 is used to indicate if the Rule ID is dynamically allocated by the CP function
|
||||
* or predefined in the UP function. If set to 0, it indicates that the Rule is dynamically provisioned
|
||||
* by the CP Function. If set to 1, it indicates that the Rule is predefined in the UP Function
|
||||
*/
|
||||
qer_id_flag = tvb_get_guint8(tvb, offset) & 0x80;
|
||||
|
||||
proto_tree_add_item(tree, hf_pfcp_qer_id_flg, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item_ret_uint(tree, hf_pfcp_qer_id, tvb, offset, 4, ENC_BIG_ENDIAN, &qer_id);
|
||||
offset += 4;
|
||||
|
||||
proto_item_append_text(item, "%s %u",
|
||||
((qer_id & 80000000) ? pfcp_id_predef_dynamic_tfs.true_string : pfcp_id_predef_dynamic_tfs.false_string),
|
||||
((qer_id_flag)? pfcp_id_predef_dynamic_tfs.true_string : pfcp_id_predef_dynamic_tfs.false_string),
|
||||
(qer_id & 0x7fffffff));
|
||||
|
||||
return offset;
|
||||
|
|
Loading…
Reference in New Issue