aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/gprscdr
diff options
context:
space:
mode:
authorJoakim Karlsson <oakimk@gmail.com>2017-07-23 16:56:39 +0200
committerAnders Broman <a.broman58@gmail.com>2017-07-23 22:51:44 +0000
commit877caf478bae1e7f64084a8f2a7d6fe61f63b5e9 (patch)
treeb863cb37813c8c2db39b25e8c4d1f0aa29e6937b /epan/dissectors/asn1/gprscdr
parent8ee06279fff744a1d7f235df9b570e0c25a91b1f (diff)
GPRSCDR: decoding of ULI in GGSN/SGW/PGW CDRs
Change-Id: Id87920c5099553e51cfaa9ab0cb0c41cec6a127b Reviewed-on: https://code.wireshark.org/review/22767 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/asn1/gprscdr')
-rw-r--r--epan/dissectors/asn1/gprscdr/gprscdr.cnf56
-rw-r--r--epan/dissectors/asn1/gprscdr/packet-gprscdr-template.c34
2 files changed, 90 insertions, 0 deletions
diff --git a/epan/dissectors/asn1/gprscdr/gprscdr.cnf b/epan/dissectors/asn1/gprscdr/gprscdr.cnf
index 1616ed0342..e5197b68ba 100644
--- a/epan/dissectors/asn1/gprscdr/gprscdr.cnf
+++ b/epan/dissectors/asn1/gprscdr/gprscdr.cnf
@@ -140,6 +140,62 @@ GPRSRecord
offset = decode_qos_umts(tvb, 0, actx->pinfo, tree, hfi->name, 0);
+#.FN_BODY GGSNPDPRecord/userLocationInformation
+
+ offset = dissect_gprscdr_uli(tvb, actx, tree, 1);
+
+#.FN_BODY GGSNPDPRecordV750/userLocationInformation
+
+ offset = dissect_gprscdr_uli(tvb, actx, tree, 1);
+
+#.FN_BODY EGSNPDPRecord/userLocationInformation
+
+ offset = dissect_gprscdr_uli(tvb, actx, tree, 1);
+
+#.FN_BODY EGSNPDPRecordV750/userLocationInformation
+
+ offset = dissect_gprscdr_uli(tvb, actx, tree, 1);
+
+#.FN_BODY ChangeOfCharConditionV651/userLocationInformation
+
+ offset = dissect_gprscdr_uli(tvb, actx, tree, 1);
+
+#.FN_BODY ChangeOfServiceConditionV750/userLocationInformation
+
+ offset = dissect_gprscdr_uli(tvb, actx, tree, 1);
+
+#.FN_BODY SGWRecord/userLocationInformation
+
+ offset = dissect_gprscdr_uli(tvb, actx, tree, 2);
+
+#.FN_BODY SGWRecord/lastUserLocationInformation
+
+ offset = dissect_gprscdr_uli(tvb, actx, tree, 2);
+
+#.FN_BODY PGWRecord/userLocationInformation
+
+ offset = dissect_gprscdr_uli(tvb, actx, tree, 2);
+
+#.FN_BODY PGWRecord/lastUserLocationInformation
+
+ offset = dissect_gprscdr_uli(tvb, actx, tree, 2);
+
+#.FN_BODY ChangeOfCharCondition/userLocationInformation
+
+ offset = dissect_gprscdr_uli(tvb, actx, tree, 2);
+
+#.FN_BODY ChangeOfServiceCondition/userLocationInformation
+
+ offset = dissect_gprscdr_uli(tvb, actx, tree, 2);
+
+#.FN_BODY RelatedChangeOfCharCondition/userLocationInformation
+
+ offset = dissect_gprscdr_uli(tvb, actx, tree, 2);
+
+#.FN_BODY RelatedChangeOfServiceCondition/userLocationInformation
+
+ offset = dissect_gprscdr_uli(tvb, actx, tree, 2);
+
#.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 9f5efef08a..75d53d18ee 100644
--- a/epan/dissectors/asn1/gprscdr/packet-gprscdr-template.c
+++ b/epan/dissectors/asn1/gprscdr/packet-gprscdr-template.c
@@ -32,6 +32,7 @@
#include "packet-e212.h"
#include "packet-gprscdr.h"
#include "packet-gtp.h"
+#include "packet-gtpv2.h"
#define PNAME "GPRS CDR"
#define PSNAME "GPRSCDR"
@@ -48,6 +49,7 @@ static int ett_gprscdr = -1;
static int ett_gprscdr_timestamp = -1;
static int ett_gprscdr_plmn_id = -1;
static int ett_gprscdr_managementextension_information = -1;
+static int ett_gprscdr_userlocationinformation = -1;
#include "packet-gprscdr-ett.c"
static expert_field ei_gprscdr_not_dissected = EI_INIT;
@@ -64,6 +66,37 @@ static const value_string gprscdr_daylight_saving_time_vals[] = {
{0, NULL}
};
+static int
+dissect_gprscdr_uli(tvbuff_t *tvb _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int type) {
+ proto_tree *ext_tree_uli;
+ guint length;
+
+ length = tvb_reported_length(tvb);
+ ext_tree_uli = proto_tree_add_subtree(tree, tvb, 0, length, ett_gprscdr_userlocationinformation, NULL, "UserLocationInformation");
+
+ switch (type) {
+ case 1:
+ /* For GGSN/EGGSN-CDR,
+ * this octet string is a 1:1 copy of the contents (i.e. starting with octet 4) of the
+ * User Location Information (ULI) information element specified in 29.060, ch7.7.51.
+ */
+ dissect_gtp_uli(tvb, 0, actx->pinfo, ext_tree_uli, NULL);
+ break;
+ case 2:
+ /* For SGW/PGW-CDR,
+ * this octet string is a 1:1 copy of the contents (i.e. starting with octet 5) of the
+ * User Location Information (ULI) information element specified in 29.274, ch8.21.
+ */
+ dissect_gtpv2_uli(tvb, actx->pinfo, ext_tree_uli, NULL, length, 0, 0, NULL);
+ break;
+ default:
+ proto_tree_add_expert(ext_tree_uli, actx->pinfo, &ei_gprscdr_not_dissected, tvb, 0, length);
+ break;
+ }
+
+ return length;
+}
+
#include "packet-gprscdr-fn.c"
@@ -83,6 +116,7 @@ proto_register_gprscdr(void)
&ett_gprscdr_timestamp,
&ett_gprscdr_plmn_id,
&ett_gprscdr_managementextension_information,
+ &ett_gprscdr_userlocationinformation,
#include "packet-gprscdr-ettarr.c"
};