diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-12-31 21:09:15 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-01-01 05:10:07 +0000 |
commit | 1fcf7d7041fc2e10f6b5490cbaacbeb25ec42bde (patch) | |
tree | 987a5c61bd9f913ce7228fe82a7208adf6168e8e /epan | |
parent | f499265df7ab9588284d14298e258fe39ad5539d (diff) |
Clean up response matching type preference.
Add #defines for all the value types and use them.
Make the preference static, as it's not used outside this module.
Change-Id: Ibd04274b4160d18a55b10f47ce866ac97a76309e
Reviewed-on: https://code.wireshark.org/review/12987
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-ansi_map.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/epan/dissectors/packet-ansi_map.c b/epan/dissectors/packet-ansi_map.c index 1274fab375..5fdb7f0f77 100644 --- a/epan/dissectors/packet-ansi_map.c +++ b/epan/dissectors/packet-ansi_map.c @@ -114,12 +114,13 @@ void proto_register_ansi_map(void); void proto_reg_handoff_ansi_map(void); -/* Preference settings default */ +/* Preference settings */ #define MAX_SSN 254 static range_t *global_ssn_range; -gint ansi_map_response_matching_type = 1; - -#define ANSI_MAP_TID_ONLY 0 +#define ANSI_MAP_TID_ONLY 0 +#define ANSI_MAP_TID_AND_SOURCE 1 +#define ANSI_MAP_TID_SOURCE_AND_DEST 2 +static gint ansi_map_response_matching_type = ANSI_MAP_TID_AND_SOURCE; static dissector_handle_t ansi_map_handle=NULL; @@ -884,7 +885,7 @@ static int hf_ansi_map_interSystemSMSDeliveryPointToPointRes = -1; /* InterSyst static int hf_ansi_map_qualificationRequest2Res = -1; /* QualificationRequest2Res */ /*--- End of included file: packet-ansi_map-hf.c ---*/ -#line 328 "../../asn1/ansi_map/packet-ansi_map-template.c" +#line 329 "../../asn1/ansi_map/packet-ansi_map-template.c" /* Initialize the subtree pointers */ static gint ett_ansi_map = -1; @@ -1144,7 +1145,7 @@ static gint ett_ansi_map_InvokeData = -1; static gint ett_ansi_map_ReturnData = -1; /*--- End of included file: packet-ansi_map-ett.c ---*/ -#line 360 "../../asn1/ansi_map/packet-ansi_map-template.c" +#line 361 "../../asn1/ansi_map/packet-ansi_map-template.c" static expert_field ei_ansi_map_nr_not_used = EI_INIT; static expert_field ei_ansi_map_unknown_invokeData_blob = EI_INIT; @@ -1210,9 +1211,10 @@ update_saved_invokedata(packet_info *pinfo, struct ansi_tcap_private_t *p_privat case ANSI_MAP_TID_ONLY: buf = wmem_strdup(wmem_packet_scope(), p_private_tcap->TransactionID_str); break; - case 1: + case ANSI_MAP_TID_AND_SOURCE: buf = wmem_strdup_printf(wmem_packet_scope(), "%s%s",p_private_tcap->TransactionID_str,src_str); break; + case ANSI_MAP_TID_SOURCE_AND_DEST: default: buf = wmem_strdup_printf(wmem_packet_scope(), "%s%s%s",p_private_tcap->TransactionID_str,src_str,dst_str); break; @@ -15276,7 +15278,7 @@ dissect_ansi_map_QualificationRequest2Res(gboolean implicit_tag _U_, tvbuff_t *t /*--- End of included file: packet-ansi_map-fn.c ---*/ -#line 3631 "../../asn1/ansi_map/packet-ansi_map-template.c" +#line 3633 "../../asn1/ansi_map/packet-ansi_map-template.c" /* * 6.5.2.dk N.S0013-0 v 1.0,X.S0004-550-E v1.0 2.301 @@ -15992,9 +15994,10 @@ find_saved_invokedata(asn1_ctx_t *actx, struct ansi_tcap_private_t *p_private_tc case ANSI_MAP_TID_ONLY: g_snprintf(buf,1024,"%s",p_private_tcap->TransactionID_str); break; - case 1: + case ANSI_MAP_TID_AND_SOURCE: g_snprintf(buf,1024,"%s%s",p_private_tcap->TransactionID_str,dst_str); break; + case ANSI_MAP_TID_SOURCE_AND_DEST: default: g_snprintf(buf,1024,"%s%s%s",p_private_tcap->TransactionID_str,dst_str,src_str); break; @@ -19224,7 +19227,7 @@ void proto_register_ansi_map(void) { NULL, HFILL }}, /*--- End of included file: packet-ansi_map-hfarr.c ---*/ -#line 5386 "../../asn1/ansi_map/packet-ansi_map-template.c" +#line 5389 "../../asn1/ansi_map/packet-ansi_map-template.c" }; /* List of subtrees */ @@ -19485,7 +19488,7 @@ void proto_register_ansi_map(void) { &ett_ansi_map_ReturnData, /*--- End of included file: packet-ansi_map-ettarr.c ---*/ -#line 5419 "../../asn1/ansi_map/packet-ansi_map-template.c" +#line 5422 "../../asn1/ansi_map/packet-ansi_map-template.c" }; static ei_register_info ei[] = { @@ -19497,9 +19500,9 @@ void proto_register_ansi_map(void) { expert_module_t* expert_ansi_map; static const enum_val_t ansi_map_response_matching_type_values[] = { - {"Only Transaction ID will be used in Invoke/response matching", "Transaction ID only", 0}, - {"Transaction ID and Source will be used in Invoke/response matching", "Transaction ID and Source", 1}, - {"Transaction ID Source and Destination will be used in Invoke/response matching", "Transaction ID Source and Destination", 2}, + {"Only Transaction ID will be used in Invoke/response matching", "Transaction ID only", ANSI_MAP_TID_ONLY}, + {"Transaction ID and Source will be used in Invoke/response matching", "Transaction ID and Source", ANSI_MAP_TID_AND_SOURCE}, + {"Transaction ID Source and Destination will be used in Invoke/response matching", "Transaction ID Source and Destination", ANSI_MAP_TID_SOURCE_AND_DEST}, {NULL, NULL, -1} }; |