diff options
author | Anders Broman <anders.broman@ericsson.com> | 2011-01-27 15:43:55 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2011-01-27 15:43:55 +0000 |
commit | dd3be98aac4f4c5a90aa50bef7ad34a596e8be96 (patch) | |
tree | db5bae3e63390d1a511230a365ef67966746669b /epan/dissectors/packet-ulp.c | |
parent | f65917945179ad056c4693bbacf1e2321ed9e401 (diff) |
The attemt to pretify MSISDN and IMSI breaks the dissection.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5593
svn path=/trunk/; revision=35679
Diffstat (limited to 'epan/dissectors/packet-ulp.c')
-rw-r--r-- | epan/dissectors/packet-ulp.c | 76 |
1 files changed, 11 insertions, 65 deletions
diff --git a/epan/dissectors/packet-ulp.c b/epan/dissectors/packet-ulp.c index 9dcfdd1fc4..8eae40703c 100644 --- a/epan/dissectors/packet-ulp.c +++ b/epan/dissectors/packet-ulp.c @@ -370,10 +370,10 @@ static int hf_ulp_setSessionID = -1; /* SetSessionID */ static int hf_ulp_slpSessionID = -1; /* SlpSessionID */ static int hf_ulp_sessionId = -1; /* INTEGER_0_65535 */ static int hf_ulp_setId = -1; /* SETId */ -static int hf_ulp_msisdn = -1; /* T_msisdn */ +static int hf_ulp_msisdn = -1; /* OCTET_STRING_SIZE_8 */ static int hf_ulp_mdn = -1; /* OCTET_STRING_SIZE_8 */ static int hf_ulp_minsi = -1; /* BIT_STRING_SIZE_34 */ -static int hf_ulp_imsi = -1; /* T_imsi */ +static int hf_ulp_imsi = -1; /* OCTET_STRING_SIZE_8 */ static int hf_ulp_nai = -1; /* IA5String_SIZE_1_1000 */ static int hf_ulp_iPAddress = -1; /* IPAddress */ static int hf_ulp_sessionSlpID = -1; /* OCTET_STRING_SIZE_4 */ @@ -624,7 +624,6 @@ static int hf_ulp_rAND = -1; /* BIT_STRING_SIZE_128 */ static int hf_ulp_slpFQDN = -1; /* FQDN */ static int hf_ulp_ThirdParty_item = -1; /* ThirdPartyID */ static int hf_ulp_logicalName = -1; /* IA5String_SIZE_1_1000 */ -static int hf_ulp_msisdn_01 = -1; /* OCTET_STRING_SIZE_8 */ static int hf_ulp_emailaddr = -1; /* IA5String_SIZE_1_1000 */ static int hf_ulp_sip_uri = -1; /* T_sip_uri */ static int hf_ulp_ims_public_identity = -1; /* T_ims_public_identity */ @@ -955,31 +954,6 @@ dissect_ulp_Version(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pro static int -dissect_ulp_T_msisdn(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 57 "ulp.cnf" - tvbuff_t *parameter_tvb; - asn1_ctx_t asn1_ctx; - - /* "Hide" the first dissection to avoid double tree entries */ - hf_index = -1; - offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, - 8, 8, FALSE, ¶meter_tvb); - - -if(!parameter_tvb) - return offset; -/* msisdn is ISDN-addressstring */ - asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, actx->pinfo); - dissect_gsm_map_ISDN_AddressString(TRUE, parameter_tvb, 0, &asn1_ctx, tree, hf_ulp_msisdn); - - - - return offset; -} - - - -static int dissect_ulp_OCTET_STRING_SIZE_8(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 8, 8, FALSE, NULL); @@ -1000,31 +974,6 @@ dissect_ulp_BIT_STRING_SIZE_34(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac static int -dissect_ulp_T_imsi(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 71 "ulp.cnf" - tvbuff_t *parameter_tvb; - asn1_ctx_t asn1_ctx; - - /* "Hide" the first dissection to avoid double tree entries */ - hf_index = -1; - offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, - 8, 8, FALSE, ¶meter_tvb); - - -if(!parameter_tvb) - return offset; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, actx->pinfo); - dissect_gsm_map_IMSI(TRUE, parameter_tvb, 0, &asn1_ctx, tree, hf_ulp_imsi); - - - - - return offset; -} - - - -static int dissect_ulp_IA5String_SIZE_1_1000(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_IA5String(tvb, offset, actx, tree, hf_index, 1, 1000, FALSE); @@ -1086,10 +1035,10 @@ static const value_string ulp_SETId_vals[] = { }; static const per_choice_t SETId_choice[] = { - { 0, &hf_ulp_msisdn , ASN1_EXTENSION_ROOT , dissect_ulp_T_msisdn }, + { 0, &hf_ulp_msisdn , ASN1_EXTENSION_ROOT , dissect_ulp_OCTET_STRING_SIZE_8 }, { 1, &hf_ulp_mdn , ASN1_EXTENSION_ROOT , dissect_ulp_OCTET_STRING_SIZE_8 }, { 2, &hf_ulp_minsi , ASN1_EXTENSION_ROOT , dissect_ulp_BIT_STRING_SIZE_34 }, - { 3, &hf_ulp_imsi , ASN1_EXTENSION_ROOT , dissect_ulp_T_imsi }, + { 3, &hf_ulp_imsi , ASN1_EXTENSION_ROOT , dissect_ulp_OCTET_STRING_SIZE_8 }, { 4, &hf_ulp_nai , ASN1_EXTENSION_ROOT , dissect_ulp_IA5String_SIZE_1_1000 }, { 5, &hf_ulp_iPAddress , ASN1_EXTENSION_ROOT , dissect_ulp_IPAddress }, { 0, NULL, 0, NULL } @@ -3539,7 +3488,7 @@ dissect_ulp_MultipleLocationIds(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *a static int dissect_ulp_T_sip_uri(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 86 "ulp.cnf" +#line 59 "ulp.cnf" offset = dissect_per_restricted_character_string(tvb, offset, actx, tree, hf_index, 1, 255, FALSE, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:./-_~%#@?", 72, NULL); @@ -3552,7 +3501,7 @@ dissect_ulp_T_sip_uri(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, p static int dissect_ulp_T_ims_public_identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 91 "ulp.cnf" +#line 64 "ulp.cnf" offset = dissect_per_restricted_character_string(tvb, offset, actx, tree, hf_index, 1, 255, FALSE, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:./-_~%#@?", 72, NULL); @@ -3565,7 +3514,7 @@ dissect_ulp_T_ims_public_identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t static int dissect_ulp_T_uri(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 96 "ulp.cnf" +#line 69 "ulp.cnf" offset = dissect_per_restricted_character_string(tvb, offset, actx, tree, hf_index, 1, 255, FALSE, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./-_~%#", 69, NULL); @@ -3591,7 +3540,7 @@ static const value_string ulp_ThirdPartyID_vals[] = { static const per_choice_t ThirdPartyID_choice[] = { { 0, &hf_ulp_logicalName , ASN1_EXTENSION_ROOT , dissect_ulp_IA5String_SIZE_1_1000 }, - { 1, &hf_ulp_msisdn_01 , ASN1_EXTENSION_ROOT , dissect_ulp_OCTET_STRING_SIZE_8 }, + { 1, &hf_ulp_msisdn , ASN1_EXTENSION_ROOT , dissect_ulp_OCTET_STRING_SIZE_8 }, { 2, &hf_ulp_emailaddr , ASN1_EXTENSION_ROOT , dissect_ulp_IA5String_SIZE_1_1000 }, { 3, &hf_ulp_sip_uri , ASN1_EXTENSION_ROOT , dissect_ulp_T_sip_uri }, { 4, &hf_ulp_ims_public_identity, ASN1_EXTENSION_ROOT , dissect_ulp_T_ims_public_identity }, @@ -4526,6 +4475,7 @@ dissect_ulp_T_rrlpPayload(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U + return offset; } @@ -7532,7 +7482,7 @@ void proto_register_ulp(void) { { &hf_ulp_msisdn, { "msisdn", "ulp.msisdn", FT_BYTES, BASE_NONE, NULL, 0, - NULL, HFILL }}, + "OCTET_STRING_SIZE_8", HFILL }}, { &hf_ulp_mdn, { "mdn", "ulp.mdn", FT_BYTES, BASE_NONE, NULL, 0, @@ -7544,7 +7494,7 @@ void proto_register_ulp(void) { { &hf_ulp_imsi, { "imsi", "ulp.imsi", FT_BYTES, BASE_NONE, NULL, 0, - NULL, HFILL }}, + "OCTET_STRING_SIZE_8", HFILL }}, { &hf_ulp_nai, { "nai", "ulp.nai", FT_STRING, BASE_NONE, NULL, 0, @@ -8545,10 +8495,6 @@ void proto_register_ulp(void) { { "logicalName", "ulp.logicalName", FT_STRING, BASE_NONE, NULL, 0, "IA5String_SIZE_1_1000", HFILL }}, - { &hf_ulp_msisdn_01, - { "msisdn", "ulp.msisdn", - FT_BYTES, BASE_NONE, NULL, 0, - "OCTET_STRING_SIZE_8", HFILL }}, { &hf_ulp_emailaddr, { "emailaddr", "ulp.emailaddr", FT_STRING, BASE_NONE, NULL, 0, |