diff options
author | Joakim Karlsson <oakimk@gmail.com> | 2017-09-23 13:32:10 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-09-24 03:38:04 +0000 |
commit | e345d19b95adf0af37949c866636cd8381451095 (patch) | |
tree | 5493eea063a1014376a35ef7a4f6ab052069fe30 /epan/dissectors/asn1 | |
parent | b13d5eac26db21d3b8682e861575bf5344740f99 (diff) |
GPRSCDR: decoding of PDPType
Change-Id: Iec007c5276e30c982e776263ef753c002e2a9c72
Reviewed-on: https://code.wireshark.org/review/23660
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/asn1')
-rw-r--r-- | epan/dissectors/asn1/gprscdr/gprscdr.cnf | 27 | ||||
-rw-r--r-- | epan/dissectors/asn1/gprscdr/packet-gprscdr-template.c | 3 |
2 files changed, 30 insertions, 0 deletions
diff --git a/epan/dissectors/asn1/gprscdr/gprscdr.cnf b/epan/dissectors/asn1/gprscdr/gprscdr.cnf index 062f6ae6c7..c6bb671ae1 100644 --- a/epan/dissectors/asn1/gprscdr/gprscdr.cnf +++ b/epan/dissectors/asn1/gprscdr/gprscdr.cnf @@ -213,6 +213,33 @@ GPRSRecord offset = dissect_gprscdr_uli(tvb, actx, tree, 2); +#.FN_BODY PDPType + proto_tree *ext_tree_pdp_pdn_type; + guint length; + + length = tvb_reported_length(tvb); + + if(length == 1) { + /* + * PDN/EPS Bearer + * TS 29.274 + * 8.34 PDN Type + */ + ext_tree_pdp_pdn_type = proto_tree_add_subtree(tree, tvb, 0, length, ett_gprscdr_pdp_pdn_type, NULL, "pDNType"); + dissect_gtpv2_pdn_type(tvb, actx->pinfo, ext_tree_pdp_pdn_type, NULL, length, 0, 0, NULL); + offset = length; + } + else { + /* PDP context + * TS 29.060 + * 7.7.27 End User Address + * Octet 4-5 + */ + ext_tree_pdp_pdn_type = proto_tree_add_subtree(tree, tvb, 0, length, ett_gprscdr_pdp_pdn_type, NULL, "pDPType"); + offset = de_sm_pdp_addr(tvb, ext_tree_pdp_pdn_type, actx->pinfo, 0, length, NULL, 0); + } + + #.FN_BODY GPRSRecord VAL_PTR = &branch_taken proto_item *item; gint branch_taken, t_offset = offset; diff --git a/epan/dissectors/asn1/gprscdr/packet-gprscdr-template.c b/epan/dissectors/asn1/gprscdr/packet-gprscdr-template.c index c9a59bca49..4aefbcf9bc 100644 --- a/epan/dissectors/asn1/gprscdr/packet-gprscdr-template.c +++ b/epan/dissectors/asn1/gprscdr/packet-gprscdr-template.c @@ -29,6 +29,7 @@ #include "packet-ber.h" #include "packet-gsm_map.h" +#include "packet-gsm_a_common.h" #include "packet-e212.h" #include "packet-gprscdr.h" #include "packet-gtp.h" @@ -48,6 +49,7 @@ static int proto_gprscdr = -1; static int ett_gprscdr = -1; static int ett_gprscdr_timestamp = -1; static int ett_gprscdr_plmn_id = -1; +static int ett_gprscdr_pdp_pdn_type = -1; static int ett_gprscdr_eps_qos_arp = -1; static int ett_gprscdr_managementextension_information = -1; static int ett_gprscdr_userlocationinformation = -1; @@ -137,6 +139,7 @@ proto_register_gprscdr(void) &ett_gprscdr, &ett_gprscdr_timestamp, &ett_gprscdr_plmn_id, + &ett_gprscdr_pdp_pdn_type, &ett_gprscdr_eps_qos_arp, &ett_gprscdr_managementextension_information, &ett_gprscdr_userlocationinformation, |