diff options
author | AndersBroman <anders.broman@ericsson.com> | 2014-08-19 15:36:33 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-08-19 13:46:00 +0000 |
commit | 50413192e378ae7a7e05aa69a0da8226ff80e235 (patch) | |
tree | 8ce13e0718d7033b039b6de4813b4debf64179e4 | |
parent | 7cc8b7c16f9a86555efc82c30e1f641e165394c4 (diff) |
Use the E212 function to dissect IMSI correct the filter Id string in
E212.
Change-Id: I203502b39d4ef216282d305f90c930aca84241bf
Reviewed-on: https://code.wireshark.org/review/3718
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | asn1/ranap/ranap.cnf | 12 | ||||
-rw-r--r-- | epan/dissectors/packet-e212.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-ranap.c | 12 |
3 files changed, 13 insertions, 13 deletions
diff --git a/asn1/ranap/ranap.cnf b/asn1/ranap/ranap.cnf index 20710c68bc..938819cdea 100644 --- a/asn1/ranap/ranap.cnf +++ b/asn1/ranap/ranap.cnf @@ -194,18 +194,18 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound") if(!imsi_tvb) return offset; + /* Hide the octet string default printout */ + PROTO_ITEM_SET_HIDDEN(actx->created_item); + digit_str = dissect_e212_imsi(imsi_tvb, actx->pinfo, tree, 0, tvb_reported_length(imsi_tvb), FALSE); + if ( actx->pinfo->sccp_info && actx->pinfo->sccp_info->data.co.assoc && ! actx->pinfo->sccp_info->data.co.assoc->calling_party ) { - guint len = tvb_length(imsi_tvb); - guint8* bytes = (guint8 *)tvb_memdup(wmem_packet_scope(),imsi_tvb,0,len); - actx->pinfo->sccp_info->data.co.assoc->calling_party = - wmem_strdup_printf(wmem_file_scope(), "IMSI: %%s", bytes_to_ep_str(bytes, len) ); + wmem_strdup_printf(wmem_file_scope(), "IMSI: %%s", digit_str ); } - digit_str = unpack_digits(imsi_tvb, 0); - proto_tree_add_string(tree, hf_ranap_imsi_digits, imsi_tvb, 0, -1, digit_str); + #.END #.FN_BODY NAS-PDU VAL_PTR = &nas_pdu_tvb diff --git a/epan/dissectors/packet-e212.c b/epan/dissectors/packet-e212.c index 06a8d9c120..bec3bad40d 100644 --- a/epan/dissectors/packet-e212.c +++ b/epan/dissectors/packet-e212.c @@ -2818,7 +2818,7 @@ proto_register_e212(void) /* Setup list of header fields See Section 1.6.1 for details */ static hf_register_info hf[] = { { &hf_E212_imsi, - { "IMSI","e212.mcc", + { "IMSI","e212.imsi", FT_STRING, BASE_NONE, NULL, 0x0, "International mobile subscriber identity(IMSI)", HFILL } }, diff --git a/epan/dissectors/packet-ranap.c b/epan/dissectors/packet-ranap.c index e93a16c8c4..1ca6c2bdd0 100644 --- a/epan/dissectors/packet-ranap.c +++ b/epan/dissectors/packet-ranap.c @@ -4771,18 +4771,18 @@ dissect_ranap_IMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot if(!imsi_tvb) return offset; + /* Hide the octet string default printout */ + PROTO_ITEM_SET_HIDDEN(actx->created_item); + digit_str = dissect_e212_imsi(imsi_tvb, actx->pinfo, tree, 0, tvb_reported_length(imsi_tvb), FALSE); + if ( actx->pinfo->sccp_info && actx->pinfo->sccp_info->data.co.assoc && ! actx->pinfo->sccp_info->data.co.assoc->calling_party ) { - guint len = tvb_length(imsi_tvb); - guint8* bytes = (guint8 *)tvb_memdup(wmem_packet_scope(),imsi_tvb,0,len); - actx->pinfo->sccp_info->data.co.assoc->calling_party = - wmem_strdup_printf(wmem_file_scope(), "IMSI: %s", bytes_to_ep_str(bytes, len) ); + wmem_strdup_printf(wmem_file_scope(), "IMSI: %s", digit_str ); } - digit_str = unpack_digits(imsi_tvb, 0); - proto_tree_add_string(tree, hf_ranap_imsi_digits, imsi_tvb, 0, -1, digit_str); + return offset; |