Diameter: Decode GMLC-Number AVP

Add decoding of the GMLC-Number AVP.
3GPP TS 29.272 GMLC-Number
Encoded as a TBCD-string.
This commit is contained in:
Jonas Falkevik 2022-04-20 10:59:55 +02:00 committed by A Wireshark GitLab Utility
parent bfdb4c558e
commit 7284ee091f
3 changed files with 28 additions and 0 deletions

View File

@ -2024,6 +2024,18 @@ dissect_diameter_3gpp_nor_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
return 4;
}
/* AVP Code: 1474 GMLC-NUMBER */
static int
dissect_diameter_3gpp_isdn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
int offset = 0;
int length = tvb_reported_length(tvb);
dissect_e164_isdn(tvb, tree, offset, length, E164_ENC_BCD);
return length;
}
/* AVP Code: 1490 IDR-Flags */
static int
dissect_diameter_3gpp_idr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
@ -3009,6 +3021,9 @@ proto_reg_handoff_diameter_3gpp(void)
/* AVP Code: 1443 NOR-Flags */
dissector_add_uint("diameter.3gpp", 1443, create_dissector_handle(dissect_diameter_3gpp_nor_flags, proto_diameter_3gpp));
/* AVP Code: 1474 GMLC-Number */
dissector_add_uint("diameter.3gpp", 1474, create_dissector_handle(dissect_diameter_3gpp_isdn, proto_diameter_3gpp));
/* AVP Code: 1490 IDR-Flags */
dissector_add_uint("diameter.3gpp", 1490, create_dissector_handle(dissect_diameter_3gpp_idr_flags, proto_diameter_3gpp));

View File

@ -462,6 +462,7 @@ static int proto_e164 = -1;
static int hf_E164_calling_party_number = -1;
static int hf_E164_called_party_number = -1;
static int hf_E164_msisdn = -1;
static int hf_E164_isdn = -1;
static int hf_E164_identification_code = -1;
static int hf_E164_country_code = -1;
@ -832,6 +833,12 @@ dissect_e164_msisdn(tvbuff_t *tvb, proto_tree *tree, int offset, int length, e16
return dissect_e164(tvb, tree, offset, length, encoding, hf_E164_msisdn);
}
const gchar *
dissect_e164_isdn(tvbuff_t *tvb, proto_tree *tree, int offset, int length, e164_encoding_t encoding)
{
return dissect_e164(tvb, tree, offset, length, encoding, hf_E164_isdn);
}
/*
* Register the protocol with Wireshark.
*/
@ -857,6 +864,11 @@ proto_register_e164(void)
FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_E164_isdn,
{ "E.164 number (ISDN)", "e164.isdn",
FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_E164_identification_code,
{ "Identification Code", "e164.identification_code",
FT_UINT32, BASE_DEC, NULL, 0x0,

View File

@ -44,4 +44,5 @@ typedef enum {
extern void dissect_e164_number(tvbuff_t *tvb, proto_tree *tree, int offset, int length, e164_info_t e164_info);
WS_DLL_PUBLIC void dissect_e164_cc(tvbuff_t *tvb, proto_tree *tree, int offset, e164_encoding_t encoding);
WS_DLL_PUBLIC const gchar * dissect_e164_msisdn(tvbuff_t *tvb, proto_tree *tree, int offset, int length, e164_encoding_t encoding);
WS_DLL_PUBLIC const gchar * dissect_e164_isdn(tvbuff_t *tvb, proto_tree *tree, int offset, int length, e164_encoding_t encoding);
#endif