From ed3800368888a33a35e98909abfee30d83b80ea5 Mon Sep 17 00:00:00 2001 From: Bill Meier Date: Fri, 7 Nov 2008 17:20:15 +0000 Subject: asn2wrs regenerated files: see SVN #26728 svn path=/trunk/; revision=26729 --- epan/dissectors/packet-camel.c | 180 +++++++++++++++++++++-------------------- epan/dissectors/packet-cmp.c | 27 +++---- epan/dissectors/packet-inap.c | 22 +++-- epan/dissectors/packet-pcap.c | 52 +++++------- 4 files changed, 134 insertions(+), 147 deletions(-) diff --git a/epan/dissectors/packet-camel.c b/epan/dissectors/packet-camel.c index 7f399e0a93..c74830bef8 100644 --- a/epan/dissectors/packet-camel.c +++ b/epan/dissectors/packet-camel.c @@ -809,7 +809,6 @@ static gint ett_camel_InvokeId = -1; /* Preference settings default */ #define MAX_SSN 254 static range_t *global_ssn_range; -static range_t *ssn_range; static dissector_handle_t camel_handle; /* Global variables */ @@ -1123,7 +1122,7 @@ static const value_string camel_ectTreatmentIndicator_values[] = { #define noInvokeId NULL /*--- End of included file: packet-camel-val.h ---*/ -#line 271 "packet-camel-template.c" +#line 270 "packet-camel-template.c" /*--- Included file: packet-camel-table.c ---*/ @@ -1213,7 +1212,7 @@ static const value_string camel_err_code_string_vals[] = { /*--- End of included file: packet-camel-table.c ---*/ -#line 273 "packet-camel-template.c" +#line 272 "packet-camel-template.c" static char camel_number_to_char(int number) { @@ -6758,7 +6757,7 @@ static void dissect_CAP_U_ABORT_REASON_PDU(tvbuff_t *tvb _U_, packet_info *pinfo /*--- End of included file: packet-camel-fn.c ---*/ -#line 318 "packet-camel-template.c" +#line 317 "packet-camel-template.c" /*--- Included file: packet-camel-table2.c ---*/ @@ -6966,7 +6965,7 @@ static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,a /*--- End of included file: packet-camel-table2.c ---*/ -#line 320 "packet-camel-template.c" +#line 319 "packet-camel-template.c" /*--- Included file: packet-camel-table11.c ---*/ @@ -7037,7 +7036,7 @@ static const camel_op_t camel_op_tab[] = { /*--- End of included file: packet-camel-table11.c ---*/ -#line 322 "packet-camel-template.c" +#line 321 "packet-camel-template.c" /*--- Included file: packet-camel-table21.c ---*/ #line 1 "packet-camel-table21.c" @@ -7069,7 +7068,7 @@ static const camel_err_t camel_err_tab[] = { /*--- End of included file: packet-camel-table21.c ---*/ -#line 323 "packet-camel-template.c" +#line 322 "packet-camel-template.c" static guint8 camel_pdu_type = 0; static guint8 camel_pdu_size = 0; @@ -7238,18 +7237,21 @@ static void range_add_callback(guint32 ssn) } void proto_reg_handoff_camel(void) { - int i; - dissector_handle_t camel_arg_handle; - dissector_handle_t camel_res_handle; - dissector_handle_t camel_err_handle; + static gboolean camel_prefs_initialized = FALSE; + static range_t *ssn_range; - static int camel_prefs_initialized = FALSE; if (!camel_prefs_initialized) { + int i; + dissector_handle_t camel_arg_handle; + dissector_handle_t camel_res_handle; + dissector_handle_t camel_err_handle; + camel_prefs_initialized = TRUE; - camel_handle = create_dissector_handle(dissect_camel, proto_camel); + camel_handle = find_dissector("camel"); - camel_arg_handle = new_create_dissector_handle(dissect_camel_arg, proto_camel); - camel_res_handle = new_create_dissector_handle(dissect_camel_res, proto_camel); + camel_arg_handle = new_create_dissector_handle(dissect_camel_arg, proto_camel); + camel_res_handle = new_create_dissector_handle(dissect_camel_res, proto_camel); + camel_err_handle = new_create_dissector_handle(dissect_camel_err, proto_camel); register_ber_oid_dissector_handle("0.4.0.0.1.0.50.0",camel_handle, proto_camel, "CAP-v1-gsmSSF-to-gsmSCF-AC" ); register_ber_oid_dissector_handle("0.4.0.0.1.0.50.1",camel_handle, proto_camel, "CAP-v2-gsmSSF-to-gsmSCF-AC" ); @@ -7258,17 +7260,16 @@ void proto_reg_handoff_camel(void) { register_ber_oid_dissector_handle("0.4.0.0.1.21.3.50",camel_handle, proto_camel, "cap3-gprssf-scfAC" ); register_ber_oid_dissector_handle("0.4.0.0.1.21.3.51",camel_handle, proto_camel, "cap3-gsmscf-gprsssfAC" ); register_ber_oid_dissector_handle("0.4.0.0.1.21.3.61",camel_handle, proto_camel, "cap3-sms-AC" ); - register_ber_oid_dissector_handle("0.4.0.0.1.23.3.4",camel_handle, proto_camel, "capssf-scfGenericAC" ); + register_ber_oid_dissector_handle("0.4.0.0.1.23.3.4",camel_handle, proto_camel, "capssf-scfGenericAC" ); register_ber_oid_dissector_handle("0.4.0.0.1.23.3.61",camel_handle, proto_camel, "cap4-sms-AC" ); - for (i=0; i<(int)array_length(camel_op_tab); i++) { - dissector_add("camel.ros.local.arg", camel_op_tab[i].opcode, camel_arg_handle); - dissector_add("camel.ros.local.res", camel_op_tab[i].opcode, camel_res_handle); - } - camel_err_handle = new_create_dissector_handle(dissect_camel_err, proto_camel); - for (i=0; i<(int)array_length(camel_err_tab); i++) { - dissector_add("camel.ros.local.err", camel_err_tab[i].errcode, camel_err_handle); - } + for (i=0; i<(int)array_length(camel_op_tab); i++) { + dissector_add("camel.ros.local.arg", camel_op_tab[i].opcode, camel_arg_handle); + dissector_add("camel.ros.local.res", camel_op_tab[i].opcode, camel_res_handle); + } + for (i=0; i<(int)array_length(camel_err_tab); i++) { + dissector_add("camel.ros.local.err", camel_err_tab[i].errcode, camel_err_handle); + } /*--- Included file: packet-camel-dis-tab.c ---*/ @@ -7278,12 +7279,12 @@ void proto_reg_handoff_camel(void) { /*--- End of included file: packet-camel-dis-tab.c ---*/ -#line 524 "packet-camel-template.c" +#line 525 "packet-camel-template.c" } else { range_foreach(ssn_range, range_delete_callback); + g_free(ssn_range); } - g_free(ssn_range); ssn_range = range_copy(global_ssn_range); range_foreach(ssn_range, range_add_callback); @@ -7302,72 +7303,72 @@ void proto_register_camel(void) { { "local", "camel.error_code_local", FT_INT32, BASE_DEC, VALS(camel_err_code_string_vals), 0, "ERROR code", HFILL }}, - { &hf_camel_cause_indicator, /* Currently not enabled */ - { "Cause indicator", "camel.cause_indicator", - FT_UINT8, BASE_DEC, VALS(q850_cause_code_vals), 0x7f, - "", HFILL }}, - { &hf_digit, + { &hf_camel_cause_indicator, /* Currently not enabled */ + { "Cause indicator", "camel.cause_indicator", + FT_UINT8, BASE_DEC, VALS(q850_cause_code_vals), 0x7f, + "", HFILL }}, + { &hf_digit, { "Digit Value", "camel.digit_value", - FT_UINT8, BASE_DEC, VALS(digit_value), 0, "Digit Value", HFILL }}, - { &hf_camel_PDPTypeNumber_etsi, + FT_UINT8, BASE_DEC, VALS(digit_value), 0, "Digit Value", HFILL }}, + { &hf_camel_PDPTypeNumber_etsi, { "ETSI defined PDP Type Value", "camel.PDPTypeNumber_etsi", - FT_UINT8, BASE_HEX, VALS(gsm_map_etsi_defined_pdp_vals), 0, - "ETSI defined PDP Type Value", HFILL }}, - { &hf_camel_PDPTypeNumber_ietf, + FT_UINT8, BASE_HEX, VALS(gsm_map_etsi_defined_pdp_vals), 0, + "ETSI defined PDP Type Value", HFILL }}, + { &hf_camel_PDPTypeNumber_ietf, { "IETF defined PDP Type Value", "camel.PDPTypeNumber_ietf", - FT_UINT8, BASE_HEX, VALS(gsm_map_ietf_defined_pdp_vals), 0, - "IETF defined PDP Type Value", HFILL }}, - { &hf_camel_PDPAddress_IPv4, + FT_UINT8, BASE_HEX, VALS(gsm_map_ietf_defined_pdp_vals), 0, + "IETF defined PDP Type Value", HFILL }}, + { &hf_camel_PDPAddress_IPv4, { "PDPAddress IPv4", "camel.PDPAddress_IPv4", - FT_IPv4, BASE_NONE, NULL, 0, - "IPAddress IPv4", HFILL }}, - { &hf_camel_PDPAddress_IPv6, + FT_IPv4, BASE_NONE, NULL, 0, + "IPAddress IPv4", HFILL }}, + { &hf_camel_PDPAddress_IPv6, { "PDPAddress IPv6", "camel.PDPAddress_IPv6", - FT_IPv6, BASE_NONE, NULL, 0, - "IPAddress IPv6", HFILL }}, - { &hf_camel_cellGlobalIdOrServiceAreaIdFixedLength, + FT_IPv6, BASE_NONE, NULL, 0, + "IPAddress IPv6", HFILL }}, + { &hf_camel_cellGlobalIdOrServiceAreaIdFixedLength, { "CellGlobalIdOrServiceAreaIdFixedLength", "camel.CellGlobalIdOrServiceAreaIdFixedLength", FT_BYTES, BASE_HEX, NULL, 0, "LocationInformationGPRS/CellGlobalIdOrServiceAreaIdOrLAI", HFILL }}, - { &hf_camel_RP_Cause, + { &hf_camel_RP_Cause, { "RP Cause", "camel.RP_Cause", - FT_UINT8, BASE_DEC, NULL, 0, + FT_UINT8, BASE_DEC, NULL, 0, "RP Cause Value", HFILL }}, - { &hf_camel_CAMEL_AChBillingChargingCharacteristics, - { "CAMEL-AChBillingChargingCharacteristics", "camel.CAMEL_AChBillingChargingCharacteristics", - FT_UINT32, BASE_DEC, VALS(camel_CAMEL_AChBillingChargingCharacteristics_vals), 0, - "CAMEL-AChBillingChargingCharacteristics", HFILL }}, + { &hf_camel_CAMEL_AChBillingChargingCharacteristics, + { "CAMEL-AChBillingChargingCharacteristics", "camel.CAMEL_AChBillingChargingCharacteristics", + FT_UINT32, BASE_DEC, VALS(camel_CAMEL_AChBillingChargingCharacteristics_vals), 0, + "CAMEL-AChBillingChargingCharacteristics", HFILL }}, - { &hf_camel_CAMEL_FCIBillingChargingCharacteristics, - { "CAMEL-FCIBillingChargingCharacteristics", "camel.CAMEL_FCIBillingChargingCharacteristics", - FT_UINT32, BASE_DEC, VALS(camel_CAMEL_FCIBillingChargingCharacteristics_vals), 0, - "CAMEL-FCIBillingChargingCharacteristics", HFILL }}, - - { &hf_camel_CAMEL_FCIGPRSBillingChargingCharacteristics, - { "CAMEL-FCIGPRSBillingChargingCharacteristics", "camel.CAMEL_FCIGPRSBillingChargingCharacteristics", - FT_UINT32, BASE_DEC, NULL, 0, - "CAMEL-FCIGPRSBillingChargingCharacteristics", HFILL }}, - - { &hf_camel_CAMEL_FCISMSBillingChargingCharacteristics, - { "CAMEL-FCISMSBillingChargingCharacteristics", "camel.CAMEL_FCISMSBillingChargingCharacteristics", - FT_UINT32, BASE_DEC, VALS(camel_CAMEL_FCISMSBillingChargingCharacteristics_vals), 0, - "CAMEL-FCISMSBillingChargingCharacteristics", HFILL }}, - - { &hf_camel_CAMEL_SCIBillingChargingCharacteristics, - { "CAMEL-SCIBillingChargingCharacteristics", "camel.CAMEL_SCIBillingChargingCharacteristics", - FT_UINT32, BASE_DEC, VALS(camel_CAMEL_SCIBillingChargingCharacteristics_vals), 0, - "CAMEL-SCIBillingChargingCharacteristics", HFILL }}, - - { &hf_camel_CAMEL_SCIGPRSBillingChargingCharacteristics, - { "CAMEL-SCIGPRSBillingChargingCharacteristics", "camel.CAMEL_SCIGPRSBillingChargingCharacteristics", - FT_UINT32, BASE_DEC, NULL, 0, - "CAMEL-FSCIGPRSBillingChargingCharacteristics", HFILL }}, - - { &hf_camel_CAMEL_CallResult, - { "CAMEL-CAMEL_CallResult", "camel.CAMEL_CallResult", - FT_UINT32, BASE_DEC, VALS(camel_CAMEL_CallResult_vals), 0, - "CAMEL-CallResult", HFILL }}, + { &hf_camel_CAMEL_FCIBillingChargingCharacteristics, + { "CAMEL-FCIBillingChargingCharacteristics", "camel.CAMEL_FCIBillingChargingCharacteristics", + FT_UINT32, BASE_DEC, VALS(camel_CAMEL_FCIBillingChargingCharacteristics_vals), 0, + "CAMEL-FCIBillingChargingCharacteristics", HFILL }}, + + { &hf_camel_CAMEL_FCIGPRSBillingChargingCharacteristics, + { "CAMEL-FCIGPRSBillingChargingCharacteristics", "camel.CAMEL_FCIGPRSBillingChargingCharacteristics", + FT_UINT32, BASE_DEC, NULL, 0, + "CAMEL-FCIGPRSBillingChargingCharacteristics", HFILL }}, + + { &hf_camel_CAMEL_FCISMSBillingChargingCharacteristics, + { "CAMEL-FCISMSBillingChargingCharacteristics", "camel.CAMEL_FCISMSBillingChargingCharacteristics", + FT_UINT32, BASE_DEC, VALS(camel_CAMEL_FCISMSBillingChargingCharacteristics_vals), 0, + "CAMEL-FCISMSBillingChargingCharacteristics", HFILL }}, + + { &hf_camel_CAMEL_SCIBillingChargingCharacteristics, + { "CAMEL-SCIBillingChargingCharacteristics", "camel.CAMEL_SCIBillingChargingCharacteristics", + FT_UINT32, BASE_DEC, VALS(camel_CAMEL_SCIBillingChargingCharacteristics_vals), 0, + "CAMEL-SCIBillingChargingCharacteristics", HFILL }}, + + { &hf_camel_CAMEL_SCIGPRSBillingChargingCharacteristics, + { "CAMEL-SCIGPRSBillingChargingCharacteristics", "camel.CAMEL_SCIGPRSBillingChargingCharacteristics", + FT_UINT32, BASE_DEC, NULL, 0, + "CAMEL-FSCIGPRSBillingChargingCharacteristics", HFILL }}, + + { &hf_camel_CAMEL_CallResult, + { "CAMEL-CAMEL_CallResult", "camel.CAMEL_CallResult", + FT_UINT32, BASE_DEC, VALS(camel_CAMEL_CallResult_vals), 0, + "CAMEL-CallResult", HFILL }}, /* Camel Service Response Time */ { &hf_camelsrt_SessionId, @@ -7442,7 +7443,7 @@ void proto_register_camel(void) { FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0, "DeltaTime between EventReport(Disconnect) and Release Call", HFILL } }, - { &hf_camelsrt_DeltaTime80, + { &hf_camelsrt_DeltaTime80, { "Service Response Time", "camel.srt.deltatime80", FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0, @@ -9328,7 +9329,7 @@ void proto_register_camel(void) { "camel.InvokeId_present", HFILL }}, /*--- End of included file: packet-camel-hfarr.c ---*/ -#line 697 "packet-camel-template.c" +#line 698 "packet-camel-template.c" }; /* List of subtrees */ @@ -9531,7 +9532,7 @@ void proto_register_camel(void) { &ett_camel_InvokeId, /*--- End of included file: packet-camel-ettarr.c ---*/ -#line 710 "packet-camel-template.c" +#line 711 "packet-camel-template.c" }; /* Register protocol */ proto_camel = proto_register_protocol(PNAME, PSNAME, PFNAME); @@ -9544,14 +9545,19 @@ void proto_register_camel(void) { rose_ctx_init(&camel_rose_ctx); /* Register dissector tables */ - camel_rose_ctx.arg_local_dissector_table = register_dissector_table("camel.ros.local.arg", "CAMEL Operation Argument (local opcode)", FT_UINT32, BASE_HEX); - camel_rose_ctx.res_local_dissector_table = register_dissector_table("camel.ros.local.res", "CAMEL Operation Result (local opcode)", FT_UINT32, BASE_HEX); - camel_rose_ctx.err_local_dissector_table = register_dissector_table("camel.ros.local.err", "CAMEL Error (local opcode)", FT_UINT32, BASE_HEX); + camel_rose_ctx.arg_local_dissector_table = register_dissector_table("camel.ros.local.arg", + "CAMEL Operation Argument (local opcode)", + FT_UINT32, BASE_HEX); + camel_rose_ctx.res_local_dissector_table = register_dissector_table("camel.ros.local.res", + "CAMEL Operation Result (local opcode)", + FT_UINT32, BASE_HEX); + camel_rose_ctx.err_local_dissector_table = register_dissector_table("camel.ros.local.err", + "CAMEL Error (local opcode)", + FT_UINT32, BASE_HEX); /* Register our configuration options, particularly our ssn:s */ /* Set default SSNs */ range_convert_str(&global_ssn_range, "6-9", MAX_SSN); - ssn_range = range_empty(); camel_module = prefs_register_protocol(proto_camel, proto_reg_handoff_camel); diff --git a/epan/dissectors/packet-cmp.c b/epan/dissectors/packet-cmp.c index 0e49d7de68..0a2b20d3c0 100644 --- a/epan/dissectors/packet-cmp.c +++ b/epan/dissectors/packet-cmp.c @@ -67,17 +67,9 @@ /* desegmentation of CMP over TCP */ static gboolean cmp_desegment = TRUE; -static dissector_handle_t cmp_http_handle; -static dissector_handle_t cmp_tcp_style_http_handle; -static dissector_handle_t cmp_tcp_handle; - -static gboolean inited = FALSE; static guint cmp_alternate_tcp_port = 0; -static guint cmp_alternate_tcp_port_prev = 0; static guint cmp_alternate_http_port = 0; -static guint cmp_alternate_http_port_prev = 0; static guint cmp_alternate_tcp_style_http_port = 0; -static guint cmp_alternate_tcp_style_http_port_prev = 0; /* Initialize the protocol and registered fields */ int proto_cmp = -1; @@ -252,7 +244,7 @@ static int hf_cmp_PKIFailureInfo_systemFailure = -1; static int hf_cmp_PKIFailureInfo_duplicateCertReq = -1; /*--- End of included file: packet-cmp-hf.c ---*/ -#line 85 "packet-cmp-template.c" +#line 77 "packet-cmp-template.c" /* Initialize the subtree pointers */ static gint ett_cmp = -1; @@ -308,7 +300,7 @@ static gint ett_cmp_PollRepContent = -1; static gint ett_cmp_PollRepContent_item = -1; /*--- End of included file: packet-cmp-ett.c ---*/ -#line 89 "packet-cmp-template.c" +#line 81 "packet-cmp-template.c" static const char *object_identifier_id; @@ -1476,7 +1468,7 @@ static void dissect_SuppLangTagsValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo /*--- End of included file: packet-cmp-fn.c ---*/ -#line 94 "packet-cmp-template.c" +#line 86 "packet-cmp-template.c" static int dissect_cmp_pdu(tvbuff_t *tvb, proto_tree *tree, asn1_ctx_t *actx) @@ -2377,7 +2369,7 @@ void proto_register_cmp(void) { "", HFILL }}, /*--- End of included file: packet-cmp-hfarr.c ---*/ -#line 362 "packet-cmp-template.c" +#line 354 "packet-cmp-template.c" }; /* List of subtrees */ @@ -2435,7 +2427,7 @@ void proto_register_cmp(void) { &ett_cmp_PollRepContent_item, /*--- End of included file: packet-cmp-ettarr.c ---*/ -#line 368 "packet-cmp-template.c" +#line 360 "packet-cmp-template.c" }; module_t *cmp_module; @@ -2477,6 +2469,13 @@ void proto_register_cmp(void) { /*--- proto_reg_handoff_cmp -------------------------------------------*/ void proto_reg_handoff_cmp(void) { + static gboolean inited = FALSE; + static dissector_handle_t cmp_http_handle; + static dissector_handle_t cmp_tcp_style_http_handle; + static dissector_handle_t cmp_tcp_handle; + static guint cmp_alternate_tcp_port_prev = 0; + static guint cmp_alternate_http_port_prev = 0; + static guint cmp_alternate_tcp_style_http_port_prev = 0; if (!inited) { cmp_http_handle = new_create_dissector_handle(dissect_cmp_http, proto_cmp); @@ -2522,7 +2521,7 @@ void proto_reg_handoff_cmp(void) { /*--- End of included file: packet-cmp-dis-tab.c ---*/ -#line 433 "packet-cmp-template.c" +#line 432 "packet-cmp-template.c" inited = TRUE; } diff --git a/epan/dissectors/packet-inap.c b/epan/dissectors/packet-inap.c index b12c7d5fdb..b1e2a38c5a 100644 --- a/epan/dissectors/packet-inap.c +++ b/epan/dissectors/packet-inap.c @@ -1001,7 +1001,6 @@ static int hf_inap_InvokeId_present = -1; /* InvokeId_present */ #define MAX_SSN 254 static range_t *global_ssn_range; -static range_t *ssn_range; static dissector_handle_t inap_handle; @@ -1256,7 +1255,7 @@ static gint ett_inap_T_problem = -1; static gint ett_inap_InvokeId = -1; /*--- End of included file: packet-inap-ett.c ---*/ -#line 82 "packet-inap-template.c" +#line 81 "packet-inap-template.c" /*--- Included file: packet-inap-table.c ---*/ @@ -1364,7 +1363,7 @@ static const value_string inap_err_code_string_vals[] = { /*--- End of included file: packet-inap-table.c ---*/ -#line 84 "packet-inap-template.c" +#line 83 "packet-inap-template.c" const value_string inap_general_problem_strings[] = { {0,"General Problem Unrecognized Component"}, @@ -8784,7 +8783,7 @@ static int dissect_SRFCallGapArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, /*--- End of included file: packet-inap-fn.c ---*/ -#line 98 "packet-inap-template.c" +#line 97 "packet-inap-template.c" /* TC-Invokable OPERATION ::= {activateServiceFiltering | activityTest | analysedInformation | @@ -9123,7 +9122,7 @@ static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,a /*--- End of included file: packet-inap-table2.c ---*/ -#line 119 "packet-inap-template.c" +#line 118 "packet-inap-template.c" static guint8 inap_pdu_type = 0; @@ -9175,19 +9174,19 @@ static void range_add_callback(guint32 ssn) void proto_reg_handoff_inap(void) { - static int inap_prefs_initialized = FALSE; + static gboolean inap_prefs_initialized = FALSE; + static range_t *ssn_range; if (!inap_prefs_initialized) { inap_prefs_initialized = TRUE; - - inap_handle = create_dissector_handle(dissect_inap, proto_inap); + inap_handle = find_dissector("inap"); oid_add_from_string("Core-INAP-CS1-Codes","0.4.0.1.1.0.3.0"); } else { range_foreach(ssn_range, range_delete_callback); + g_free(ssn_range); } - g_free(ssn_range); ssn_range = range_copy(global_ssn_range); range_foreach(ssn_range, range_add_callback); @@ -11399,7 +11398,7 @@ void proto_register_inap(void) { "inap.InvokeId_present", HFILL }}, /*--- End of included file: packet-inap-hfarr.c ---*/ -#line 198 "packet-inap-template.c" +#line 197 "packet-inap-template.c" }; @@ -11649,7 +11648,7 @@ void proto_register_inap(void) { &ett_inap_InvokeId, /*--- End of included file: packet-inap-ettarr.c ---*/ -#line 210 "packet-inap-template.c" +#line 209 "packet-inap-template.c" }; /* Register protocol */ @@ -11661,7 +11660,6 @@ void proto_register_inap(void) { /* Set default SSNs */ range_convert_str(&global_ssn_range, "106,241", MAX_SSN); - ssn_range = range_empty(); inap_module = prefs_register_protocol(proto_inap, proto_reg_handoff_inap); diff --git a/epan/dissectors/packet-pcap.c b/epan/dissectors/packet-pcap.c index 854721cdba..5183a3b5e8 100644 --- a/epan/dissectors/packet-pcap.c +++ b/epan/dissectors/packet-pcap.c @@ -66,7 +66,6 @@ #define MAX_SSN 254 static range_t *global_ssn_range; -static range_t *ssn_range; static dissector_table_t sccp_ssn_table; @@ -209,9 +208,8 @@ typedef enum _ProtocolIE_ID_enum { } ProtocolIE_ID_enum; /*--- End of included file: packet-pcap-val.h ---*/ -#line 66 "packet-pcap-template.c" +#line 65 "packet-pcap-template.c" -static dissector_handle_t data_handle; static dissector_handle_t pcap_handle = NULL; /* Initialize the protocol and registered fields */ @@ -1077,7 +1075,7 @@ static int hf_pcap_AvailableSubChannelNumbers_subCh1 = -1; static int hf_pcap_AvailableSubChannelNumbers_subCh0 = -1; /*--- End of included file: packet-pcap-hf.c ---*/ -#line 74 "packet-pcap-template.c" +#line 72 "packet-pcap-template.c" /* Initialize the subtree pointers */ static int ett_pcap = -1; @@ -1409,7 +1407,7 @@ static gint ett_pcap_UnsuccessfulOutcome = -1; static gint ett_pcap_Outcome = -1; /*--- End of included file: packet-pcap-ett.c ---*/ -#line 79 "packet-pcap-template.c" +#line 77 "packet-pcap-template.c" /* Global variables */ static guint32 ProcedureCode; @@ -11050,7 +11048,7 @@ static int dissect_PCAP_PDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto /*--- End of included file: packet-pcap-fn.c ---*/ -#line 103 "packet-pcap-template.c" +#line 101 "packet-pcap-template.c" static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { @@ -11114,32 +11112,17 @@ static void range_add_callback(guint32 ssn) } } - -static void init_pcap(void) { - if (ssn_range) { - range_foreach(ssn_range, range_delete_callback); - g_free(ssn_range); - } - - ssn_range = range_copy(global_ssn_range); - range_foreach(ssn_range, range_add_callback); -} - - /*--- proto_reg_handoff_pcap ---------------------------------------*/ void proto_reg_handoff_pcap(void) { - static gboolean prefs_initialized = FALSE; + static range_t *ssn_range; if (! prefs_initialized) { + pcap_handle = find_dissector("pcap"); sccp_ssn_table = find_dissector_table("sccp.ssn"); prefs_initialized = TRUE; - } - - data_handle = find_dissector("data"); - /*--- Included file: packet-pcap-dis-tab.c ---*/ #line 1 "packet-pcap-dis-tab.c" @@ -11233,7 +11216,13 @@ proto_reg_handoff_pcap(void) /*--- End of included file: packet-pcap-dis-tab.c ---*/ -#line 193 "packet-pcap-template.c" +#line 176 "packet-pcap-template.c" + } else { + range_foreach(ssn_range, range_delete_callback); + g_free(ssn_range); + } + ssn_range = range_copy(global_ssn_range); + range_foreach(ssn_range, range_add_callback); } /*--- proto_register_pcap -------------------------------------------*/ @@ -14664,7 +14653,7 @@ void proto_register_pcap(void) { "", HFILL }}, /*--- End of included file: packet-pcap-hfarr.c ---*/ -#line 203 "packet-pcap-template.c" +#line 192 "packet-pcap-template.c" }; /* List of subtrees */ @@ -14997,7 +14986,7 @@ void proto_register_pcap(void) { &ett_pcap_Outcome, /*--- End of included file: packet-pcap-ettarr.c ---*/ -#line 209 "packet-pcap-template.c" +#line 198 "packet-pcap-template.c" }; module_t *pcap_module; @@ -15012,7 +15001,6 @@ void proto_register_pcap(void) { /* Register dissector */ register_dissector("pcap", dissect_pcap, proto_pcap); - pcap_handle = find_dissector("pcap"); /* Register dissector tables */ pcap_ies_dissector_table = register_dissector_table("pcap.ies", "PCAP-PROTOCOL-IES", FT_UINT32, BASE_DEC); @@ -15026,16 +15014,12 @@ void proto_register_pcap(void) { /* Preferences */ - /* Set default SSNs */ + /* Set default SSNs */ range_convert_str(&global_ssn_range, "", MAX_SSN); - ssn_range = range_empty(); prefs_register_range_preference(pcap_module, "ssn", "SCCP SSNs", - "SCCP (and SUA) SSNs to decode as PCAP", - &global_ssn_range, MAX_SSN); - - - register_init_routine(&init_pcap); + "SCCP (and SUA) SSNs to decode as PCAP", + &global_ssn_range, MAX_SSN); } -- cgit v1.2.3