Add filterable fields for each ISUP number.

Make a common number dissection function to do this without cut-n-pasting code
a whole bunch of times.

Clean up the number dissection code while we're there:
 - Don't throw an exception when we found too many digits.  Report it (expert
   info) and move on.
 - Avoid a useless (text) subtree: use the hf for the number as the root of
   the tree.  This means using proto_tree_append_string() which adds some
   complication but it's worth it to avoid a hidden item (which was the old
   solution if we passed the number to the E.164 dissector).

Bug: 12334
Change-Id: I465cab91b216b734f5763a4e56faa8e06b0731a2
Reviewed-on: https://code.wireshark.org/review/14924
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Jeff Morriss 2016-04-14 22:43:16 -04:00 committed by Anders Broman
parent d12561f61a
commit a1891f64ec
6 changed files with 299 additions and 712 deletions

View File

@ -240,7 +240,7 @@ if((camel_ver == 2)||(camel_ver == 1)){
return offset;
subtree = proto_item_add_subtree(actx->created_item, ett_camel_callingpartynumber);
dissect_isup_calling_party_number_parameter(parameter_tvb, subtree, NULL);
dissect_isup_calling_party_number_parameter(parameter_tvb, actx->pinfo, subtree, NULL);
#.END
#----------------------------------------------------------------------------------------
@ -254,7 +254,7 @@ dissect_isup_calling_party_number_parameter(parameter_tvb, subtree, NULL);
return offset;
subtree = proto_item_add_subtree(actx->created_item, ett_camel_calledpartybcdnumber);
dissect_isup_called_party_number_parameter(parameter_tvb, subtree, NULL);
dissect_isup_called_party_number_parameter(parameter_tvb, actx->pinfo, subtree, NULL);
#.END
#----------------------------------------------------------------------------------------
@ -268,7 +268,7 @@ dissect_isup_calling_party_number_parameter(parameter_tvb, subtree, NULL);
return offset;
subtree = proto_item_add_subtree(actx->created_item, ett_camel_locationnumber);
dissect_isup_location_number_parameter(parameter_tvb, subtree, NULL);
dissect_isup_location_number_parameter(parameter_tvb, actx->pinfo, subtree, NULL);
#.END
#----------------------------------------------------------------------------------------
@ -449,7 +449,7 @@ proto_tree *subtree;
if (!parameter_tvb)
return offset;
dissect_isup_redirecting_number_parameter(parameter_tvb, tree, NULL);
dissect_isup_redirecting_number_parameter(parameter_tvb, actx->pinfo, tree, NULL);
#.END
#----------------------------------------------------------------------------------------

View File

@ -234,7 +234,7 @@ static const inap_err_t inap_err_tab[] = {
if (!parameter_tvb)
return offset;
dissect_isup_called_party_number_parameter(parameter_tvb, tree, NULL);
dissect_isup_called_party_number_parameter(parameter_tvb, actx->pinfo, tree, NULL);
#.FN_BODY CallingPartyNumber VAL_PTR = &parameter_tvb
tvbuff_t *parameter_tvb;
@ -244,7 +244,7 @@ dissect_isup_called_party_number_parameter(parameter_tvb, tree, NULL);
if (!parameter_tvb)
return offset;
dissect_isup_calling_party_number_parameter(parameter_tvb, tree, NULL);
dissect_isup_calling_party_number_parameter(parameter_tvb, actx->pinfo, tree, NULL);
#.FN_BODY BearerCapability/bearerCap VAL_PTR = &parameter_tvb
@ -289,7 +289,7 @@ dissect_isup_called_party_number_parameter(parameter_tvb, tree, NULL);
if (!parameter_tvb)
return offset;
dissect_isup_redirecting_number_parameter(parameter_tvb, tree, NULL);
dissect_isup_redirecting_number_parameter(parameter_tvb, actx->pinfo, tree, NULL);
#.FN_BODY HighLayerCompatibility VAL_PTR = &parameter_tvb
/*

View File

@ -2182,7 +2182,7 @@ dissect_camel_CalledPartyNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in
return offset;
subtree = proto_item_add_subtree(actx->created_item, ett_camel_calledpartybcdnumber);
dissect_isup_called_party_number_parameter(parameter_tvb, subtree, NULL);
dissect_isup_called_party_number_parameter(parameter_tvb, actx->pinfo, subtree, NULL);
return offset;
}
@ -2202,7 +2202,7 @@ dissect_camel_CallingPartyNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i
return offset;
subtree = proto_item_add_subtree(actx->created_item, ett_camel_callingpartynumber);
dissect_isup_calling_party_number_parameter(parameter_tvb, subtree, NULL);
dissect_isup_calling_party_number_parameter(parameter_tvb, actx->pinfo, subtree, NULL);
return offset;
}
@ -2808,7 +2808,7 @@ dissect_camel_LocationNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
return offset;
subtree = proto_item_add_subtree(actx->created_item, ett_camel_locationnumber);
dissect_isup_location_number_parameter(parameter_tvb, subtree, NULL);
dissect_isup_location_number_parameter(parameter_tvb, actx->pinfo, subtree, NULL);
return offset;
}
@ -4857,7 +4857,7 @@ dissect_camel_RedirectingPartyID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i
if (!parameter_tvb)
return offset;
dissect_isup_redirecting_number_parameter(parameter_tvb, tree, NULL);
dissect_isup_redirecting_number_parameter(parameter_tvb, actx->pinfo, tree, NULL);
return offset;
}

View File

@ -2362,7 +2362,7 @@ dissect_inap_CalledPartyNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
if (!parameter_tvb)
return offset;
dissect_isup_called_party_number_parameter(parameter_tvb, tree, NULL);
dissect_isup_called_party_number_parameter(parameter_tvb, actx->pinfo, tree, NULL);
@ -2413,7 +2413,7 @@ dissect_inap_CallingPartyNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in
if (!parameter_tvb)
return offset;
dissect_isup_calling_party_number_parameter(parameter_tvb, tree, NULL);
dissect_isup_calling_party_number_parameter(parameter_tvb, actx->pinfo, tree, NULL);
@ -4808,7 +4808,7 @@ dissect_inap_RedirectingPartyID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in
if (!parameter_tvb)
return offset;
dissect_isup_redirecting_number_parameter(parameter_tvb, tree, NULL);
dissect_isup_redirecting_number_parameter(parameter_tvb, actx->pinfo, tree, NULL);

File diff suppressed because it is too large Load Diff

View File

@ -172,18 +172,18 @@ WS_DLL_PUBLIC value_string_ext isup_calling_partys_category_value_ext;
*/
void dissect_nsap(tvbuff_t *parameter_tvb,gint offset,gint len, proto_tree *parameter_tree);
WS_DLL_PUBLIC
void dissect_isup_called_party_number_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item);
void dissect_isup_called_party_number_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *parameter_tree, proto_item *parameter_item);
WS_DLL_PUBLIC
void dissect_isup_calling_party_number_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item);
void dissect_isup_calling_party_number_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *parameter_tree, proto_item *parameter_item);
void dissect_isup_cause_indicators_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item);
WS_DLL_PUBLIC
void dissect_isup_redirection_information_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item);
WS_DLL_PUBLIC
void dissect_isup_original_called_number_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *parameter_tree, proto_item *parameter_item);
WS_DLL_PUBLIC
void dissect_isup_redirecting_number_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item);
void dissect_isup_redirecting_number_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *parameter_tree, proto_item *parameter_item);
void dissect_isup_location_number_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item);
void dissect_isup_location_number_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *parameter_tree, proto_item *parameter_item);
void dissect_isup_generic_number_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *parameter_tree, proto_item *parameter_item);