aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/ulp
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-03-08 21:27:27 +0100
committerPascal Quantin <pascal.quantin@gmail.com>2015-03-08 21:40:24 +0000
commit27ff75c548764fc277a96490cb2fa014f3775c3d (patch)
tree412b28652fe3afd532a3276d48d285db061f177d /asn1/ulp
parent54c301a0d61a31b0a0469d8d9346b51af37c0009 (diff)
ULP/ILP: add dissection of MSISDN, MDN and IMSI numbers
Bug: 11038 Change-Id: If4602a8ad434c46ea7986eec566751f4bb667002 Reviewed-on: https://code.wireshark.org/review/7603 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'asn1/ulp')
-rw-r--r--asn1/ulp/packet-ulp-template.c11
-rw-r--r--asn1/ulp/ulp.cnf51
2 files changed, 61 insertions, 1 deletions
diff --git a/asn1/ulp/packet-ulp-template.c b/asn1/ulp/packet-ulp-template.c
index ab3db01eaf..63fa5695db 100644
--- a/asn1/ulp/packet-ulp-template.c
+++ b/asn1/ulp/packet-ulp-template.c
@@ -33,6 +33,8 @@
#include "packet-per.h"
#include "packet-tcp.h"
#include "packet-gsm_map.h"
+#include "packet-e164.h"
+#include "packet-e212.h"
#define PNAME "OMA UserPlane Location Protocol"
#define PSNAME "ULP"
@@ -59,9 +61,12 @@ static int proto_ulp = -1;
static gboolean ulp_desegment = TRUE;
#include "packet-ulp-hf.c"
+static int hf_ulp_mobile_directory_number = -1;
/* Initialize the subtree pointers */
static gint ett_ulp = -1;
+static gint ett_ulp_setid = -1;
+static gint ett_ulp_thirdPartyId = -1;
#include "packet-ulp-ett.c"
/* Include constants */
@@ -95,11 +100,17 @@ void proto_register_ulp(void) {
static hf_register_info hf[] = {
#include "packet-ulp-hfarr.c"
+ { &hf_ulp_mobile_directory_number,
+ { "Mobile Directory Number", "ulp.mobile_directory_number",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }}
};
/* List of subtrees */
static gint *ett[] = {
&ett_ulp,
+ &ett_ulp_setid,
+ &ett_ulp_thirdPartyId,
#include "packet-ulp-ettarr.c"
};
diff --git a/asn1/ulp/ulp.cnf b/asn1/ulp/ulp.cnf
index 0bc6c0e2b8..8798e6facf 100644
--- a/asn1/ulp/ulp.cnf
+++ b/asn1/ulp/ulp.cnf
@@ -67,6 +67,46 @@ guint32 UlpMessage;
call_dissector(lpp_handle, lpp_tvb, %(ACTX)s->pinfo, tree);
}
+#.FN_BODY SETId/msisdn VAL_PTR=&msisdn_tvb
+ tvbuff_t *msisdn_tvb;
+%(DEFAULT_BODY)s
+ if (msisdn_tvb) {
+ proto_tree *subtree;
+
+ subtree = proto_item_add_subtree(actx->created_item, ett_ulp_setid);
+ dissect_e164_msisdn(msisdn_tvb, subtree, 0, 8, E164_ENC_BCD);
+ }
+
+#.FN_BODY SETId/mdn VAL_PTR=&mdn_tvb
+ tvbuff_t *mdn_tvb;
+%(DEFAULT_BODY)s
+ if (mdn_tvb) {
+ proto_tree *subtree;
+
+ subtree = proto_item_add_subtree(actx->created_item, ett_ulp_setid);
+ proto_tree_add_string(subtree, hf_ulp_mobile_directory_number, mdn_tvb, 0, 8, tvb_bcd_dig_to_wmem_packet_str(mdn_tvb, 0, 8, NULL, FALSE));
+ }
+
+#.FN_BODY SETId/imsi VAL_PTR=&imsi_tvb
+ tvbuff_t *imsi_tvb;
+%(DEFAULT_BODY)s
+ if (imsi_tvb) {
+ proto_tree *subtree;
+
+ subtree = proto_item_add_subtree(actx->created_item, ett_ulp_setid);
+ dissect_e212_imsi(imsi_tvb, actx->pinfo, subtree, 0, 8, FALSE);
+ }
+
+#.FN_BODY ThirdPartyID/msisdn VAL_PTR=&msisdn_tvb
+ tvbuff_t *msisdn_tvb;
+%(DEFAULT_BODY)s
+ if (msisdn_tvb) {
+ proto_tree *subtree;
+
+ subtree = proto_item_add_subtree(actx->created_item, ett_ulp_thirdPartyId);
+ dissect_e164_msisdn(msisdn_tvb, subtree, 0, 8, E164_ENC_BCD);
+ }
+
#.FN_BODY ThirdPartyID/sip-uri
# asn2wrs does not handle '%' in the restricted string ( Has to be there twice)
offset = dissect_per_restricted_character_string(tvb, offset, actx, tree, hf_index,
@@ -77,13 +117,22 @@ guint32 UlpMessage;
offset = dissect_per_restricted_character_string(tvb, offset, actx, tree, hf_index,
1, 255, FALSE, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:./-_~%%#@?", 72,
NULL);
+#.FN_BODY ThirdPartyID/mdn VAL_PTR=&mdn_tvb
+ tvbuff_t *mdn_tvb;
+%(DEFAULT_BODY)s
+ if (mdn_tvb) {
+ proto_tree *subtree;
+
+ subtree = proto_item_add_subtree(actx->created_item, ett_ulp_thirdPartyId);
+ proto_tree_add_string(subtree, hf_ulp_mobile_directory_number, mdn_tvb, 0, 8, tvb_bcd_dig_to_wmem_packet_str(mdn_tvb, 0, 8, NULL, FALSE));
+ }
+
#.FN_BODY ThirdPartyID/uri
# asn2wrs does not handle '%' in the restricted string ( Has to be there twice)
offset = dissect_per_restricted_character_string(tvb, offset, actx, tree, hf_index,
1, 255, FALSE, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./-_~%%#", 69,
NULL);
-
#.TYPE_ATTR
IPAddress/ipv4Address TYPE = FT_IPv4 DISPLAY = BASE_NONE STRINGS = NULL
IPAddress/ipv6Address TYPE = FT_IPv6 DISPLAY = BASE_NONE STRINGS = NULL