diff options
Diffstat (limited to 'epan/dissectors')
26 files changed, 652 insertions, 723 deletions
diff --git a/epan/dissectors/packet-ansi_tcap.c b/epan/dissectors/packet-ansi_tcap.c index f4683a2468..a29d3e676f 100644 --- a/epan/dissectors/packet-ansi_tcap.c +++ b/epan/dissectors/packet-ansi_tcap.c @@ -1366,7 +1366,6 @@ dissect_ansi_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) */ if ( p_tcap_context && cur_oid && !p_tcap_context->oid_present ) { /* Save the application context and the sub dissector */ - ber_oid_dissector_table = find_dissector_table("ber.oid"); g_strlcpy(p_tcap_context->oid,cur_oid, LENGTH_OID); if ( (subdissector_handle = dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) { p_tcap_context->subdissector_handle=subdissector_handle; @@ -1638,7 +1637,7 @@ proto_register_ansi_tcap(void) "ansi_tcap.T_paramSet", HFILL }}, /*--- End of included file: packet-ansi_tcap-hfarr.c ---*/ -#line 440 "packet-ansi_tcap-template.c" +#line 439 "packet-ansi_tcap-template.c" }; /* Setup protocol subtree array */ @@ -1675,7 +1674,7 @@ proto_register_ansi_tcap(void) &ett_ansi_tcap_T_paramSet, /*--- End of included file: packet-ansi_tcap-ettarr.c ---*/ -#line 450 "packet-ansi_tcap-template.c" +#line 449 "packet-ansi_tcap-template.c" }; /*static enum_val_t tcap_options[] = { diff --git a/epan/dissectors/packet-gsm_map.c b/epan/dissectors/packet-gsm_map.c index e9ccb65dc8..364c764339 100644 --- a/epan/dissectors/packet-gsm_map.c +++ b/epan/dissectors/packet-gsm_map.c @@ -1950,7 +1950,6 @@ static dissector_handle_t map_handle; /* Preferenc settings default */ #define MAX_SSN 254 static range_t *global_ssn_range; -static range_t *ssn_range; /* Global variables */ static guint32 opcode=0; @@ -15506,7 +15505,7 @@ dissect_gsm_ss_LCS_PeriodicLocationCancellationArg(gboolean implicit_tag _U_, tv /*--- End of included file: packet-gsm_map-fn.c ---*/ -#line 724 "packet-gsmmap-template.c" +#line 723 "packet-gsmmap-template.c" /* Specific translation for MAP V3 */ const value_string gsm_map_V1V2_opr_code_strings[] = { @@ -15719,7 +15718,7 @@ const value_string gsm_map_opr_code_strings[] = { { 109, "lcs_PeriodicLocationCancellation" }, /*--- End of included file: packet-gsm_map-table.c ---*/ -#line 735 "packet-gsmmap-template.c" +#line 734 "packet-gsmmap-template.c" { 0, NULL } }; static const value_string gsm_map_err_code_string_vals[] = { @@ -15925,7 +15924,7 @@ static const value_string gsm_map_err_code_string_vals[] = { { 109, "lcs_PeriodicLocationCancellation" }, /*--- End of included file: packet-gsm_map-table.c ---*/ -#line 739 "packet-gsmmap-template.c" +#line 738 "packet-gsmmap-template.c" { 0, NULL } }; static const true_false_string gsm_map_extension_value = { @@ -17243,102 +17242,103 @@ static void range_add_callback(guint32 ssn) void proto_reg_handoff_gsm_map(void) { - static int map_prefs_initialized = FALSE; - data_handle = find_dissector("data"); - ranap_handle = find_dissector("ranap"); - dtap_handle = find_dissector("gsm_a_dtap"); + static gboolean map_prefs_initialized = FALSE; + static range_t *ssn_range; if (!map_prefs_initialized) { map_prefs_initialized = TRUE; - map_handle = create_dissector_handle(dissect_gsm_map, proto_gsm_map); - register_ber_oid_dissector_handle("0.4.0.0.1.0.1.3", map_handle, proto_gsm_map,"networkLocUpContext-v3"); - register_ber_oid_dissector_handle("0.4.0.0.1.0.1.2", map_handle, proto_gsm_map,"networkLocUpContext-v2" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.1.1", map_handle, proto_gsm_map,"networkLocUpContext-v1" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.2.3", map_handle, proto_gsm_map,"locationCancellationContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.2.2", map_handle, proto_gsm_map,"locationCancellationContext-v2" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.2.1", map_handle, proto_gsm_map,"locationCancellationContext-v1" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.3.3", map_handle, proto_gsm_map,"roamingNumberEnquiryContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.3.2", map_handle, proto_gsm_map,"roamingNumberEnquiryContext-v2" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.3.1", map_handle, proto_gsm_map,"roamingNumberEnquiryContext-v1" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.4.3", map_handle, proto_gsm_map,"istAlertingContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.5.3", map_handle, proto_gsm_map,"locationInfoRetrievalContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.5.2", map_handle, proto_gsm_map,"locationInfoRetrievalContext-v2" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.5.1", map_handle, proto_gsm_map,"locationInfoRetrievalContext-v1" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.6.4", map_handle, proto_gsm_map,"callControlTransferContext-v4" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.6.3", map_handle, proto_gsm_map,"callControlTransferContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.7.3", map_handle, proto_gsm_map,"reportingContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.8.3", map_handle, proto_gsm_map,"callCompletionContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.9.3", map_handle, proto_gsm_map,"serviceTerminationContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.10.2", map_handle, proto_gsm_map,"resetContext-v2" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.10.1", map_handle, proto_gsm_map,"resetContext-v1" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.11.3", map_handle, proto_gsm_map,"handoverControlContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.11.2", map_handle, proto_gsm_map,"handoverControlContext-v2" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.11.1", map_handle, proto_gsm_map,"handoverControlContext-v1" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.12.3", map_handle, proto_gsm_map,"sIWFSAllocationContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.13.3", map_handle, proto_gsm_map,"equipmentMngtContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.13.2", map_handle, proto_gsm_map,"equipmentMngtContext-v2" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.13.1", map_handle, proto_gsm_map,"equipmentMngtContext-v1" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.14.3", map_handle, proto_gsm_map,"infoRetrievalContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.14.2", map_handle, proto_gsm_map,"infoRetrievalContext-v2" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.14.1", map_handle, proto_gsm_map,"infoRetrievalContext-v1" ); - /* fallback to infoRetrieval(14) version1(1) and not interVlrInfoRetrieval(15) version1(1) */ - /*register_ber_oid_dissector_handle("0.4.0.0.1.0.15.1", map_handle, proto_gsm_map,"map-ac interVlrInfoRetrieval(15) version1(1)" );*/ - register_ber_oid_dissector_handle("0.4.0.0.1.0.15.2", map_handle, proto_gsm_map,"interVlrInfoRetrievalContext-v2" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.15.3", map_handle, proto_gsm_map,"interVlrInfoRetrievalContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.16.3", map_handle, proto_gsm_map,"subscriberDataMngtContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.16.2", map_handle, proto_gsm_map,"subscriberDataMngtContext-v2" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.16.1", map_handle, proto_gsm_map,"subscriberDataMngtContext-v1" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.17.3", map_handle, proto_gsm_map,"tracingContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.17.2", map_handle, proto_gsm_map,"tracingContext-v2" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.17.1", map_handle, proto_gsm_map,"tracingContext-v1" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.18.2", map_handle, proto_gsm_map,"networkFunctionalSsContext-v2" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.18.1", map_handle, proto_gsm_map,"networkFunctionalSsContext-v1" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.19.2", map_handle, proto_gsm_map,"networkUnstructuredSsContext-v2" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.20.3", map_handle, proto_gsm_map,"shortMsgGatewayContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.20.2", map_handle, proto_gsm_map,"shortMsgGatewayContext-v2" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.20.1", map_handle, proto_gsm_map,"shortMsgGatewayContext-v1" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.21.3", map_handle, proto_gsm_map,"shortMsgMO-RelayContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.21.2", map_handle, proto_gsm_map,"shortMsgMO-RelayContext-v2" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.21.1", map_handle, proto_gsm_map,"shortMsgMO-RelayContext-v1" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.22.3", map_handle, proto_gsm_map,"subscriberDataModificationNotificationContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.23.2", map_handle, proto_gsm_map,"shortMsgAlertContext-v2" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.23.1", map_handle, proto_gsm_map,"shortMsgAlertContext-v1" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.24.3", map_handle, proto_gsm_map,"mwdMngtContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.24.2", map_handle, proto_gsm_map,"mwdMngtContext-v2" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.24.1", map_handle, proto_gsm_map,"mwdMngtContext-v1" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.25.3", map_handle, proto_gsm_map,"shortMsgMT-RelayContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.25.2", map_handle, proto_gsm_map,"shortMsgMT-RelayContext-v2" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.26.2", map_handle, proto_gsm_map,"imsiRetrievalContext-v2" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.27.2", map_handle, proto_gsm_map,"msPurgingContext-v2" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.27.3", map_handle, proto_gsm_map,"msPurgingContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.28.3", map_handle, proto_gsm_map,"subscriberInfoEnquiryContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.29.3", map_handle, proto_gsm_map,"anyTimeInfoEnquiryContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.31.3", map_handle, proto_gsm_map,"groupCallControlContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.32.3", map_handle, proto_gsm_map,"gprsLocationUpdateContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.33.4", map_handle, proto_gsm_map,"gprsLocationInfoRetrievalContext-v4" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.33.3", map_handle, proto_gsm_map,"gprsLocationInfoRetrievalContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.34.3", map_handle, proto_gsm_map,"failureReportContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.35.3", map_handle, proto_gsm_map,"gprsNotifyContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.36.3", map_handle, proto_gsm_map,"ss-InvocationNotificationContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.37.3", map_handle, proto_gsm_map,"locationSvcGatewayContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.38.3", map_handle, proto_gsm_map,"locationSvcEnquiryContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.39.3", map_handle, proto_gsm_map,"authenticationFailureReportContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.40.3", map_handle, proto_gsm_map,"secureTransportHandlingContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.41.3", map_handle, proto_gsm_map,"shortMsgMT-Relay-VGCS-Context-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.42.3", map_handle, proto_gsm_map,"mm-EventReportingContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.43.3", map_handle, proto_gsm_map,"anyTimeInfoHandlingContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.44.3", map_handle, proto_gsm_map,"resourceManagementContext-v3" ); - register_ber_oid_dissector_handle("0.4.0.0.1.0.45.3", map_handle, proto_gsm_map,"groupCallInfoRetrievalContext-v3" ); - /* Private extension container */ - register_ber_oid_dissector("1.3.12.2.1006.53.2.1.3", dissect_gsm_mapext_PlmnContainer, proto_gsm_map,"alcatel-E10-MAP-extension-PlmnContainer" ); + data_handle = find_dissector("data"); + ranap_handle = find_dissector("ranap"); + dtap_handle = find_dissector("gsm_a_dtap"); + + map_handle = find_dissector("gsm_map"); + register_ber_oid_dissector_handle("0.4.0.0.1.0.1.3", map_handle, proto_gsm_map,"networkLocUpContext-v3"); + register_ber_oid_dissector_handle("0.4.0.0.1.0.1.2", map_handle, proto_gsm_map,"networkLocUpContext-v2" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.1.1", map_handle, proto_gsm_map,"networkLocUpContext-v1" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.2.3", map_handle, proto_gsm_map,"locationCancellationContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.2.2", map_handle, proto_gsm_map,"locationCancellationContext-v2" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.2.1", map_handle, proto_gsm_map,"locationCancellationContext-v1" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.3.3", map_handle, proto_gsm_map,"roamingNumberEnquiryContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.3.2", map_handle, proto_gsm_map,"roamingNumberEnquiryContext-v2" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.3.1", map_handle, proto_gsm_map,"roamingNumberEnquiryContext-v1" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.4.3", map_handle, proto_gsm_map,"istAlertingContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.5.3", map_handle, proto_gsm_map,"locationInfoRetrievalContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.5.2", map_handle, proto_gsm_map,"locationInfoRetrievalContext-v2" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.5.1", map_handle, proto_gsm_map,"locationInfoRetrievalContext-v1" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.6.4", map_handle, proto_gsm_map,"callControlTransferContext-v4" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.6.3", map_handle, proto_gsm_map,"callControlTransferContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.7.3", map_handle, proto_gsm_map,"reportingContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.8.3", map_handle, proto_gsm_map,"callCompletionContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.9.3", map_handle, proto_gsm_map,"serviceTerminationContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.10.2", map_handle, proto_gsm_map,"resetContext-v2" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.10.1", map_handle, proto_gsm_map,"resetContext-v1" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.11.3", map_handle, proto_gsm_map,"handoverControlContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.11.2", map_handle, proto_gsm_map,"handoverControlContext-v2" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.11.1", map_handle, proto_gsm_map,"handoverControlContext-v1" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.12.3", map_handle, proto_gsm_map,"sIWFSAllocationContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.13.3", map_handle, proto_gsm_map,"equipmentMngtContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.13.2", map_handle, proto_gsm_map,"equipmentMngtContext-v2" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.13.1", map_handle, proto_gsm_map,"equipmentMngtContext-v1" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.14.3", map_handle, proto_gsm_map,"infoRetrievalContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.14.2", map_handle, proto_gsm_map,"infoRetrievalContext-v2" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.14.1", map_handle, proto_gsm_map,"infoRetrievalContext-v1" ); + /* fallback to infoRetrieval(14) version1(1) and not interVlrInfoRetrieval(15) version1(1) */ + /*register_ber_oid_dissector_handle("0.4.0.0.1.0.15.1", map_handle, proto_gsm_map,"map-ac interVlrInfoRetrieval(15) version1(1)" );*/ + register_ber_oid_dissector_handle("0.4.0.0.1.0.15.2", map_handle, proto_gsm_map,"interVlrInfoRetrievalContext-v2" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.15.3", map_handle, proto_gsm_map,"interVlrInfoRetrievalContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.16.3", map_handle, proto_gsm_map,"subscriberDataMngtContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.16.2", map_handle, proto_gsm_map,"subscriberDataMngtContext-v2" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.16.1", map_handle, proto_gsm_map,"subscriberDataMngtContext-v1" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.17.3", map_handle, proto_gsm_map,"tracingContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.17.2", map_handle, proto_gsm_map,"tracingContext-v2" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.17.1", map_handle, proto_gsm_map,"tracingContext-v1" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.18.2", map_handle, proto_gsm_map,"networkFunctionalSsContext-v2" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.18.1", map_handle, proto_gsm_map,"networkFunctionalSsContext-v1" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.19.2", map_handle, proto_gsm_map,"networkUnstructuredSsContext-v2" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.20.3", map_handle, proto_gsm_map,"shortMsgGatewayContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.20.2", map_handle, proto_gsm_map,"shortMsgGatewayContext-v2" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.20.1", map_handle, proto_gsm_map,"shortMsgGatewayContext-v1" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.21.3", map_handle, proto_gsm_map,"shortMsgMO-RelayContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.21.2", map_handle, proto_gsm_map,"shortMsgMO-RelayContext-v2" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.21.1", map_handle, proto_gsm_map,"shortMsgMO-RelayContext-v1" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.22.3", map_handle, proto_gsm_map,"subscriberDataModificationNotificationContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.23.2", map_handle, proto_gsm_map,"shortMsgAlertContext-v2" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.23.1", map_handle, proto_gsm_map,"shortMsgAlertContext-v1" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.24.3", map_handle, proto_gsm_map,"mwdMngtContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.24.2", map_handle, proto_gsm_map,"mwdMngtContext-v2" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.24.1", map_handle, proto_gsm_map,"mwdMngtContext-v1" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.25.3", map_handle, proto_gsm_map,"shortMsgMT-RelayContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.25.2", map_handle, proto_gsm_map,"shortMsgMT-RelayContext-v2" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.26.2", map_handle, proto_gsm_map,"imsiRetrievalContext-v2" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.27.2", map_handle, proto_gsm_map,"msPurgingContext-v2" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.27.3", map_handle, proto_gsm_map,"msPurgingContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.28.3", map_handle, proto_gsm_map,"subscriberInfoEnquiryContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.29.3", map_handle, proto_gsm_map,"anyTimeInfoEnquiryContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.31.3", map_handle, proto_gsm_map,"groupCallControlContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.32.3", map_handle, proto_gsm_map,"gprsLocationUpdateContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.33.4", map_handle, proto_gsm_map,"gprsLocationInfoRetrievalContext-v4" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.33.3", map_handle, proto_gsm_map,"gprsLocationInfoRetrievalContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.34.3", map_handle, proto_gsm_map,"failureReportContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.35.3", map_handle, proto_gsm_map,"gprsNotifyContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.36.3", map_handle, proto_gsm_map,"ss-InvocationNotificationContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.37.3", map_handle, proto_gsm_map,"locationSvcGatewayContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.38.3", map_handle, proto_gsm_map,"locationSvcEnquiryContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.39.3", map_handle, proto_gsm_map,"authenticationFailureReportContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.40.3", map_handle, proto_gsm_map,"secureTransportHandlingContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.41.3", map_handle, proto_gsm_map,"shortMsgMT-Relay-VGCS-Context-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.42.3", map_handle, proto_gsm_map,"mm-EventReportingContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.43.3", map_handle, proto_gsm_map,"anyTimeInfoHandlingContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.44.3", map_handle, proto_gsm_map,"resourceManagementContext-v3" ); + register_ber_oid_dissector_handle("0.4.0.0.1.0.45.3", map_handle, proto_gsm_map,"groupCallInfoRetrievalContext-v3" ); + /* Private extension container */ + register_ber_oid_dissector("1.3.12.2.1006.53.2.1.3", dissect_gsm_mapext_PlmnContainer, proto_gsm_map,"alcatel-E10-MAP-extension-PlmnContainer" ); } 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); } @@ -17349,255 +17349,255 @@ void proto_register_gsm_map(void) { /* List of fields */ static hf_register_info hf[] = { - { &hf_gsm_map_old_Component_PDU, - { "Component", "gsm_map.old.Component", - FT_UINT32, BASE_DEC, VALS(gsm_old_Component_vals), 0, - "gsm_map.old.Component", HFILL }}, - { &hf_gsm_map_getPassword, - { "getPassword", "gsm_map.getPassword", - FT_BYTES, BASE_HEX, NULL, 0, - "getPassword", HFILL }}, - { &hf_gsm_map_currentPassword, - { "currentPassword", "gsm_map.currentPassword", - FT_STRING, BASE_NONE, NULL, 0, - "", HFILL }}, - { &hf_gsm_map_extension, - { "Extension", "gsm_map.extension", - FT_BOOLEAN, 8, TFS(&gsm_map_extension_value), 0x80, - "Extension", HFILL }}, - { &hf_gsm_map_nature_of_number, - { "Nature of number", "gsm_map.nature_of_number", - FT_UINT8, BASE_HEX, VALS(gsm_map_nature_of_number_values), 0x70, - "Nature of number", HFILL }}, - { &hf_gsm_map_number_plan, - { "Number plan", "gsm_map.number_plan", - FT_UINT8, BASE_HEX, VALS(gsm_map_number_plan_values), 0x0f, - "Number plan", HFILL }}, - { &hf_gsm_map_isdn_address_digits, - { "ISDN Address digits", "gsm_map.isdn.address.digits", - FT_STRING, BASE_NONE, NULL, 0, - "ISDN Address digits", HFILL }}, - { &hf_gsm_map_address_digits, - { "Address digits", "gsm_map.address.digits", - FT_STRING, BASE_NONE, NULL, 0, - "Address digits", HFILL }}, - { &hf_gsm_map_servicecentreaddress_digits, - { "ServiceCentreAddress digits", "gsm_map.servicecentreaddress_digits", - FT_STRING, BASE_NONE, NULL, 0, - "ServiceCentreAddress digits", HFILL }}, - { &hf_gsm_map_imsi_digits, - { "IMSI digits", "gsm_map.imsi_digits", - FT_STRING, BASE_NONE, NULL, 0, - "IMSI digits", HFILL }}, - { &hf_gsm_map_TBCD_digits, - { "TBCD digits", "gsm_map.imsi_digits", - FT_STRING, BASE_NONE, NULL, 0, - "TBCD digits", HFILL }}, - { &hf_gsm_map_Ss_Status_unused, - { "Unused", "gsm_map.unused", - FT_UINT8, BASE_HEX, NULL, 0xf0, - "Unused", HFILL }}, - { &hf_gsm_map_Ss_Status_q_bit, - { "Q bit", "gsm_map.ss_status_q_bit", - FT_BOOLEAN, 8, TFS(&gsm_map_Ss_Status_q_bit_values), 0x08, - "Q bit", HFILL }}, - { &hf_gsm_map_Ss_Status_p_bit, - { "P bit", "gsm_map.ss_status_p_bit", - FT_BOOLEAN, 8, TFS(&gsm_map_Ss_Status_p_values), 0x04, - "P bit", HFILL }}, - { &hf_gsm_map_Ss_Status_r_bit, - { "R bit", "gsm_map.ss_status_r_bit", - FT_BOOLEAN, 8, TFS(&gsm_map_Ss_Status_r_values), 0x02, - "R bit", HFILL }}, - { &hf_gsm_map_Ss_Status_a_bit, - { "A bit", "gsm_map.ss_status_a_bit", - FT_BOOLEAN, 8, TFS(&gsm_map_Ss_Status_a_values), 0x01, - "A bit", HFILL }}, - { &hf_gsm_map_notification_to_forwarding_party, - { "Notification to forwarding party", "gsm_map.notification_to_forwarding_party", - FT_BOOLEAN, 8, TFS(¬ification_value), 0x80, - "Notification to forwarding party", HFILL }}, - { &hf_gsm_map_redirecting_presentation, - { "Redirecting presentation", "gsm_map.redirecting_presentation", - FT_BOOLEAN, 8, TFS(&redirecting_presentation_value), 0x40, - "Redirecting presentation", HFILL }}, - { &hf_gsm_map_notification_to_calling_party, - { "Notification to calling party", "gsm_map.notification_to_clling_party", - FT_BOOLEAN, 8, TFS(¬ification_value), 0x20, - "Notification to calling party", HFILL }}, - { &hf_gsm_map_forwarding_reason, - { "Forwarding reason", "gsm_map.forwarding_reason", - FT_UINT8, BASE_HEX, VALS(forwarding_reason_values), 0x0c, - "forwarding reason", HFILL }}, - { &hf_gsm_map_pdp_type_org, - { "PDP Type Organization", "gsm_map.pdp_type_org", - FT_UINT8, BASE_HEX, VALS(pdp_type_org_values), 0x0f, - "PDP Type Organization", HFILL }}, - { &hf_gsm_map_etsi_pdp_type_number, - { "PDP Type Number", "gsm_map.pdp_type_org", - FT_UINT8, BASE_HEX, VALS(etsi_pdp_type_number_values), 0, - "ETSI PDP Type Number", HFILL }}, - { &hf_gsm_map_ietf_pdp_type_number, - { "PDP Type Number", "gsm_map.ietf_pdp_type_number", - FT_UINT8, BASE_HEX, VALS(ietf_pdp_type_number_values), 0, - "IETF PDP Type Number", HFILL }}, - { &hf_gsm_map_ext_qos_subscribed_pri, - { "Allocation/Retention priority", "gsm_map.ext_qos_subscribed_pri", - FT_UINT8, BASE_DEC, NULL, 0xff, - "Allocation/Retention priority", HFILL }}, - { &hf_gsm_map_qos_traffic_cls, - { "Traffic class", "gsm_map.qos.traffic_cls", - FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0xe0, - "Traffic class", HFILL }}, - { &hf_gsm_map_qos_del_order, - { "Delivery order", "gsm_map.qos.del_order", - FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0x18, - "Delivery order", HFILL }}, - { &hf_gsm_map_qos_del_of_err_sdu, - { "Delivery of erroneous SDUs", "gsm_map.qos.del_of_err_sdu", - FT_UINT8, BASE_DEC, VALS(gsm_a_qos_del_of_err_sdu_vals), 0x03, - "Delivery of erroneous SDUs", HFILL }}, - { &hf_gsm_map_qos_ber, - { "Residual Bit Error Rate (BER)", "gsm_map.qos.ber", - FT_UINT8, BASE_DEC, VALS(gsm_a_qos_ber_vals), 0xf0, - "Residual Bit Error Rate (BER)", HFILL }}, - { &hf_gsm_map_qos_sdu_err_rat, - { "SDU error ratio", "gsm_map.qos.sdu_err_rat", - FT_UINT8, BASE_DEC, VALS(gsm_a_qos_sdu_err_rat_vals), 0x0f, - "SDU error ratio", HFILL }}, - { &hf_gsm_map_qos_traff_hdl_pri, - { "Traffic handling priority", "gsm_map.qos.traff_hdl_pri", - FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traff_hdl_pri_vals), 0x03, - "Traffic handling priority", HFILL }}, - - { &hf_gsm_map_qos_max_sdu, - { "Maximum SDU size", "gsm_map.qos.max_sdu", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Maximum SDU size", HFILL }}, - { &hf_gsm_map_max_brate_ulink, - { "Maximum bit rate for uplink in kbit/s", "gsm_map.qos.max_brate_ulink", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Maximum bit rate for uplink", HFILL }}, - { &hf_gsm_map_max_brate_dlink, - { "Maximum bit rate for downlink in kbit/s", "gsm_map.qos.max_brate_dlink", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Maximum bit rate for downlink", HFILL }}, - { &hf_gsm_map_qos_transfer_delay, - { "Transfer delay (Raw data see TS 24.008 for interpretation)", "gsm_map.qos.transfer_delay", - FT_UINT8, BASE_DEC, NULL, 0xfc, - "Transfer delay", HFILL }}, - { &hf_gsm_map_guaranteed_max_brate_ulink, - { "Guaranteed bit rate for uplink in kbit/s", "gsm_map.qos.brate_ulink", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Guaranteed bit rate for uplink", HFILL }}, - { &hf_gsm_map_guaranteed_max_brate_dlink, - { "Guaranteed bit rate for downlink in kbit/s", "gsm_map.qos.brate_dlink", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Guaranteed bit rate for downlink", HFILL }}, - { &hf_gsm_map_GSNAddress_IPv4, - { "GSN-Address IPv4", "gsm_map.gsnaddress_ipv4", - FT_IPv4, BASE_NONE, NULL, 0, - "IPAddress IPv4", HFILL }}, - { &hf_gsm_map_GSNAddress_IPv6, - { "GSN Address IPv6", "gsm_map.gsnaddress_ipv6", - FT_IPv4, BASE_NONE, NULL, 0, - "IPAddress IPv6", HFILL }}, - { &hf_gsm_map_ranap_service_Handover, - { "service-Handover", "gsm_map.ranap.service_Handover", - FT_UINT32, BASE_DEC, VALS(ranap_Service_Handover_vals), 0, - "gsm_map.ranap.Service_Handover", HFILL }}, - { &hf_gsm_map_IntegrityProtectionInformation, - { "IntegrityProtectionInformation", "gsm_map.ranap.IntegrityProtectionInformation", - FT_NONE, BASE_NONE, NULL, 0, - "gsm_map.ranap.IntegrityProtectionInformation", HFILL }}, - { &hf_gsm_map_EncryptionInformation, - { "EncryptionInformation", "gsm_map.ranap.EncryptionInformation", - FT_NONE, BASE_NONE, NULL, 0, - "gsm_map.ranap.EncryptionInformation", HFILL }}, - { &hf_gsm_map_PlmnContainer_PDU, - { "PlmnContainer", "gsm_map.PlmnContainer", - FT_NONE, BASE_NONE, NULL, 0, - "gsm_map.PlmnContainer", HFILL }}, - { &hf_gsm_map_ss_SS_UserData, - { "SS-UserData", "gsm_ss.SS_UserData", - FT_STRING, BASE_NONE, NULL, 0, - "gsm_map.ss.SS_UserData", HFILL }}, - { &hf_gsm_map_cbs_coding_grp, - { "Coding Group","gsm_map.cbs.coding_grp", - FT_UINT8,BASE_DEC, VALS(gsm_map_cbs_data_coding_scheme_coding_grp_vals), 0xf0, - "Coding Group", HFILL } - }, - { &hf_gsm_map_cbs_coding_grp0_lang, - { "Language","gsm_map.cbs.coding_grp0_lang", - FT_UINT8,BASE_DEC, VALS(gsm_map_cbs_coding_grp0_lang_vals), 0x0f, - "Language", HFILL } - }, - { &hf_gsm_map_cbs_coding_grp1_lang, - { "Language","gsm_map.cbs.coding_grp1_lang", - FT_UINT8,BASE_DEC, VALS(gsm_map_cbs_coding_grp1_lang_vals), 0x0f, - "Language", HFILL } - }, - { &hf_gsm_map_cbs_coding_grp2_lang, - { "Language","gsm_map.cbs.coding_grp2_lang", - FT_UINT8,BASE_DEC, VALS(gsm_map_cbs_coding_grp2_lang_vals), 0x0f, - "Language", HFILL } - }, - { &hf_gsm_map_cbs_coding_grp3_lang, - { "Language","gsm_map.cbs.coding_grp3_lang", - FT_UINT8,BASE_DEC, VALS(gsm_map_cbs_coding_grp3_lang_vals), 0x0f, - "Language", HFILL } - }, - { &hf_gsm_map_cbs_coding_grp4_7_comp, - { "Compressed indicator","gsm_map.cbs.coding_grp4_7_comp", - FT_BOOLEAN, 8, TFS(&gsm_map_cbs_coding_grp4_7_comp_vals), 0x20, - "Compressed indicator", HFILL } - }, - { &hf_gsm_map_cbs_coding_grp4_7_class_ind, - { "Message Class present","gsm_map.cbs.coding_grp4_7_class_ind", - FT_BOOLEAN, 8, TFS(&gsm_map_cbs_coding_grp4_7_class_ind_vals), 0x10, - "Message Class present", HFILL } - }, - { &hf_gsm_map_cbs_coding_grp4_7_char_set, - { "Character set being used","gsm_map.cbs.coding_grp4_7_char_set", - FT_UINT8,BASE_DEC, VALS(gsm_map_cbs_coding_grp4_7_char_set_vals), 0x0c, - "Character set being used", HFILL } - }, - { &hf_gsm_map_cbs_coding_grp4_7_class, - { "Message Class","gsm_map.cbs.coding_grp4_7_class", - FT_UINT8,BASE_DEC, VALS(gsm_map_cbs_coding_grp4_7_class_vals), 0x03, - "Message Class", HFILL } - }, - { &hf_gsm_map_cbs_coding_grp15_mess_code, - { "Message coding","gsm_map.cbs.cbs_coding_grp15_mess_code", - FT_UINT8,BASE_DEC, VALS(gsm_map_cbs_coding_grp15_mess_code_vals), 0x04, - "Message coding", HFILL } - }, - { &hf_gsm_map_cbs_coding_grp15_class, - { "Message Class","gsm_map.cbs.gsm_map_cbs_coding_grp15_class", - FT_UINT8,BASE_DEC, VALS(gsm_map_cbs_coding_grp15_class_vals), 0x03, - "Message Class", HFILL } - }, - { &hf_gsm_map_tmsi, - { "tmsi", "gsm_map.tmsi", - FT_BYTES, BASE_HEX, NULL, 0, - "gsm_map.TMSI", HFILL }}, - - { &hf_gsm_map_ie_tag, - { "Tag", "gsm_map.ie_tag", - FT_UINT8, BASE_DEC, VALS(gsm_map_tag_vals), 0, - "GSM 04.08 tag", HFILL }}, - { &hf_gsm_map_len, - { "Length", "gsm_map.length", - FT_UINT8, BASE_DEC, NULL, 0, - "Length", HFILL }}, - { &hf_gsm_map_disc_par, - { "Discrimination parameter", "gsm_map.disc_par", - FT_UINT8, BASE_DEC, VALS(gsm_map_disc_par_vals), 0, - "Discrimination parameter", HFILL }}, - { &hf_gsm_map_dlci, - { "DLCI", "gsm_map.disc_par", - FT_UINT8, BASE_DEC, NULL, 0, - "Data Link Connection Indicator", HFILL }}, + { &hf_gsm_map_old_Component_PDU, + { "Component", "gsm_map.old.Component", + FT_UINT32, BASE_DEC, VALS(gsm_old_Component_vals), 0, + "gsm_map.old.Component", HFILL }}, + { &hf_gsm_map_getPassword, + { "getPassword", "gsm_map.getPassword", + FT_BYTES, BASE_HEX, NULL, 0, + "getPassword", HFILL }}, + { &hf_gsm_map_currentPassword, + { "currentPassword", "gsm_map.currentPassword", + FT_STRING, BASE_NONE, NULL, 0, + "", HFILL }}, + { &hf_gsm_map_extension, + { "Extension", "gsm_map.extension", + FT_BOOLEAN, 8, TFS(&gsm_map_extension_value), 0x80, + "Extension", HFILL }}, + { &hf_gsm_map_nature_of_number, + { "Nature of number", "gsm_map.nature_of_number", + FT_UINT8, BASE_HEX, VALS(gsm_map_nature_of_number_values), 0x70, + "Nature of number", HFILL }}, + { &hf_gsm_map_number_plan, + { "Number plan", "gsm_map.number_plan", + FT_UINT8, BASE_HEX, VALS(gsm_map_number_plan_values), 0x0f, + "Number plan", HFILL }}, + { &hf_gsm_map_isdn_address_digits, + { "ISDN Address digits", "gsm_map.isdn.address.digits", + FT_STRING, BASE_NONE, NULL, 0, + "ISDN Address digits", HFILL }}, + { &hf_gsm_map_address_digits, + { "Address digits", "gsm_map.address.digits", + FT_STRING, BASE_NONE, NULL, 0, + "Address digits", HFILL }}, + { &hf_gsm_map_servicecentreaddress_digits, + { "ServiceCentreAddress digits", "gsm_map.servicecentreaddress_digits", + FT_STRING, BASE_NONE, NULL, 0, + "ServiceCentreAddress digits", HFILL }}, + { &hf_gsm_map_imsi_digits, + { "IMSI digits", "gsm_map.imsi_digits", + FT_STRING, BASE_NONE, NULL, 0, + "IMSI digits", HFILL }}, + { &hf_gsm_map_TBCD_digits, + { "TBCD digits", "gsm_map.imsi_digits", + FT_STRING, BASE_NONE, NULL, 0, + "TBCD digits", HFILL }}, + { &hf_gsm_map_Ss_Status_unused, + { "Unused", "gsm_map.unused", + FT_UINT8, BASE_HEX, NULL, 0xf0, + "Unused", HFILL }}, + { &hf_gsm_map_Ss_Status_q_bit, + { "Q bit", "gsm_map.ss_status_q_bit", + FT_BOOLEAN, 8, TFS(&gsm_map_Ss_Status_q_bit_values), 0x08, + "Q bit", HFILL }}, + { &hf_gsm_map_Ss_Status_p_bit, + { "P bit", "gsm_map.ss_status_p_bit", + FT_BOOLEAN, 8, TFS(&gsm_map_Ss_Status_p_values), 0x04, + "P bit", HFILL }}, + { &hf_gsm_map_Ss_Status_r_bit, + { "R bit", "gsm_map.ss_status_r_bit", + FT_BOOLEAN, 8, TFS(&gsm_map_Ss_Status_r_values), 0x02, + "R bit", HFILL }}, + { &hf_gsm_map_Ss_Status_a_bit, + { "A bit", "gsm_map.ss_status_a_bit", + FT_BOOLEAN, 8, TFS(&gsm_map_Ss_Status_a_values), 0x01, + "A bit", HFILL }}, + { &hf_gsm_map_notification_to_forwarding_party, + { "Notification to forwarding party", "gsm_map.notification_to_forwarding_party", + FT_BOOLEAN, 8, TFS(¬ification_value), 0x80, + "Notification to forwarding party", HFILL }}, + { &hf_gsm_map_redirecting_presentation, + { "Redirecting presentation", "gsm_map.redirecting_presentation", + FT_BOOLEAN, 8, TFS(&redirecting_presentation_value), 0x40, + "Redirecting presentation", HFILL }}, + { &hf_gsm_map_notification_to_calling_party, + { "Notification to calling party", "gsm_map.notification_to_clling_party", + FT_BOOLEAN, 8, TFS(¬ification_value), 0x20, + "Notification to calling party", HFILL }}, + { &hf_gsm_map_forwarding_reason, + { "Forwarding reason", "gsm_map.forwarding_reason", + FT_UINT8, BASE_HEX, VALS(forwarding_reason_values), 0x0c, + "forwarding reason", HFILL }}, + { &hf_gsm_map_pdp_type_org, + { "PDP Type Organization", "gsm_map.pdp_type_org", + FT_UINT8, BASE_HEX, VALS(pdp_type_org_values), 0x0f, + "PDP Type Organization", HFILL }}, + { &hf_gsm_map_etsi_pdp_type_number, + { "PDP Type Number", "gsm_map.pdp_type_org", + FT_UINT8, BASE_HEX, VALS(etsi_pdp_type_number_values), 0, + "ETSI PDP Type Number", HFILL }}, + { &hf_gsm_map_ietf_pdp_type_number, + { "PDP Type Number", "gsm_map.ietf_pdp_type_number", + FT_UINT8, BASE_HEX, VALS(ietf_pdp_type_number_values), 0, + "IETF PDP Type Number", HFILL }}, + { &hf_gsm_map_ext_qos_subscribed_pri, + { "Allocation/Retention priority", "gsm_map.ext_qos_subscribed_pri", + FT_UINT8, BASE_DEC, NULL, 0xff, + "Allocation/Retention priority", HFILL }}, + { &hf_gsm_map_qos_traffic_cls, + { "Traffic class", "gsm_map.qos.traffic_cls", + FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0xe0, + "Traffic class", HFILL }}, + { &hf_gsm_map_qos_del_order, + { "Delivery order", "gsm_map.qos.del_order", + FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0x18, + "Delivery order", HFILL }}, + { &hf_gsm_map_qos_del_of_err_sdu, + { "Delivery of erroneous SDUs", "gsm_map.qos.del_of_err_sdu", + FT_UINT8, BASE_DEC, VALS(gsm_a_qos_del_of_err_sdu_vals), 0x03, + "Delivery of erroneous SDUs", HFILL }}, + { &hf_gsm_map_qos_ber, + { "Residual Bit Error Rate (BER)", "gsm_map.qos.ber", + FT_UINT8, BASE_DEC, VALS(gsm_a_qos_ber_vals), 0xf0, + "Residual Bit Error Rate (BER)", HFILL }}, + { &hf_gsm_map_qos_sdu_err_rat, + { "SDU error ratio", "gsm_map.qos.sdu_err_rat", + FT_UINT8, BASE_DEC, VALS(gsm_a_qos_sdu_err_rat_vals), 0x0f, + "SDU error ratio", HFILL }}, + { &hf_gsm_map_qos_traff_hdl_pri, + { "Traffic handling priority", "gsm_map.qos.traff_hdl_pri", + FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traff_hdl_pri_vals), 0x03, + "Traffic handling priority", HFILL }}, + + { &hf_gsm_map_qos_max_sdu, + { "Maximum SDU size", "gsm_map.qos.max_sdu", + FT_UINT32, BASE_DEC, NULL, 0x0, + "Maximum SDU size", HFILL }}, + { &hf_gsm_map_max_brate_ulink, + { "Maximum bit rate for uplink in kbit/s", "gsm_map.qos.max_brate_ulink", + FT_UINT32, BASE_DEC, NULL, 0x0, + "Maximum bit rate for uplink", HFILL }}, + { &hf_gsm_map_max_brate_dlink, + { "Maximum bit rate for downlink in kbit/s", "gsm_map.qos.max_brate_dlink", + FT_UINT32, BASE_DEC, NULL, 0x0, + "Maximum bit rate for downlink", HFILL }}, + { &hf_gsm_map_qos_transfer_delay, + { "Transfer delay (Raw data see TS 24.008 for interpretation)", "gsm_map.qos.transfer_delay", + FT_UINT8, BASE_DEC, NULL, 0xfc, + "Transfer delay", HFILL }}, + { &hf_gsm_map_guaranteed_max_brate_ulink, + { "Guaranteed bit rate for uplink in kbit/s", "gsm_map.qos.brate_ulink", + FT_UINT32, BASE_DEC, NULL, 0x0, + "Guaranteed bit rate for uplink", HFILL }}, + { &hf_gsm_map_guaranteed_max_brate_dlink, + { "Guaranteed bit rate for downlink in kbit/s", "gsm_map.qos.brate_dlink", + FT_UINT32, BASE_DEC, NULL, 0x0, + "Guaranteed bit rate for downlink", HFILL }}, + { &hf_gsm_map_GSNAddress_IPv4, + { "GSN-Address IPv4", "gsm_map.gsnaddress_ipv4", + FT_IPv4, BASE_NONE, NULL, 0, + "IPAddress IPv4", HFILL }}, + { &hf_gsm_map_GSNAddress_IPv6, + { "GSN Address IPv6", "gsm_map.gsnaddress_ipv6", + FT_IPv4, BASE_NONE, NULL, 0, + "IPAddress IPv6", HFILL }}, + { &hf_gsm_map_ranap_service_Handover, + { "service-Handover", "gsm_map.ranap.service_Handover", + FT_UINT32, BASE_DEC, VALS(ranap_Service_Handover_vals), 0, + "gsm_map.ranap.Service_Handover", HFILL }}, + { &hf_gsm_map_IntegrityProtectionInformation, + { "IntegrityProtectionInformation", "gsm_map.ranap.IntegrityProtectionInformation", + FT_NONE, BASE_NONE, NULL, 0, + "gsm_map.ranap.IntegrityProtectionInformation", HFILL }}, + { &hf_gsm_map_EncryptionInformation, + { "EncryptionInformation", "gsm_map.ranap.EncryptionInformation", + FT_NONE, BASE_NONE, NULL, 0, + "gsm_map.ranap.EncryptionInformation", HFILL }}, + { &hf_gsm_map_PlmnContainer_PDU, + { "PlmnContainer", "gsm_map.PlmnContainer", + FT_NONE, BASE_NONE, NULL, 0, + "gsm_map.PlmnContainer", HFILL }}, + { &hf_gsm_map_ss_SS_UserData, + { "SS-UserData", "gsm_ss.SS_UserData", + FT_STRING, BASE_NONE, NULL, 0, + "gsm_map.ss.SS_UserData", HFILL }}, + { &hf_gsm_map_cbs_coding_grp, + { "Coding Group","gsm_map.cbs.coding_grp", + FT_UINT8,BASE_DEC, VALS(gsm_map_cbs_data_coding_scheme_coding_grp_vals), 0xf0, + "Coding Group", HFILL } + }, + { &hf_gsm_map_cbs_coding_grp0_lang, + { "Language","gsm_map.cbs.coding_grp0_lang", + FT_UINT8,BASE_DEC, VALS(gsm_map_cbs_coding_grp0_lang_vals), 0x0f, + "Language", HFILL } + }, + { &hf_gsm_map_cbs_coding_grp1_lang, + { "Language","gsm_map.cbs.coding_grp1_lang", + FT_UINT8,BASE_DEC, VALS(gsm_map_cbs_coding_grp1_lang_vals), 0x0f, + "Language", HFILL } + }, + { &hf_gsm_map_cbs_coding_grp2_lang, + { "Language","gsm_map.cbs.coding_grp2_lang", + FT_UINT8,BASE_DEC, VALS(gsm_map_cbs_coding_grp2_lang_vals), 0x0f, + "Language", HFILL } + }, + { &hf_gsm_map_cbs_coding_grp3_lang, + { "Language","gsm_map.cbs.coding_grp3_lang", + FT_UINT8,BASE_DEC, VALS(gsm_map_cbs_coding_grp3_lang_vals), 0x0f, + "Language", HFILL } + }, + { &hf_gsm_map_cbs_coding_grp4_7_comp, + { "Compressed indicator","gsm_map.cbs.coding_grp4_7_comp", + FT_BOOLEAN, 8, TFS(&gsm_map_cbs_coding_grp4_7_comp_vals), 0x20, + "Compressed indicator", HFILL } + }, + { &hf_gsm_map_cbs_coding_grp4_7_class_ind, + { "Message Class present","gsm_map.cbs.coding_grp4_7_class_ind", + FT_BOOLEAN, 8, TFS(&gsm_map_cbs_coding_grp4_7_class_ind_vals), 0x10, + "Message Class present", HFILL } + }, + { &hf_gsm_map_cbs_coding_grp4_7_char_set, + { "Character set being used","gsm_map.cbs.coding_grp4_7_char_set", + FT_UINT8,BASE_DEC, VALS(gsm_map_cbs_coding_grp4_7_char_set_vals), 0x0c, + "Character set being used", HFILL } + }, + { &hf_gsm_map_cbs_coding_grp4_7_class, + { "Message Class","gsm_map.cbs.coding_grp4_7_class", + FT_UINT8,BASE_DEC, VALS(gsm_map_cbs_coding_grp4_7_class_vals), 0x03, + "Message Class", HFILL } + }, + { &hf_gsm_map_cbs_coding_grp15_mess_code, + { "Message coding","gsm_map.cbs.cbs_coding_grp15_mess_code", + FT_UINT8,BASE_DEC, VALS(gsm_map_cbs_coding_grp15_mess_code_vals), 0x04, + "Message coding", HFILL } + }, + { &hf_gsm_map_cbs_coding_grp15_class, + { "Message Class","gsm_map.cbs.gsm_map_cbs_coding_grp15_class", + FT_UINT8,BASE_DEC, VALS(gsm_map_cbs_coding_grp15_class_vals), 0x03, + "Message Class", HFILL } + }, + { &hf_gsm_map_tmsi, + { "tmsi", "gsm_map.tmsi", + FT_BYTES, BASE_HEX, NULL, 0, + "gsm_map.TMSI", HFILL }}, + + { &hf_gsm_map_ie_tag, + { "Tag", "gsm_map.ie_tag", + FT_UINT8, BASE_DEC, VALS(gsm_map_tag_vals), 0, + "GSM 04.08 tag", HFILL }}, + { &hf_gsm_map_len, + { "Length", "gsm_map.length", + FT_UINT8, BASE_DEC, NULL, 0, + "Length", HFILL }}, + { &hf_gsm_map_disc_par, + { "Discrimination parameter", "gsm_map.disc_par", + FT_UINT8, BASE_DEC, VALS(gsm_map_disc_par_vals), 0, + "Discrimination parameter", HFILL }}, + { &hf_gsm_map_dlci, + { "DLCI", "gsm_map.disc_par", + FT_UINT8, BASE_DEC, NULL, 0, + "Data Link Connection Indicator", HFILL }}, /*--- Included file: packet-gsm_map-hfarr.c ---*/ @@ -22344,24 +22344,24 @@ void proto_register_gsm_map(void) { &ett_gsm_map_InvokeId, &ett_gsm_map_InvokePDU, &ett_gsm_map_ReturnResultPDU, - &ett_gsm_map_ReturnErrorPDU, + &ett_gsm_map_ReturnErrorPDU, &ett_gsm_map_ReturnResult_result, - &ett_gsm_map_ReturnError_result, + &ett_gsm_map_ReturnError_result, &ett_gsm_map_GSMMAPPDU, - &ett_gsm_map_ext_qos_subscribed, - &ett_gsm_map_pdptypenumber, - &ett_gsm_map_RAIdentity, - &ett_gsm_map_LAIFixedLength, - &ett_gsm_map_isdn_address_string, - &ett_gsm_map_geo_desc, - &ett_gsm_map_LongSignalInfo, - &ett_gsm_map_RadioResourceInformation, - &ett_gsm_map_MSNetworkCapability, - &ett_gsm_map_MSRadioAccessCapability, - &ett_gsm_map_externalsignalinfo, - &ett_gsm_map_cbs_data_coding, - &ett_gsm_map_GlobalCellId, - &ett_gsm_map_GeographicalInformation, + &ett_gsm_map_ext_qos_subscribed, + &ett_gsm_map_pdptypenumber, + &ett_gsm_map_RAIdentity, + &ett_gsm_map_LAIFixedLength, + &ett_gsm_map_isdn_address_string, + &ett_gsm_map_geo_desc, + &ett_gsm_map_LongSignalInfo, + &ett_gsm_map_RadioResourceInformation, + &ett_gsm_map_MSNetworkCapability, + &ett_gsm_map_MSRadioAccessCapability, + &ett_gsm_map_externalsignalinfo, + &ett_gsm_map_cbs_data_coding, + &ett_gsm_map_GlobalCellId, + &ett_gsm_map_GeographicalInformation, /*--- Included file: packet-gsm_map-ettarr.c ---*/ @@ -22988,8 +22988,6 @@ void proto_register_gsm_map(void) { * Set default SSNs */ range_convert_str(&global_ssn_range, "6-9", MAX_SSN); - ssn_range = range_empty(); - gsm_map_module = prefs_register_protocol(proto_gsm_map, proto_reg_handoff_gsm_map); @@ -22997,5 +22995,3 @@ void proto_register_gsm_map(void) { "TCAP Subsystem numbers used for GSM MAP", &global_ssn_range, MAX_SSN); } - - diff --git a/epan/dissectors/packet-h225.c b/epan/dissectors/packet-h225.c index b0308a4be8..aeb8a591d9 100644 --- a/epan/dissectors/packet-h225.c +++ b/epan/dissectors/packet-h225.c @@ -85,8 +85,6 @@ static h225_packet_info pi_arr[5]; /* We assuming a maximum of 5 H225 messaages static int pi_current=0; h225_packet_info *h225_pi=&pi_arr[0]; -static dissector_handle_t h225ras_handle; -static dissector_handle_t H323UserInformation_handle; static dissector_handle_t data_handle; /* Subdissector tables */ static dissector_table_t nsp_object_dissector_table; @@ -886,7 +884,7 @@ static int hf_h225_stopped = -1; /* NULL */ static int hf_h225_notAvailable = -1; /* NULL */ /*--- End of included file: packet-h225-hf.c ---*/ -#line 112 "packet-h225-template.c" +#line 110 "packet-h225-template.c" /* Initialize the subtree pointers */ static gint ett_h225 = -1; @@ -1133,7 +1131,7 @@ static gint ett_h225_ServiceControlResponse = -1; static gint ett_h225_T_result = -1; /*--- End of included file: packet-h225-ett.c ---*/ -#line 116 "packet-h225-template.c" +#line 114 "packet-h225-template.c" /* Preferences */ static guint h225_tls_port = TLS_PORT_CS; @@ -1142,7 +1140,6 @@ static gboolean h225_h245_in_tree = TRUE; static gboolean h225_tp_in_tree = TRUE; /* Global variables */ -static guint saved_h225_tls_port; static guint32 ipv4_address; static guint32 ipv4_port; guint32 T38_manufacturer_code; @@ -7468,7 +7465,7 @@ static int dissect_RasMessage_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, pro /*--- End of included file: packet-h225-fn.c ---*/ -#line 142 "packet-h225-template.c" +#line 139 "packet-h225-template.c" /* Forward declaration we need below */ @@ -7481,15 +7478,15 @@ dissect_h225_H323UserInformation(tvbuff_t *tvb, packet_info *pinfo, proto_tree * proto_tree *tr; int offset = 0; - pi_current++; - if(pi_current==5){ - pi_current=0; - } - h225_pi=&pi_arr[pi_current]; + pi_current++; + if(pi_current==5){ + pi_current=0; + } + h225_pi=&pi_arr[pi_current]; /* Init struct for collecting h225_packet_info */ - reset_h225_packet_info(h225_pi); - h225_pi->msg_type = H225_CS; + reset_h225_packet_info(h225_pi); + h225_pi->msg_type = H225_CS; next_tvb_init(&h245_list); next_tvb_init(&tp_list); @@ -7524,15 +7521,15 @@ dissect_h225_h225_RasMessage(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree proto_tree *tr; guint32 offset=0; - pi_current++; - if(pi_current==5){ - pi_current=0; - } - h225_pi=&pi_arr[pi_current]; + pi_current++; + if(pi_current==5){ + pi_current=0; + } + h225_pi=&pi_arr[pi_current]; /* Init struct for collecting h225_packet_info */ - reset_h225_packet_info(h225_pi); - h225_pi->msg_type = H225_RAS; + reset_h225_packet_info(h225_pi); + h225_pi->msg_type = H225_RAS; if (check_col(pinfo->cinfo, COL_PROTOCOL)){ col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME); @@ -10636,7 +10633,7 @@ void proto_register_h225(void) { "h225.NULL", HFILL }}, /*--- End of included file: packet-h225-hfarr.c ---*/ -#line 245 "packet-h225-template.c" +#line 242 "packet-h225-template.c" }; /* List of subtrees */ @@ -10885,7 +10882,7 @@ void proto_register_h225(void) { &ett_h225_T_result, /*--- End of included file: packet-h225-ettarr.c ---*/ -#line 251 "packet-h225-template.c" +#line 248 "packet-h225-template.c" }; module_t *h225_module; @@ -10942,27 +10939,25 @@ void proto_reg_handoff_h225(void) { static gboolean h225_prefs_initialized = FALSE; + static dissector_handle_t h225ras_handle; + static guint saved_h225_tls_port; + + if (!h225_prefs_initialized) { + h225ras_handle=find_dissector("h225.ras"); + dissector_add("udp.port", UDP_PORT_RAS1, h225ras_handle); + dissector_add("udp.port", UDP_PORT_RAS2, h225ras_handle); + + h245_handle = find_dissector("h245"); + h245dg_handle = find_dissector("h245dg"); + h4501_handle = find_dissector("h4501"); + data_handle = find_dissector("data"); + h225_prefs_initialized = TRUE; + } else { + ssl_dissector_delete(saved_h225_tls_port, "q931.tpkt", TRUE); + } - if (h225_prefs_initialized) { - ssl_dissector_delete(saved_h225_tls_port, "q931.tpkt", TRUE); - } else { - h225_prefs_initialized = TRUE; - } - - saved_h225_tls_port = h225_tls_port; - ssl_dissector_add(saved_h225_tls_port, "q931.tpkt", TRUE); - - h225ras_handle=new_create_dissector_handle(dissect_h225_h225_RasMessage, proto_h225); - dissector_add("udp.port", UDP_PORT_RAS1, h225ras_handle); - dissector_add("udp.port", UDP_PORT_RAS2, h225ras_handle); - - H323UserInformation_handle=find_dissector("h323ui"); - - h245_handle = find_dissector("h245"); - h245dg_handle = find_dissector("h245dg"); - h4501_handle = find_dissector("h4501"); - data_handle = find_dissector("data"); - + saved_h225_tls_port = h225_tls_port; + ssl_dissector_add(saved_h225_tls_port, "q931.tpkt", TRUE); } diff --git a/epan/dissectors/packet-h235.c b/epan/dissectors/packet-h235.c index 3b0c1fe33d..7b8b4275d0 100644 --- a/epan/dissectors/packet-h235.c +++ b/epan/dissectors/packet-h235.c @@ -210,7 +210,6 @@ static gint ett_h235_FecOrder = -1; /*--- End of included file: packet-h235-ett.c ---*/ #line 61 "packet-h235-template.c" -static dissector_handle_t mikey_handle=NULL; static int dissect_xxx_ToBeSigned(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) { @@ -1055,7 +1054,7 @@ static int dissect_SrtpCryptoCapability_PDU(tvbuff_t *tvb _U_, packet_info *pinf /*--- End of included file: packet-h235-fn.c ---*/ -#line 71 "packet-h235-template.c" +#line 70 "packet-h235-template.c" /*--- proto_register_h235 ----------------------------------------------*/ @@ -1472,7 +1471,7 @@ void proto_register_h235(void) { "h235.NULL", HFILL }}, /*--- End of included file: packet-h235-hfarr.c ---*/ -#line 79 "packet-h235-template.c" +#line 78 "packet-h235-template.c" }; /* List of subtrees */ @@ -1514,7 +1513,7 @@ void proto_register_h235(void) { &ett_h235_FecOrder, /*--- End of included file: packet-h235-ettarr.c ---*/ -#line 84 "packet-h235-template.c" +#line 83 "packet-h235-template.c" }; /* Register protocol */ @@ -1536,8 +1535,8 @@ void proto_register_h235(void) { oid_add_from_string("HMAC-SHA1-96","0.0.8.235.0.1.6"); oid_add_from_string("HMAC-SHA1-96","0.0.8.235.0.2.6"); /* H.235.7, Chapter 5, Table 1 */ - oid_add_from_string("MIKEY", OID_MIKEY); - oid_add_from_string("MIKEY-PS", OID_MIKEY_PS); + oid_add_from_string("MIKEY", OID_MIKEY); + oid_add_from_string("MIKEY-PS", OID_MIKEY_PS); oid_add_from_string("MIKEY-DHHMAC", OID_MIKEY_DHHMAC); oid_add_from_string("MIKEY-PK-SIGN", OID_MIKEY_PK_SIGN); oid_add_from_string("MIKEY-DH-SIGN", OID_MIKEY_DH_SIGN); @@ -1554,6 +1553,7 @@ void proto_register_h235(void) { /*--- proto_reg_handoff_h235 -------------------------------------------*/ void proto_reg_handoff_h235(void) { + dissector_handle_t mikey_handle; mikey_handle = find_dissector("mikey"); diff --git a/epan/dissectors/packet-h245.c b/epan/dissectors/packet-h245.c index d3d98cb587..7e215cccbf 100644 --- a/epan/dissectors/packet-h245.c +++ b/epan/dissectors/packet-h245.c @@ -79,7 +79,6 @@ static dissector_table_t gef_name_dissector_table; static dissector_table_t gef_content_dissector_table; static dissector_handle_t nsp_handle; static dissector_handle_t data_handle; -static dissector_handle_t h245_handle; static dissector_handle_t MultimediaSystemControlMessage_handle; static dissector_handle_t h263_handle = NULL; static dissector_handle_t amr_handle = NULL; @@ -217,7 +216,7 @@ typedef enum _IndicationMessage_enum { } IndicationMessage_enum; /*--- End of included file: packet-h245-val.h ---*/ -#line 90 "packet-h245-template.c" +#line 89 "packet-h245-template.c" static const value_string h245_RequestMessage_short_vals[] = { { RequestMessage_nonStandard , "NSM" }, @@ -1898,7 +1897,7 @@ static int hf_h245_encrypted = -1; /* OCTET_STRING */ static int hf_h245_encryptedAlphanumeric = -1; /* EncryptedAlphanumeric */ /*--- End of included file: packet-h245-hf.c ---*/ -#line 371 "packet-h245-template.c" +#line 370 "packet-h245-template.c" /* Initialize the subtree pointers */ static int ett_h245 = -1; @@ -2399,7 +2398,7 @@ static gint ett_h245_FlowControlIndication = -1; static gint ett_h245_MobileMultilinkReconfigurationIndication = -1; /*--- End of included file: packet-h245-ett.c ---*/ -#line 376 "packet-h245-template.c" +#line 375 "packet-h245-template.c" /* Forward declarations */ static int dissect_h245_MultimediaSystemControlMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); @@ -14352,7 +14351,7 @@ static void dissect_OpenLogicalChannel_PDU(tvbuff_t *tvb _U_, packet_info *pinfo /*--- End of included file: packet-h245-fn.c ---*/ -#line 385 "packet-h245-template.c" +#line 384 "packet-h245-template.c" static void dissect_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) @@ -20015,7 +20014,7 @@ void proto_register_h245(void) { "h245.EncryptedAlphanumeric", HFILL }}, /*--- End of included file: packet-h245-hfarr.c ---*/ -#line 463 "packet-h245-template.c" +#line 462 "packet-h245-template.c" }; /* List of subtrees */ @@ -20518,7 +20517,7 @@ void proto_register_h245(void) { &ett_h245_MobileMultilinkReconfigurationIndication, /*--- End of included file: packet-h245-ettarr.c ---*/ -#line 470 "packet-h245-template.c" +#line 469 "packet-h245-template.c" }; module_t *h245_module; @@ -20606,6 +20605,8 @@ void proto_register_h245(void) { /*--- proto_reg_handoff_h245 ---------------------------------------*/ void proto_reg_handoff_h245(void) { + dissector_handle_t h245_handle; + rtp_handle = find_dissector("rtp"); rtcp_handle = find_dissector("rtcp"); t38_handle = find_dissector("t38"); @@ -20614,9 +20615,9 @@ void proto_reg_handoff_h245(void) { amr_handle = find_dissector("amr_if2_nb"); - h245_handle=create_dissector_handle(dissect_h245, proto_h245); + h245_handle = find_dissector("h245"); dissector_add_handle("tcp.port", h245_handle); - MultimediaSystemControlMessage_handle=create_dissector_handle(dissect_h245_h245, proto_h245); + MultimediaSystemControlMessage_handle = find_dissector("h245dg"); dissector_add_handle("udp.port", MultimediaSystemControlMessage_handle); } diff --git a/epan/dissectors/packet-h248.c b/epan/dissectors/packet-h248.c index 0ee536f7c9..69170adb3b 100644 --- a/epan/dissectors/packet-h248.c +++ b/epan/dissectors/packet-h248.c @@ -551,12 +551,9 @@ static emem_tree_t* trxs = NULL; static emem_tree_t* ctxs_by_trx = NULL; static emem_tree_t* ctxs = NULL; -static gboolean h248_prefs_initialized = FALSE; static gboolean keep_persistent_data = FALSE; -static guint32 udp_port = 2945; -static guint32 temp_udp_port = 2945; -static guint32 tcp_port = 2945; -static guint32 temp_tcp_port = 2945; +static guint global_udp_port = 2945; +static guint global_tcp_port = 2945; static gboolean h248_desegment = TRUE; @@ -4990,7 +4987,7 @@ dissect_h248_ServiceChangeReasonStr(gboolean implicit_tag _U_, tvbuff_t *tvb _U_ /*--- End of included file: packet-h248-fn.c ---*/ -#line 1213 "packet-h248-template.c" +#line 1210 "packet-h248-template.c" static void dissect_h248_tpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { dissect_tpkt_encap(tvb, pinfo, tree, h248_desegment, h248_handle); @@ -5047,37 +5044,9 @@ dissect_h248(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } - -static void h248_init(void) { - - if (!h248_prefs_initialized) { - h248_prefs_initialized = TRUE; - } else { - if ( udp_port ) - dissector_delete("udp.port", udp_port, h248_handle); - - if ( tcp_port) - dissector_delete("tcp.port", tcp_port, h248_tpkt_handle); - } - - udp_port = temp_udp_port; - tcp_port = temp_tcp_port; - - if ( udp_port ) { - dissector_add("udp.port", udp_port, h248_handle); - } - - if ( tcp_port) { - dissector_add("tcp.port", tcp_port, h248_tpkt_handle); - } - - if (!h248_term_handle){ - h248_term_handle = find_dissector("h248term"); - } - -} - /*--- proto_register_h248 ----------------------------------------------*/ +void proto_reg_handoff_h248(void); + void proto_register_h248(void) { /* List of fields */ @@ -6374,7 +6343,7 @@ void proto_register_h248(void) { "", HFILL }}, /*--- End of included file: packet-h248-hfarr.c ---*/ -#line 1376 "packet-h248-template.c" +#line 1345 "packet-h248-template.c" GCP_HF_ARR_ELEMS("h248",h248_arrel) @@ -6536,7 +6505,7 @@ void proto_register_h248(void) { &ett_h248_Value, /*--- End of included file: packet-h248-ettarr.c ---*/ -#line 1394 "packet-h248-template.c" +#line 1363 "packet-h248-template.c" }; module_t *h248_module; @@ -6551,7 +6520,7 @@ void proto_register_h248(void) { proto_register_field_array(proto_h248, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); - h248_module = prefs_register_protocol(proto_h248, h248_init); + h248_module = prefs_register_protocol(proto_h248, proto_reg_handoff_h248); prefs_register_bool_preference(h248_module, "ctx_info", "Track Context", "Mantain relationships between transactions and contexts and display an extra tree showing context data", @@ -6560,20 +6529,17 @@ void proto_register_h248(void) { "UDP port", "Port to be decoded as h248", 10, - &temp_udp_port); + &global_udp_port); prefs_register_uint_preference(h248_module, "tcp_port", "TCP port", "Port to be decoded as h248", 10, - &temp_tcp_port); + &global_tcp_port); prefs_register_bool_preference(h248_module, "desegment", "Desegment H.248 over TCP", "Desegment H.248 messages that span more TCP segments", &h248_desegment); - - register_init_routine( &h248_init ); - msgs = se_tree_create(EMEM_TREE_TYPE_RED_BLACK, "h248_msgs"); trxs = se_tree_create(EMEM_TREE_TYPE_RED_BLACK, "h248_trxs"); ctxs_by_trx = se_tree_create(EMEM_TREE_TYPE_RED_BLACK, "h248_ctxs_by_trx"); @@ -6587,13 +6553,33 @@ void proto_register_h248(void) { /*--- proto_reg_handoff_h248 -------------------------------------------*/ void proto_reg_handoff_h248(void) { - h248_handle = find_dissector("h248"); - h248_tpkt_handle = find_dissector("h248.tpkt"); + static gboolean initialized = FALSE; + static guint32 udp_port; + static guint32 tcp_port; - dissector_add("mtp3.service_indicator", GATEWAY_CONTROL_PROTOCOL_USER_ID, h248_handle); - dissector_add("udp.port", udp_port, h248_handle); - dissector_add("tcp.port", tcp_port, h248_tpkt_handle); -} + if (!initialized) { + h248_handle = find_dissector("h248"); + h248_tpkt_handle = find_dissector("h248.tpkt"); + dissector_add("mtp3.service_indicator", GATEWAY_CONTROL_PROTOCOL_USER_ID, h248_handle); + h248_term_handle = find_dissector("h248term"); + initialized = TRUE; + } else { + if (udp_port != 0) + dissector_delete("udp.port", udp_port, h248_handle); + if (tcp_port != 0) + dissector_delete("tcp.port", tcp_port, h248_tpkt_handle); + } + + udp_port = global_udp_port; + tcp_port = global_tcp_port; + + if (udp_port != 0) { + dissector_add("udp.port", udp_port, h248_handle); + } + if (tcp_port != 0) { + dissector_add("tcp.port", tcp_port, h248_tpkt_handle); + } +} diff --git a/epan/dissectors/packet-h283.c b/epan/dissectors/packet-h283.c index b54d0abfc9..7a20653c96 100644 --- a/epan/dissectors/packet-h283.c +++ b/epan/dissectors/packet-h283.c @@ -115,13 +115,10 @@ static gint ett_h283_NonStandardMessage = -1; /*--- End of included file: packet-h283-ett.c ---*/ #line 53 "packet-h283-template.c" -/* Dissectors */ -static dissector_handle_t h283_udp_handle = NULL; - /* Subdissectors */ -static dissector_handle_t rdc_pdu_handle = NULL; -static dissector_handle_t rdc_device_list_handle = NULL; -static dissector_handle_t data_handle = NULL; +static dissector_handle_t rdc_pdu_handle; +static dissector_handle_t rdc_device_list_handle; +static dissector_handle_t data_handle; static gboolean info_is_set; @@ -574,7 +571,7 @@ static int dissect_LCTPDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_t /*--- End of included file: packet-h283-fn.c ---*/ -#line 65 "packet-h283-template.c" +#line 62 "packet-h283-template.c" static int dissect_h283_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) @@ -731,7 +728,7 @@ void proto_register_h283(void) { "h283.NULL", HFILL }}, /*--- End of included file: packet-h283-hfarr.c ---*/ -#line 89 "packet-h283-template.c" +#line 86 "packet-h283-template.c" }; /* List of subtrees */ @@ -756,7 +753,7 @@ void proto_register_h283(void) { &ett_h283_NonStandardMessage, /*--- End of included file: packet-h283-ettarr.c ---*/ -#line 95 "packet-h283-template.c" +#line 92 "packet-h283-template.c" }; /* Register protocol */ @@ -767,14 +764,15 @@ void proto_register_h283(void) { proto_register_subtree_array(ett, array_length(ett)); new_register_dissector(PFNAME, dissect_h283_udp, proto_h283); - h283_udp_handle = find_dissector(PFNAME); } /*--- proto_reg_handoff_h283 -------------------------------------------*/ void proto_reg_handoff_h283(void) { + dissector_handle_t h283_udp_handle; + h283_udp_handle = find_dissector(PFNAME); dissector_add_handle("udp.port", h283_udp_handle); rdc_pdu_handle = find_dissector("rdc"); diff --git a/epan/dissectors/packet-h323.c b/epan/dissectors/packet-h323.c index 3fb703c759..98808b7606 100644 --- a/epan/dissectors/packet-h323.c +++ b/epan/dissectors/packet-h323.c @@ -99,9 +99,6 @@ void gef_ctx_update_key(gef_ctx_t *gefx) { ); } -/* Subdissectors */ -static dissector_handle_t q931_handle = NULL; - /* Initialize the protocol and registered fields */ int proto_h323 = -1; @@ -137,7 +134,7 @@ static int hf_h323_timeToLive = -1; /* TimeToLive */ static int hf_h323_includeFastStart = -1; /* NULL */ /*--- End of included file: packet-h323-hf.c ---*/ -#line 100 "packet-h323-template.c" +#line 97 "packet-h323-template.c" /* Initialize the subtree pointers */ @@ -158,7 +155,7 @@ static gint ett_h323_T_fastStart = -1; static gint ett_h323_StatusInquiry_RD = -1; /*--- End of included file: packet-h323-ett.c ---*/ -#line 103 "packet-h323-template.c" +#line 100 "packet-h323-template.c" /*--- Included file: packet-h323-fn.c ---*/ @@ -449,7 +446,7 @@ static int dissect_RobustnessData_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, /*--- End of included file: packet-h323-fn.c ---*/ -#line 105 "packet-h323-template.c" +#line 102 "packet-h323-template.c" /*--- proto_register_h323 ----------------------------------------------*/ void proto_register_h323(void) { @@ -573,7 +570,7 @@ void proto_register_h323(void) { "h323.NULL", HFILL }}, /*--- End of included file: packet-h323-hfarr.c ---*/ -#line 112 "packet-h323-template.c" +#line 109 "packet-h323-template.c" }; /* List of subtrees */ @@ -596,7 +593,7 @@ void proto_register_h323(void) { &ett_h323_StatusInquiry_RD, /*--- End of included file: packet-h323-ettarr.c ---*/ -#line 117 "packet-h323-template.c" +#line 114 "packet-h323-template.c" }; /* Register protocol */ @@ -612,6 +609,8 @@ void proto_register_h323(void) { /*--- proto_reg_handoff_h323 -------------------------------------------*/ void proto_reg_handoff_h323(void) { + dissector_handle_t q931_handle; + q931_handle = find_dissector("q931"); /* H.323, Annex M1, Tunnelling of signalling protocols (QSIG) in H.323 */ diff --git a/epan/dissectors/packet-h450.c b/epan/dissectors/packet-h450.c index 9602ba0deb..2eecc42ee6 100644 --- a/epan/dissectors/packet-h450.c +++ b/epan/dissectors/packet-h450.c @@ -826,9 +826,6 @@ static const value_string h450_str_error[] = { /* ROSE context */ static rose_ctx_t h450_rose_ctx; -/* Subdissectors */ -static dissector_handle_t data_handle = NULL; - /* Global variables */ @@ -4487,7 +4484,7 @@ static int dissect_h450_12_CmnArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, /*--- End of included file: packet-h450-fn.c ---*/ -#line 80 "packet-h450-template.c" +#line 77 "packet-h450-template.c" typedef struct _h450_op_t { gint32 opcode; @@ -4596,7 +4593,7 @@ static const h450_op_t h450_op_tab[] = { /* cmnInform */ { 85, dissect_h450_12_CmnArg_PDU, NULL }, /*--- End of included file: packet-h450-table11.c ---*/ -#line 89 "packet-h450-template.c" +#line 86 "packet-h450-template.c" }; typedef struct _h450_err_t { @@ -4688,7 +4685,7 @@ static const h450_err_t h450_err_tab[] = { /* Unknown or empty loop list ERROR */ /*--- End of included file: packet-h450-table21.c ---*/ -#line 98 "packet-h450-template.c" +#line 95 "packet-h450-template.c" }; static const h450_op_t *get_op(gint32 opcode) { @@ -6281,7 +6278,7 @@ void proto_register_h450(void) { "h450_12.NULL", HFILL }}, /*--- End of included file: packet-h450-hfarr.c ---*/ -#line 258 "packet-h450-template.c" +#line 255 "packet-h450-template.c" }; /* List of subtrees */ @@ -6461,7 +6458,7 @@ void proto_register_h450(void) { &ett_h450_12_FeatureControl, /*--- End of included file: packet-h450-ettarr.c ---*/ -#line 263 "packet-h450-template.c" +#line 260 "packet-h450-template.c" }; @@ -6494,8 +6491,6 @@ proto_reg_handoff_h450(void) dissector_handle_t h450_res_handle; dissector_handle_t h450_err_handle; - data_handle = find_dissector("data"); - h450_arg_handle = new_create_dissector_handle(dissect_h450_arg, proto_h450); h450_res_handle = new_create_dissector_handle(dissect_h450_res, proto_h450); for (i=0; i<(int)array_length(h450_op_tab); i++) { diff --git a/epan/dissectors/packet-h501.c b/epan/dissectors/packet-h501.c index 255b282117..9fa65d5a14 100644 --- a/epan/dissectors/packet-h501.c +++ b/epan/dissectors/packet-h501.c @@ -422,19 +422,13 @@ static gint ett_h501_TerminationCause = -1; #line 56 "packet-h501-template.c" /* Dissectors */ -static dissector_handle_t h501_pdu_handle = NULL; -static dissector_handle_t h501_udp_handle = NULL; -static dissector_handle_t h501_tcp_handle = NULL; +static dissector_handle_t h501_pdu_handle; /* Preferences */ static guint h501_udp_port = 2099; static guint h501_tcp_port = 2099; static gboolean h501_desegment_tcp = TRUE; -/* Gloabl variables */ -static guint saved_h501_udp_port; -static guint saved_h501_tcp_port; - void proto_reg_handoff_h501(void); @@ -2527,7 +2521,7 @@ static int dissect_Message_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_ /*--- End of included file: packet-h501-fn.c ---*/ -#line 74 "packet-h501-template.c" +#line 68 "packet-h501-template.c" static int dissect_h501_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) @@ -3569,7 +3563,7 @@ void proto_register_h501(void) { "h501.INTEGER_1_65535", HFILL }}, /*--- End of included file: packet-h501-hfarr.c ---*/ -#line 111 "packet-h501-template.c" +#line 105 "packet-h501-template.c" }; /* List of subtrees */ @@ -3679,7 +3673,7 @@ void proto_register_h501(void) { &ett_h501_TerminationCause, /*--- End of included file: packet-h501-ettarr.c ---*/ -#line 117 "packet-h501-template.c" +#line 111 "packet-h501-template.c" }; /* Register protocol */ @@ -3690,10 +3684,6 @@ void proto_register_h501(void) { proto_register_subtree_array(ett, array_length(ett)); new_register_dissector(PFNAME, dissect_h501_pdu, proto_h501); - h501_pdu_handle = find_dissector(PFNAME); - - h501_udp_handle = new_create_dissector_handle(dissect_h501_udp, proto_h501); - h501_tcp_handle = new_create_dissector_handle(dissect_h501_tcp, proto_h501); h501_module = prefs_register_protocol(proto_h501, proto_reg_handoff_h501); prefs_register_uint_preference(h501_module, "udp.port", @@ -3715,12 +3705,19 @@ void proto_register_h501(void) { void proto_reg_handoff_h501(void) { static gboolean h501_prefs_initialized = FALSE; - - if (h501_prefs_initialized) { + static dissector_handle_t h501_udp_handle; + static dissector_handle_t h501_tcp_handle; + static guint saved_h501_udp_port; + static guint saved_h501_tcp_port; + + if (!h501_prefs_initialized) { + h501_pdu_handle = find_dissector(PFNAME); + h501_udp_handle = new_create_dissector_handle(dissect_h501_udp, proto_h501); + h501_tcp_handle = new_create_dissector_handle(dissect_h501_tcp, proto_h501); + h501_prefs_initialized = TRUE; + } else { dissector_delete("udp.port", saved_h501_udp_port, h501_udp_handle); dissector_delete("tcp.port", saved_h501_tcp_port, h501_tcp_handle); - } else { - h501_prefs_initialized = TRUE; } /* Set our port number for future use */ diff --git a/epan/dissectors/packet-mpeg-pes.c b/epan/dissectors/packet-mpeg-pes.c index 251b487642..88fde06bec 100644 --- a/epan/dissectors/packet-mpeg-pes.c +++ b/epan/dissectors/packet-mpeg-pes.c @@ -1225,9 +1225,8 @@ proto_register_mpeg_pes(void) void proto_reg_handoff_mpeg_pes(void) { - dissector_handle_t mpeg_handle = create_dissector_handle( - dissect_mpeg, proto_mpeg); - dissector_add("wtap_encap", WTAP_ENCAP_MPEG, mpeg_handle); + dissector_handle_t mpeg_handle = find_dissector("mpeg"); + dissector_add("wtap_encap", WTAP_ENCAP_MPEG, mpeg_handle); heur_dissector_add("mpeg", dissect_mpeg_pes, proto_mpeg_pes); } diff --git a/epan/dissectors/packet-nbap.c b/epan/dissectors/packet-nbap.c index 1b10a23d64..4cf4becf85 100644 --- a/epan/dissectors/packet-nbap.c +++ b/epan/dissectors/packet-nbap.c @@ -1081,8 +1081,6 @@ typedef enum _ProtocolIE_ID_enum { /*--- End of included file: packet-nbap-val.h ---*/ #line 53 "packet-nbap-template.c" -static dissector_handle_t nbap_handle = NULL; - /* Initialize the protocol and registered fields */ static int proto_nbap = -1; @@ -3653,7 +3651,7 @@ static int hf_nbap_RACH_SubChannelNumbers_subCh1 = -1; static int hf_nbap_RACH_SubChannelNumbers_subCh0 = -1; /*--- End of included file: packet-nbap-hf.c ---*/ -#line 60 "packet-nbap-template.c" +#line 58 "packet-nbap-template.c" /* Initialize the subtree pointers */ static int ett_nbap = -1; @@ -4977,7 +4975,7 @@ static gint ett_nbap_UnsuccessfulOutcome = -1; static gint ett_nbap_Outcome = -1; /*--- End of included file: packet-nbap-ett.c ---*/ -#line 65 "packet-nbap-template.c" +#line 63 "packet-nbap-template.c" /* Global variables */ static guint32 ProcedureCode; @@ -42573,7 +42571,7 @@ static void dissect_NBAP_PDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, prot /*--- End of included file: packet-nbap-fn.c ---*/ -#line 86 "packet-nbap-template.c" +#line 84 "packet-nbap-template.c" static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { @@ -52875,7 +52873,7 @@ void proto_register_nbap(void) { "", HFILL }}, /*--- End of included file: packet-nbap-hfarr.c ---*/ -#line 139 "packet-nbap-template.c" +#line 137 "packet-nbap-template.c" }; /* List of subtrees */ @@ -54200,7 +54198,7 @@ void proto_register_nbap(void) { &ett_nbap_Outcome, /*--- End of included file: packet-nbap-ettarr.c ---*/ -#line 145 "packet-nbap-template.c" +#line 143 "packet-nbap-template.c" }; @@ -54212,7 +54210,6 @@ void proto_register_nbap(void) { /* Register dissector */ register_dissector("nbap", dissect_nbap, proto_nbap); - nbap_handle = find_dissector("nbap"); /* Register dissector tables */ nbap_ies_dissector_table = register_dissector_table("nbap.ies", "NBAP-PROTOCOL-IES", FT_UINT32, BASE_DEC); @@ -54228,7 +54225,9 @@ void proto_register_nbap(void) { void proto_reg_handoff_nbap(void) { + dissector_handle_t nbap_handle; + nbap_handle = find_dissector("nbap"); /*dissector_add("sctp.ppi", Add ppid here, nbap_handle); */ dissector_add("sctp.port", 0, nbap_handle); @@ -55137,7 +55136,7 @@ proto_reg_handoff_nbap(void) /*--- End of included file: packet-nbap-dis-tab.c ---*/ -#line 177 "packet-nbap-template.c" +#line 176 "packet-nbap-template.c" } diff --git a/epan/dissectors/packet-pres.c b/epan/dissectors/packet-pres.c index d7cf0de89f..c45310ac4c 100644 --- a/epan/dissectors/packet-pres.c +++ b/epan/dissectors/packet-pres.c @@ -65,9 +65,6 @@ static struct SESSION_DATA_STRUCTURE* session = NULL; proto_tree *global_tree = NULL; packet_info *global_pinfo = NULL; -/* dissector for data */ -static dissector_handle_t data_handle; - static const char *abstract_syntax_name_oid; static guint32 presentation_context_identifier; @@ -167,7 +164,7 @@ static int hf_pres_User_session_requirements_symmetric_synchronize = -1; static int hf_pres_User_session_requirements_data_separation = -1; /*--- End of included file: packet-pres-hf.c ---*/ -#line 81 "packet-pres-template.c" +#line 78 "packet-pres-template.c" /* Initialize the subtree pointers */ static gint ett_pres = -1; @@ -212,7 +209,7 @@ static gint ett_pres_T_presentation_data_values = -1; static gint ett_pres_User_session_requirements = -1; /*--- End of included file: packet-pres-ett.c ---*/ -#line 86 "packet-pres-template.c" +#line 83 "packet-pres-template.c" static guint @@ -1264,7 +1261,7 @@ dissect_pres_RSA_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _ /*--- End of included file: packet-pres-fn.c ---*/ -#line 169 "packet-pres-template.c" +#line 166 "packet-pres-template.c" /* @@ -1727,7 +1724,7 @@ void proto_register_pres(void) { "", HFILL }}, /*--- End of included file: packet-pres-hfarr.c ---*/ -#line 323 "packet-pres-template.c" +#line 320 "packet-pres-template.c" }; /* List of subtrees */ @@ -1773,7 +1770,7 @@ void proto_register_pres(void) { &ett_pres_User_session_requirements, /*--- End of included file: packet-pres-ettarr.c ---*/ -#line 329 "packet-pres-template.c" +#line 326 "packet-pres-template.c" }; /* Register protocol */ @@ -1793,6 +1790,4 @@ void proto_reg_handoff_pres(void) { /* register_ber_oid_dissector("0.4.0.0.1.1.1.1", dissect_pres, proto_pres, "itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) abstractSyntax(1) pres(1) version1(1)"); */ - data_handle = find_dissector("data"); - } diff --git a/epan/dissectors/packet-q932.c b/epan/dissectors/packet-q932.c index f034d305e9..3c1b3ef536 100644 --- a/epan/dissectors/packet-q932.c +++ b/epan/dissectors/packet-q932.c @@ -128,11 +128,7 @@ static gint ett_q932_NetworkFacilityExtension_U = -1; static rose_ctx_t q932_rose_ctx; /* Subdissectors */ -static dissector_handle_t data_handle = NULL; -static dissector_handle_t q932_ros_handle = NULL; - -/* Gloabl variables */ - +static dissector_handle_t q932_ros_handle; #define Q932_IE_EXTENDED_FACILITY 0x0D #define Q932_IE_FACILITY 0x1C @@ -640,7 +636,7 @@ static void dissect_InterpretationComponent_PDU(tvbuff_t *tvb _U_, packet_info * /*--- End of included file: packet-q932-fn.c ---*/ -#line 130 "packet-q932-template.c" +#line 126 "packet-q932-template.c" /*--- dissect_q932_facility_ie -------------------------------------------------------*/ /*static*/ void @@ -962,7 +958,7 @@ void proto_register_q932(void) { "q932.AddressInformation", HFILL }}, /*--- End of included file: packet-q932-hfarr.c ---*/ -#line 299 "packet-q932-template.c" +#line 295 "packet-q932-template.c" }; /* List of subtrees */ @@ -987,7 +983,7 @@ void proto_register_q932(void) { &ett_q932_NetworkFacilityExtension_U, /*--- End of included file: packet-q932-ettarr.c ---*/ -#line 306 "packet-q932-template.c" +#line 302 "packet-q932-template.c" }; /* Register protocol and dissector */ @@ -1020,7 +1016,6 @@ void proto_reg_handoff_q932(void) { dissector_add("q931.ie", (0x00 << 8) | Q932_IE_NOTIFICATION_INDICATOR, q932_ie_handle); q932_ros_handle = find_dissector("q932.ros"); - data_handle = find_dissector("data"); } /*---------------------------------------------------------------------------*/ diff --git a/epan/dissectors/packet-qsig.c b/epan/dissectors/packet-qsig.c index 8be6e20113..84b789ae27 100644 --- a/epan/dissectors/packet-qsig.c +++ b/epan/dissectors/packet-qsig.c @@ -2023,11 +2023,7 @@ static gint ett_qsig_mid_SEQUENCE_OF_Extension = -1; /* Preferences */ -/* Subdissectors */ -static dissector_handle_t q931_handle = NULL; -static dissector_handle_t data_handle = NULL; - -/* Gloabl variables */ +/* Global variables */ static const char *extension_oid = NULL; /* Dissector tables */ @@ -11900,7 +11896,7 @@ static int dissect_qsig_mid_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo /*--- End of included file: packet-qsig-fn.c ---*/ -#line 326 "packet-qsig-template.c" +#line 322 "packet-qsig-template.c" typedef struct _qsig_op_t { gint32 opcode; @@ -12118,7 +12114,7 @@ static const qsig_op_t qsig_op_tab[] = { /* mIDMailboxID */ { 120, dissect_qsig_mid_MIDMailboxIDArg_PDU, dissect_qsig_mid_MIDDummyRes_PDU }, /*--- End of included file: packet-qsig-table11.c ---*/ -#line 335 "packet-qsig-template.c" +#line 331 "packet-qsig-template.c" }; typedef struct _qsig_err_t { @@ -12299,7 +12295,7 @@ static const qsig_err_t qsig_err_tab[] = { /* unspecified */ { 1008, dissect_qsig_mid_Extension_PDU }, /*--- End of included file: packet-qsig-table21.c ---*/ -#line 344 "packet-qsig-template.c" +#line 340 "packet-qsig-template.c" }; static const qsig_op_t *get_op(gint32 opcode) { @@ -15814,7 +15810,7 @@ void proto_register_qsig(void) { "qsig.Extension", HFILL }}, /*--- End of included file: packet-qsig-hfarr.c ---*/ -#line 621 "packet-qsig-template.c" +#line 617 "packet-qsig-template.c" }; /* List of subtrees */ @@ -16265,7 +16261,7 @@ void proto_register_qsig(void) { &ett_qsig_mid_SEQUENCE_OF_Extension, /*--- End of included file: packet-qsig-ettarr.c ---*/ -#line 629 "packet-qsig-template.c" +#line 625 "packet-qsig-template.c" }; /* Register protocol and dissector */ @@ -16283,13 +16279,13 @@ void proto_register_qsig(void) { /*--- proto_reg_handoff_qsig ------------------------------------------------*/ void proto_reg_handoff_qsig(void) { int i; + dissector_handle_t q931_handle; dissector_handle_t qsig_arg_handle; dissector_handle_t qsig_res_handle; dissector_handle_t qsig_err_handle; dissector_handle_t qsig_ie_handle; q931_handle = find_dissector("q931"); - data_handle = find_dissector("data"); qsig_arg_handle = new_create_dissector_handle(dissect_qsig_arg, proto_qsig); qsig_res_handle = new_create_dissector_handle(dissect_qsig_res, proto_qsig); diff --git a/epan/dissectors/packet-ranap.c b/epan/dissectors/packet-ranap.c index 30d796d5bb..b75f44d72e 100644 --- a/epan/dissectors/packet-ranap.c +++ b/epan/dissectors/packet-ranap.c @@ -332,8 +332,6 @@ typedef enum _ProtocolIE_ID_enum { /*--- End of included file: packet-ranap-val.h ---*/ #line 62 "packet-ranap-template.c" -static dissector_handle_t ranap_handle = NULL; - /* Initialize the protocol and registered fields */ static int proto_ranap = -1; @@ -905,7 +903,7 @@ static int hf_ranap_value_02 = -1; /* T_value_02 */ static int hf_ranap_value_03 = -1; /* T_value_03 */ /*--- End of included file: packet-ranap-hf.c ---*/ -#line 70 "packet-ranap-template.c" +#line 68 "packet-ranap-template.c" /* Initialize the subtree pointers */ static int ett_ranap = -1; @@ -1181,7 +1179,7 @@ static gint ett_ranap_UnsuccessfulOutcome = -1; static gint ett_ranap_Outcome = -1; /*--- End of included file: packet-ranap-ett.c ---*/ -#line 75 "packet-ranap-template.c" +#line 73 "packet-ranap-template.c" /* Global variables */ static guint32 ProcedureCode; @@ -10446,7 +10444,7 @@ static int dissect_RANAP_PDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, prot /*--- End of included file: packet-ranap-fn.c ---*/ -#line 123 "packet-ranap-template.c" +#line 121 "packet-ranap-template.c" static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { @@ -12799,7 +12797,7 @@ void proto_register_ranap(void) { "ranap.T_value_03", HFILL }}, /*--- End of included file: packet-ranap-hfarr.c ---*/ -#line 223 "packet-ranap-template.c" +#line 221 "packet-ranap-template.c" }; /* List of subtrees */ @@ -13076,7 +13074,7 @@ void proto_register_ranap(void) { &ett_ranap_Outcome, /*--- End of included file: packet-ranap-ettarr.c ---*/ -#line 229 "packet-ranap-template.c" +#line 227 "packet-ranap-template.c" }; @@ -13088,7 +13086,6 @@ void proto_register_ranap(void) { /* Register dissector */ register_dissector("ranap", dissect_ranap, proto_ranap); - ranap_handle = find_dissector("ranap"); /* Register dissector tables */ ranap_ies_dissector_table = register_dissector_table("ranap.ies", "RANAP-PROTOCOL-IES", FT_UINT32, BASE_DEC); @@ -13113,18 +13110,13 @@ void proto_register_ranap(void) { void proto_reg_handoff_ranap(void) { - static int initialized = FALSE; + static gboolean initialized = FALSE; + static dissector_handle_t ranap_handle; static gint local_ranap_sccp_ssn; if (!initialized) { + ranap_handle = find_dissector("ranap"); initialized = TRUE; - } else { - dissector_delete("sccp.ssn", local_ranap_sccp_ssn, ranap_handle); - } - - dissector_add("sccp.ssn", global_ranap_sccp_ssn, ranap_handle); - local_ranap_sccp_ssn = global_ranap_sccp_ssn; - /*--- Included file: packet-ranap-dis-tab.c ---*/ #line 1 "packet-ranap-dis-tab.c" @@ -13388,7 +13380,14 @@ proto_reg_handoff_ranap(void) /*--- End of included file: packet-ranap-dis-tab.c ---*/ -#line 278 "packet-ranap-template.c" +#line 270 "packet-ranap-template.c" + } else { + dissector_delete("sccp.ssn", local_ranap_sccp_ssn, ranap_handle); + } + + dissector_add("sccp.ssn", global_ranap_sccp_ssn, ranap_handle); + local_ranap_sccp_ssn = global_ranap_sccp_ssn; + } diff --git a/epan/dissectors/packet-rnsap.c b/epan/dissectors/packet-rnsap.c index f8ab724a97..315ab405a8 100644 --- a/epan/dissectors/packet-rnsap.c +++ b/epan/dissectors/packet-rnsap.c @@ -817,8 +817,6 @@ typedef enum _ProtocolIE_ID_enum { /*--- End of included file: packet-rnsap-val.h ---*/ #line 58 "packet-rnsap-template.c" -static dissector_handle_t rnsap_handle = NULL; - static dissector_handle_t rrc_dl_dcch_handle = NULL; /* Initialize the protocol and registered fields */ @@ -2984,7 +2982,7 @@ static int hf_rnsap_value_04 = -1; /* UnsuccessfulOutcome_value * static int hf_rnsap_value_05 = -1; /* Outcome_value */ /*--- End of included file: packet-rnsap-hf.c ---*/ -#line 67 "packet-rnsap-template.c" +#line 65 "packet-rnsap-template.c" /* Initialize the subtree pointers */ static int ett_rnsap = -1; @@ -4047,7 +4045,7 @@ static gint ett_rnsap_UnsuccessfulOutcome = -1; static gint ett_rnsap_Outcome = -1; /*--- End of included file: packet-rnsap-ett.c ---*/ -#line 72 "packet-rnsap-template.c" +#line 70 "packet-rnsap-template.c" /* Global variables */ static guint32 ProcedureCode; @@ -35594,7 +35592,7 @@ static void dissect_RNSAP_PDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, pro /*--- End of included file: packet-rnsap-fn.c ---*/ -#line 93 "packet-rnsap-template.c" +#line 91 "packet-rnsap-template.c" static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { @@ -44272,7 +44270,7 @@ void proto_register_rnsap(void) { "rnsap.Outcome_value", HFILL }}, /*--- End of included file: packet-rnsap-hfarr.c ---*/ -#line 146 "packet-rnsap-template.c" +#line 144 "packet-rnsap-template.c" }; /* List of subtrees */ @@ -45336,7 +45334,7 @@ void proto_register_rnsap(void) { &ett_rnsap_Outcome, /*--- End of included file: packet-rnsap-ettarr.c ---*/ -#line 152 "packet-rnsap-template.c" +#line 150 "packet-rnsap-template.c" }; @@ -45348,7 +45346,6 @@ void proto_register_rnsap(void) { /* Register dissector */ register_dissector("rnsap", dissect_rnsap, proto_rnsap); - rnsap_handle = find_dissector("rnsap"); /* Register dissector tables */ rnsap_ies_dissector_table = register_dissector_table("rnsap.ies", "RNSAP-PROTOCOL-IES", FT_UINT32, BASE_DEC); @@ -45364,7 +45361,9 @@ void proto_register_rnsap(void) { void proto_reg_handoff_rnsap(void) { + dissector_handle_t rnsap_handle; + rnsap_handle = find_dissector("rnsap"); rrc_dl_dcch_handle = find_dissector("rrc.dl.dcch"); dissector_add("sccp.ssn", SCCP_SSN_RNSAP, rnsap_handle); @@ -46045,7 +46044,7 @@ proto_reg_handoff_rnsap(void) /*--- End of included file: packet-rnsap-dis-tab.c ---*/ -#line 190 "packet-rnsap-template.c" +#line 189 "packet-rnsap-template.c" } diff --git a/epan/dissectors/packet-rrc.c b/epan/dissectors/packet-rrc.c index 40c3c25c83..241c4c0488 100644 --- a/epan/dissectors/packet-rrc.c +++ b/epan/dissectors/packet-rrc.c @@ -61,8 +61,7 @@ #define PSNAME "RRC" #define PFNAME "rrc" -static dissector_handle_t rrc_handle=NULL; -static dissector_handle_t gsm_a_dtap_handle=NULL; +static dissector_handle_t gsm_a_dtap_handle; /* Include constants */ @@ -190,7 +189,7 @@ static dissector_handle_t gsm_a_dtap_handle=NULL; #define maxURNTI_Group 8 /*--- End of included file: packet-rrc-val.h ---*/ -#line 61 "packet-rrc-template.c" +#line 60 "packet-rrc-template.c" /* Initialize the protocol and registered fields */ static int proto_rrc = -1; @@ -6998,7 +6997,7 @@ static int hf_rrc_GsmSecurityCapability_a5_2 = -1; static int hf_rrc_GsmSecurityCapability_a5_1 = -1; /*--- End of included file: packet-rrc-hf.c ---*/ -#line 66 "packet-rrc-template.c" +#line 65 "packet-rrc-template.c" /* Initialize the subtree pointers */ static int ett_rrc = -1; @@ -11257,7 +11256,7 @@ static gint ett_rrc_UE_RadioAccessCapability_r6 = -1; static gint ett_rrc_UL_RFC3095_Context = -1; /*--- End of included file: packet-rrc-ett.c ---*/ -#line 71 "packet-rrc-template.c" +#line 70 "packet-rrc-template.c" /* Global variables */ static proto_tree *top_tree; @@ -98687,7 +98686,7 @@ static int dissect_MeasurementReport_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _ /*--- End of included file: packet-rrc-fn.c ---*/ -#line 76 "packet-rrc-template.c" +#line 75 "packet-rrc-template.c" /* TODO: Remove the dummy function when these functions are taken into use @@ -125933,7 +125932,7 @@ void proto_register_rrc(void) { "", HFILL }}, /*--- End of included file: packet-rrc-hfarr.c ---*/ -#line 129 "packet-rrc-template.c" +#line 128 "packet-rrc-template.c" }; /* List of subtrees */ @@ -130193,7 +130192,7 @@ void proto_register_rrc(void) { &ett_rrc_UL_RFC3095_Context, /*--- End of included file: packet-rrc-ettarr.c ---*/ -#line 135 "packet-rrc-template.c" +#line 134 "packet-rrc-template.c" }; @@ -130203,7 +130202,6 @@ void proto_register_rrc(void) { proto_register_field_array(proto_rrc, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); - register_dissector("rrc", dissect_rrc, proto_rrc); @@ -130264,7 +130262,7 @@ void proto_register_rrc(void) { /*--- End of included file: packet-rrc-dis-reg.c ---*/ -#line 148 "packet-rrc-template.c" +#line 146 "packet-rrc-template.c" } @@ -130274,7 +130272,6 @@ void proto_reg_handoff_rrc(void) { - rrc_handle = find_dissector("rrc"); gsm_a_dtap_handle = find_dissector("gsm_a_dtap"); } diff --git a/epan/dissectors/packet-rrlp.c b/epan/dissectors/packet-rrlp.c index 39112c76a9..7d728fe238 100644 --- a/epan/dissectors/packet-rrlp.c +++ b/epan/dissectors/packet-rrlp.c @@ -61,8 +61,6 @@ #pragma warning(disable:4146) #endif -static dissector_handle_t rrlp_handle=NULL; - /* Initialize the protocol and registered fields */ static int proto_rrlp = -1; @@ -504,7 +502,7 @@ static int hf_rrlp_PositionData_gps = -1; static int hf_rrlp_PositionData_galileo = -1; /*--- End of included file: packet-rrlp-hf.c ---*/ -#line 64 "packet-rrlp-template.c" +#line 62 "packet-rrlp-template.c" /* Initialize the subtree pointers */ static gint ett_rrlp = -1; @@ -668,7 +666,7 @@ static gint ett_rrlp_GANSS_SgnElement = -1; static gint ett_rrlp_Rel7_AssistanceData_Extension = -1; /*--- End of included file: packet-rrlp-ett.c ---*/ -#line 68 "packet-rrlp-template.c" +#line 66 "packet-rrlp-template.c" /* Include constants */ @@ -680,7 +678,7 @@ static gint ett_rrlp_Rel7_AssistanceData_Extension = -1; #define maxGANSSAssistanceData 40 /*--- End of included file: packet-rrlp-val.h ---*/ -#line 71 "packet-rrlp-template.c" +#line 69 "packet-rrlp-template.c" @@ -4580,7 +4578,7 @@ static void dissect_PDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tre /*--- End of included file: packet-rrlp-fn.c ---*/ -#line 74 "packet-rrlp-template.c" +#line 72 "packet-rrlp-template.c" /*--- proto_register_rrlp -------------------------------------------*/ @@ -6314,7 +6312,7 @@ void proto_register_rrlp(void) { "", HFILL }}, /*--- End of included file: packet-rrlp-hfarr.c ---*/ -#line 83 "packet-rrlp-template.c" +#line 81 "packet-rrlp-template.c" }; /* List of subtrees */ @@ -6480,7 +6478,7 @@ void proto_register_rrlp(void) { &ett_rrlp_Rel7_AssistanceData_Extension, /*--- End of included file: packet-rrlp-ettarr.c ---*/ -#line 89 "packet-rrlp-template.c" +#line 87 "packet-rrlp-template.c" }; @@ -6501,9 +6499,6 @@ void proto_reg_handoff_rrlp(void) { - rrlp_handle = create_dissector_handle(dissect_PDU_PDU, proto_rrlp); - - } diff --git a/epan/dissectors/packet-rtse.c b/epan/dissectors/packet-rtse.c index 7242b973af..caa45bec84 100644 --- a/epan/dissectors/packet-rtse.c +++ b/epan/dissectors/packet-rtse.c @@ -65,9 +65,6 @@ static guint32 app_proto=0; static proto_tree *top_tree=NULL; -static dissector_handle_t rtse_handle = NULL; -static dissector_handle_t ros_handle = NULL; - /* Preferences */ static gboolean rtse_reassemble = TRUE; @@ -100,7 +97,7 @@ static int hf_rtse_t61String = -1; /* T_t61String */ static int hf_rtse_octetString = -1; /* T_octetString */ /*--- End of included file: packet-rtse-hf.c ---*/ -#line 67 "packet-rtse-template.c" +#line 64 "packet-rtse-template.c" /* Initialize the subtree pointers */ static gint ett_rtse = -1; @@ -117,7 +114,7 @@ static gint ett_rtse_SessionConnectionIdentifier = -1; static gint ett_rtse_CallingSSuserReference = -1; /*--- End of included file: packet-rtse-ett.c ---*/ -#line 71 "packet-rtse-template.c" +#line 68 "packet-rtse-template.c" static dissector_table_t rtse_oid_dissector_table=NULL; @@ -158,8 +155,17 @@ static const fragment_items rtse_frag_items = { }; void -register_rtse_oid_dissector_handle(const char *oid, dissector_handle_t dissector, int proto _U_, const char *name, gboolean uses_ros) +register_rtse_oid_dissector_handle(const char *oid, dissector_handle_t dissector, int proto, const char *name, gboolean uses_ros) { +/* XXX: Note that this fcn is called from proto_reg_handoff in *other* dissectors ... */ + + static dissector_handle_t rtse_handle = NULL; + static dissector_handle_t ros_handle = NULL; + + if (rtse_handle == NULL) + rtse_handle = find_dissector("rtse"); + if (ros_handle == NULL) + ros_handle = find_dissector("ros"); /* save the name - but not used */ g_hash_table_insert(oid_table, (gpointer)oid, (gpointer)name); @@ -683,7 +689,7 @@ dissect_rtse_RTSE_apdus(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset /*--- End of included file: packet-rtse-fn.c ---*/ -#line 177 "packet-rtse-template.c" +#line 183 "packet-rtse-template.c" /* * Dissect RTSE PDUs inside a PPDU. @@ -942,7 +948,7 @@ void proto_register_rtse(void) { "rtse.T_octetString", HFILL }}, /*--- End of included file: packet-rtse-hfarr.c ---*/ -#line 335 "packet-rtse-template.c" +#line 341 "packet-rtse-template.c" }; /* List of subtrees */ @@ -964,7 +970,7 @@ void proto_register_rtse(void) { &ett_rtse_CallingSSuserReference, /*--- End of included file: packet-rtse-ettarr.c ---*/ -#line 344 "packet-rtse-template.c" +#line 350 "packet-rtse-template.c" }; module_t *rtse_module; @@ -988,8 +994,6 @@ void proto_register_rtse(void) { rtse_oid_dissector_table = register_dissector_table("rtse.oid", "RTSE OID Dissectors", FT_STRING, BASE_NONE); oid_table=g_hash_table_new(g_str_hash, g_str_equal); - rtse_handle = find_dissector("rtse"); - ros_handle = find_dissector("ros"); } diff --git a/epan/dissectors/packet-s1ap.c b/epan/dissectors/packet-s1ap.c index 5bcc4aa134..c5ad8efca8 100644 --- a/epan/dissectors/packet-s1ap.c +++ b/epan/dissectors/packet-s1ap.c @@ -230,8 +230,6 @@ typedef enum _ProtocolIE_ID_enum { /*--- End of included file: packet-s1ap-val.h ---*/ #line 64 "packet-s1ap-template.c" -static dissector_handle_t s1ap_handle = NULL; - /* Initialize the protocol and registered fields */ static int proto_s1ap = -1; @@ -519,7 +517,7 @@ static int hf_s1ap_successfulOutcome_value = -1; /* SuccessfulOutcome_value */ static int hf_s1ap_unsuccessfulOutcome_value = -1; /* UnsuccessfulOutcome_value */ /*--- End of included file: packet-s1ap-hf.c ---*/ -#line 71 "packet-s1ap-template.c" +#line 69 "packet-s1ap-template.c" /* Initialize the subtree pointers */ static int ett_s1ap = -1; @@ -681,7 +679,7 @@ static gint ett_s1ap_SuccessfulOutcome = -1; static gint ett_s1ap_UnsuccessfulOutcome = -1; /*--- End of included file: packet-s1ap-ett.c ---*/ -#line 76 "packet-s1ap-template.c" +#line 74 "packet-s1ap-template.c" /* Global variables */ static guint32 ProcedureCode; @@ -5424,7 +5422,7 @@ static int dissect_S1AP_PDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto /*--- End of included file: packet-s1ap-fn.c ---*/ -#line 103 "packet-s1ap-template.c" +#line 101 "packet-s1ap-template.c" static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { @@ -5484,18 +5482,13 @@ dissect_s1ap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) void proto_reg_handoff_s1ap(void) { - static int Initialized=FALSE; - static int SctpPort=0; + static gboolean Initialized=FALSE; + static dissector_handle_t s1ap_handle; + static guint SctpPort; if (!Initialized) { + s1ap_handle = find_dissector("s1ap"); Initialized=TRUE; - } else { - dissector_delete("sctp.port", SctpPort, s1ap_handle); - } - - SctpPort=gbl_s1apSctpPort; - dissector_add("sctp.port", SctpPort, s1ap_handle); - /*--- Included file: packet-s1ap-dis-tab.c ---*/ #line 1 "packet-s1ap-dis-tab.c" @@ -5654,7 +5647,14 @@ proto_reg_handoff_s1ap(void) /*--- End of included file: packet-s1ap-dis-tab.c ---*/ -#line 175 "packet-s1ap-template.c" +#line 168 "packet-s1ap-template.c" + } else { + dissector_delete("sctp.port", SctpPort, s1ap_handle); + } + + SctpPort=gbl_s1apSctpPort; + dissector_add("sctp.port", SctpPort, s1ap_handle); + } /*--- proto_register_s1ap -------------------------------------------*/ @@ -6961,7 +6961,6 @@ void proto_register_s1ap(void) { /* Register dissector */ register_dissector("s1ap", dissect_s1ap, proto_s1ap); - s1ap_handle = find_dissector("s1ap"); /* Register dissector tables */ s1ap_ies_dissector_table = register_dissector_table("s1ap.ies", "S1AP-PROTOCOL-IES", FT_UINT32, BASE_DEC); @@ -6972,15 +6971,14 @@ void proto_register_s1ap(void) { s1ap_proc_sout_dissector_table = register_dissector_table("s1ap.proc.sout", "S1AP-ELEMENTARY-PROCEDURE SuccessfulOutcome", FT_UINT32, BASE_DEC); s1ap_proc_uout_dissector_table = register_dissector_table("s1ap.proc.uout", "S1AP-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", FT_UINT32, BASE_DEC); - /* Register configuration options for ports */ - s1ap_module = prefs_register_protocol(proto_s1ap, - proto_reg_handoff_s1ap); - - prefs_register_uint_preference(s1ap_module, "sctp.port", - "S1AP SCTP Port", - "Set the SCTP port for S1AP messages", - 10, - &gbl_s1apSctpPort); + /* Register configuration options for ports */ + s1ap_module = prefs_register_protocol(proto_s1ap, proto_reg_handoff_s1ap); + + prefs_register_uint_preference(s1ap_module, "sctp.port", + "S1AP SCTP Port", + "Set the SCTP port for S1AP messages", + 10, + &gbl_s1apSctpPort); } diff --git a/epan/dissectors/packet-sabp.c b/epan/dissectors/packet-sabp.c index 436d6c0ebf..8df4b0f3f5 100644 --- a/epan/dissectors/packet-sabp.c +++ b/epan/dissectors/packet-sabp.c @@ -106,9 +106,6 @@ typedef enum _ProtocolIE_ID_enum { /*--- End of included file: packet-sabp-val.h ---*/ #line 58 "packet-sabp-template.c" -static dissector_handle_t sabp_handle = NULL; -static dissector_handle_t sabp_tcp_handle = NULL; - /* Initialize the protocol and registered fields */ static int proto_sabp = -1; @@ -193,7 +190,7 @@ static int hf_sabp_successfulOutcome_value = -1; /* SuccessfulOutcome_value */ static int hf_sabp_unsuccessfulOutcome_value = -1; /* UnsuccessfulOutcome_value */ /*--- End of included file: packet-sabp-hf.c ---*/ -#line 67 "packet-sabp-template.c" +#line 64 "packet-sabp-template.c" /* Initialize the subtree pointers */ static int ett_sabp = -1; @@ -245,7 +242,7 @@ static gint ett_sabp_SuccessfulOutcome = -1; static gint ett_sabp_UnsuccessfulOutcome = -1; /*--- End of included file: packet-sabp-ett.c ---*/ -#line 75 "packet-sabp-template.c" +#line 72 "packet-sabp-template.c" /* Global variables */ static guint32 ProcedureCode; @@ -1596,7 +1593,7 @@ static int dissect_SABP_PDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto /*--- End of included file: packet-sabp-fn.c ---*/ -#line 99 "packet-sabp-template.c" +#line 96 "packet-sabp-template.c" static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { @@ -1984,7 +1981,7 @@ void proto_register_sabp(void) { "sabp.UnsuccessfulOutcome_value", HFILL }}, /*--- End of included file: packet-sabp-hfarr.c ---*/ -#line 182 "packet-sabp-template.c" +#line 179 "packet-sabp-template.c" }; /* List of subtrees */ @@ -2037,7 +2034,7 @@ void proto_register_sabp(void) { &ett_sabp_UnsuccessfulOutcome, /*--- End of included file: packet-sabp-ettarr.c ---*/ -#line 191 "packet-sabp-template.c" +#line 188 "packet-sabp-template.c" }; @@ -2050,8 +2047,6 @@ void proto_register_sabp(void) { /* Register dissector */ register_dissector("sabp", dissect_sabp, proto_sabp); register_dissector("sabp.tcp", dissect_sabp_tcp, proto_sabp); - sabp_handle = find_dissector("sabp"); - sabp_tcp_handle = find_dissector("sabp.tcp"); /* Register dissector tables */ sabp_ies_dissector_table = register_dissector_table("sabp.ies", "SABP-PROTOCOL-IES", FT_UINT32, BASE_DEC); @@ -2067,7 +2062,13 @@ void proto_register_sabp(void) { void proto_reg_handoff_sabp(void) { + dissector_handle_t sabp_handle; + dissector_handle_t sabp_tcp_handle; + sabp_handle = find_dissector("sabp"); + sabp_tcp_handle = find_dissector("sabp.tcp"); + dissector_add("udp.port", 3452, sabp_handle); + dissector_add("tcp.port", 3452, sabp_tcp_handle); /*--- Included file: packet-sabp-dis-tab.c ---*/ @@ -2111,12 +2112,8 @@ proto_reg_handoff_sabp(void) /*--- End of included file: packet-sabp-dis-tab.c ---*/ -#line 223 "packet-sabp-template.c" +#line 224 "packet-sabp-template.c" - sabp_handle = find_dissector("sabp"); - dissector_add("tcp.port", 3452, sabp_tcp_handle); - dissector_add("udp.port", 3452, sabp_handle); - dissector_add_handle("tcp.port", sabp_tcp_handle); } diff --git a/epan/dissectors/packet-spnego.c b/epan/dissectors/packet-spnego.c index b39f301f92..841b4d407b 100644 --- a/epan/dissectors/packet-spnego.c +++ b/epan/dissectors/packet-spnego.c @@ -143,8 +143,6 @@ static gint ett_spnego_InitialContextToken_U = -1; /*--- End of included file: packet-spnego-ett.c ---*/ #line 98 "packet-spnego-template.c" -static dissector_handle_t data_handle; - /* * Unfortunately, we have to have a forward declaration of this, * as the code generated by asn2wrs includes a call before the @@ -606,7 +604,7 @@ dissect_spnego_InitialContextToken(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, /*--- End of included file: packet-spnego-fn.c ---*/ -#line 111 "packet-spnego-template.c" +#line 109 "packet-spnego-template.c" /* * This is the SPNEGO KRB5 dissector. It is not true KRB5, but some ASN.1 * wrapped blob with an OID, USHORT token ID, and a Ticket, that is also @@ -1963,7 +1961,7 @@ void proto_register_spnego(void) { "", HFILL }}, /*--- End of included file: packet-spnego-hfarr.c ---*/ -#line 1379 "packet-spnego-template.c" +#line 1377 "packet-spnego-template.c" }; /* List of subtrees */ @@ -1985,7 +1983,7 @@ void proto_register_spnego(void) { &ett_spnego_InitialContextToken_U, /*--- End of included file: packet-spnego-ettarr.c ---*/ -#line 1389 "packet-spnego-template.c" +#line 1387 "packet-spnego-template.c" }; /* Register protocol */ @@ -2014,9 +2012,8 @@ void proto_reg_handoff_spnego(void) { /* Register protocol with GSS-API module */ - spnego_handle = create_dissector_handle(dissect_spnego, proto_spnego); - spnego_wrap_handle = new_create_dissector_handle(dissect_spnego_wrap, - proto_spnego); + spnego_handle = find_dissector("spnego"); + spnego_wrap_handle = new_create_dissector_handle(dissect_spnego_wrap, proto_spnego); gssapi_init_oid("1.3.6.1.5.5.2", proto_spnego, ett_spnego, spnego_handle, spnego_wrap_handle, "SPNEGO - Simple Protected Negotiation"); @@ -2030,10 +2027,8 @@ void proto_reg_handoff_spnego(void) { * See the archive of <ietf-krb-wg@anl.gov> for the thread topic * SPNEGO implementation issues. 3-Dec-2002. */ - spnego_krb5_handle = create_dissector_handle(dissect_spnego_krb5, - proto_spnego_krb5); - spnego_krb5_wrap_handle = new_create_dissector_handle(dissect_spnego_krb5_wrap, - proto_spnego_krb5); + spnego_krb5_handle = find_dissector("spnego-krb5"); + spnego_krb5_wrap_handle = find_dissector("spnego-krb5-wrap"); gssapi_init_oid("1.2.840.48018.1.2.2", proto_spnego_krb5, ett_spnego_krb5, spnego_krb5_handle, spnego_krb5_wrap_handle, "MS KRB5 - Microsoft Kerberos 5"); @@ -2044,8 +2039,4 @@ void proto_reg_handoff_spnego(void) { spnego_krb5_handle, spnego_krb5_wrap_handle, "KRB5 - Kerberos 5 - User to User"); - /* - * Find the data handle for some calls - */ - data_handle = find_dissector("data"); } diff --git a/epan/dissectors/packet-t38.c b/epan/dissectors/packet-t38.c index 020019191f..13f4bf78ac 100644 --- a/epan/dissectors/packet-t38.c +++ b/epan/dissectors/packet-t38.c @@ -81,13 +81,6 @@ static guint global_t38_udp_port = PORT_T38; static int t38_tap = -1; -/* -* Variables to allow for proper deletion of dissector registration when -* the user changes port from the gui. -*/ -static guint tcp_port = 0; -static guint udp_port = 0; - /* dissect using the Pre Corrigendum T.38 ASN.1 specification (1998) */ static gboolean use_pre_corrigendum_asn1_specification = TRUE; @@ -159,7 +152,7 @@ static int hf_t38_fec_data = -1; /* T_fec_data */ static int hf_t38_fec_data_item = -1; /* OCTET_STRING */ /*--- End of included file: packet-t38-hf.c ---*/ -#line 132 "packet-t38-template.c" +#line 125 "packet-t38-template.c" /* T38 setup fields */ static int hf_t38_setup = -1; @@ -191,7 +184,7 @@ static gint ett_t38_T_fec_info = -1; static gint ett_t38_T_fec_data = -1; /*--- End of included file: packet-t38-ett.c ---*/ -#line 150 "packet-t38-template.c" +#line 143 "packet-t38-template.c" static gint ett_t38_setup = -1; static gint ett_data_fragment = -1; @@ -977,7 +970,7 @@ static int dissect_UDPTLPacket_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, pr /*--- End of included file: packet-t38-fn.c ---*/ -#line 400 "packet-t38-template.c" +#line 393 "packet-t38-template.c" /* initialize the tap t38_info and the conversation */ static void @@ -1348,7 +1341,7 @@ proto_register_t38(void) "t38.OCTET_STRING", HFILL }}, /*--- End of included file: packet-t38-hfarr.c ---*/ -#line 694 "packet-t38-template.c" +#line 687 "packet-t38-template.c" { &hf_t38_setup, { "Stream setup", "t38.setup", FT_STRING, BASE_NONE, NULL, 0x0, "Stream setup, method and frame number", HFILL }}, @@ -1403,7 +1396,7 @@ proto_register_t38(void) &ett_t38_T_fec_data, /*--- End of included file: packet-t38-ettarr.c ---*/ -#line 735 "packet-t38-template.c" +#line 728 "packet-t38-template.c" &ett_t38_setup, &ett_data_fragment, &ett_data_fragments @@ -1417,7 +1410,7 @@ proto_register_t38(void) register_dissector("t38", dissect_t38, proto_t38); /* Init reassemble tables for HDLC */ - register_init_routine(t38_defragment_init); + register_init_routine(t38_defragment_init); t38_tap = register_tap("t38"); @@ -1445,7 +1438,8 @@ proto_register_t38(void) "Reassemble T.38 PDUs over TPKT over TCP", "Whether the dissector should reassemble T.38 PDUs spanning multiple TCP segments " "when TPKT is used over TCP. " - "To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", + "To use this option, you must also enable \"Allow subdissectors to reassemble " + "TCP streams\" in the TCP protocol settings.", &t38_tpkt_reassembly); prefs_register_enum_preference(t38_module, "tpkt_usage", "TPKT used over TCP", @@ -1463,12 +1457,17 @@ proto_register_t38(void) void proto_reg_handoff_t38(void) { - static int t38_prefs_initialized = FALSE; + static gboolean t38_prefs_initialized = FALSE; + static guint tcp_port; + static guint udp_port; if (!t38_prefs_initialized) { t38_udp_handle=create_dissector_handle(dissect_t38_udp, proto_t38); t38_tcp_handle=create_dissector_handle(dissect_t38_tcp, proto_t38); t38_tcp_pdu_handle=create_dissector_handle(dissect_t38_tcp_pdu, proto_t38); + rtp_handle = find_dissector("rtp"); + t30_hdlc_handle = find_dissector("t30.hdlc"); + data_handle = find_dissector("data"); t38_prefs_initialized = TRUE; } else { @@ -1481,11 +1480,5 @@ proto_reg_handoff_t38(void) dissector_add("tcp.port", tcp_port, t38_tcp_handle); dissector_add("udp.port", udp_port, t38_udp_handle); - rtp_handle = find_dissector("rtp"); - t30_hdlc_handle = find_dissector("t30.hdlc"); - data_handle = find_dissector("data"); } - - - diff --git a/epan/dissectors/packet-ulp.c b/epan/dissectors/packet-ulp.c index 81c15e4706..e050bc6a19 100644 --- a/epan/dissectors/packet-ulp.c +++ b/epan/dissectors/packet-ulp.c @@ -56,14 +56,13 @@ #define PSNAME "ULP" #define PFNAME "ulp" -static dissector_handle_t ulp_handle = NULL; -static dissector_handle_t rrlp_handle = NULL; +static dissector_handle_t rrlp_handle; /* IANA Registered Ports * oma-ulp 7275/tcp OMA UserPlane Location * oma-ulp 7275/udp OMA UserPlane Location */ -guint gbl_ulp_port = 7275; +static guint gbl_ulp_port = 7275; /* Initialize the protocol and registered fields */ static int proto_ulp = -1; @@ -252,7 +251,7 @@ static int hf_ulp_horuncertspeed = -1; /* BIT_STRING_SIZE_8 */ static int hf_ulp_veruncertspeed = -1; /* BIT_STRING_SIZE_8 */ /*--- End of included file: packet-ulp-hf.c ---*/ -#line 69 "packet-ulp-template.c" +#line 68 "packet-ulp-template.c" /* Initialize the subtree pointers */ static gint ett_ulp = -1; @@ -319,7 +318,7 @@ static gint ett_ulp_Horveluncert = -1; static gint ett_ulp_Horandveruncert = -1; /*--- End of included file: packet-ulp-ett.c ---*/ -#line 73 "packet-ulp-template.c" +#line 72 "packet-ulp-template.c" /* Include constants */ @@ -332,7 +331,7 @@ static gint ett_ulp_Horandveruncert = -1; #define maxTS 14 /*--- End of included file: packet-ulp-val.h ---*/ -#line 76 "packet-ulp-template.c" +#line 75 "packet-ulp-template.c" @@ -2188,7 +2187,7 @@ static void dissect_ULP_PDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto /*--- End of included file: packet-ulp-fn.c ---*/ -#line 79 "packet-ulp-template.c" +#line 78 "packet-ulp-template.c" static guint @@ -2914,7 +2913,7 @@ void proto_register_ulp(void) { "ulp.BIT_STRING_SIZE_8", HFILL }}, /*--- End of included file: packet-ulp-hfarr.c ---*/ -#line 104 "packet-ulp-template.c" +#line 103 "packet-ulp-template.c" }; /* List of subtrees */ @@ -2983,7 +2982,7 @@ void proto_register_ulp(void) { &ett_ulp_Horandveruncert, /*--- End of included file: packet-ulp-ettarr.c ---*/ -#line 110 "packet-ulp-template.c" +#line 109 "packet-ulp-template.c" }; module_t *ulp_module; @@ -3005,12 +3004,12 @@ void proto_register_ulp(void) { " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", &ulp_desegment); - /* Register a configuration option for port */ - prefs_register_uint_preference(ulp_module, "tcp.port", - "ULP TCP Port", - "Set the TCP port for Ulp messages(IANA registerd port is 7275)", - 10, - &gbl_ulp_port); + /* Register a configuration option for port */ + prefs_register_uint_preference(ulp_module, "tcp.port", + "ULP TCP Port", + "Set the TCP port for Ulp messages(IANA registerd port is 7275)", + 10, + &gbl_ulp_port); } @@ -3019,15 +3018,23 @@ void proto_register_ulp(void) { void proto_reg_handoff_ulp(void) { + static gboolean initialized = FALSE; + static dissector_handle_t ulp_handle; + static guint local_ulp_port; + + if (!initialized) { + ulp_handle = find_dissector("ulp"); + dissector_add_string("media_type","application/oma-supl-ulp", ulp_handle); + rrlp_handle = find_dissector("rrlp"); + initialized = TRUE; + } else { + dissector_delete("tcp.port", local_ulp_port, ulp_handle); + } - ulp_handle = create_dissector_handle(dissect_ulp_tcp, proto_ulp); - + local_ulp_port = gbl_ulp_port; dissector_add("tcp.port", gbl_ulp_port, ulp_handle); /* application/oma-supl-ulp */ - dissector_add_string("media_type","application/oma-supl-ulp", ulp_handle); - - rrlp_handle = find_dissector("rrlp"); } diff --git a/epan/dissectors/packet-x2ap.c b/epan/dissectors/packet-x2ap.c index 7914cf271d..acc2356890 100644 --- a/epan/dissectors/packet-x2ap.c +++ b/epan/dissectors/packet-x2ap.c @@ -138,8 +138,6 @@ typedef enum _ProtocolIE_ID_enum { /*--- End of included file: packet-x2ap-val.h ---*/ #line 58 "packet-x2ap-template.c" -static dissector_handle_t x2ap_handle = NULL; - /* Initialize the protocol and registered fields */ static int proto_x2ap = -1; @@ -324,7 +322,7 @@ static int hf_x2ap_successfulOutcome_value = -1; /* SuccessfulOutcome_value */ static int hf_x2ap_value = -1; /* UnsuccessfulOutcome_value */ /*--- End of included file: packet-x2ap-hf.c ---*/ -#line 65 "packet-x2ap-template.c" +#line 63 "packet-x2ap-template.c" /* Initialize the subtree pointers */ static int ett_x2ap = -1; @@ -416,7 +414,7 @@ static gint ett_x2ap_SuccessfulOutcome = -1; static gint ett_x2ap_UnsuccessfulOutcome = -1; /*--- End of included file: packet-x2ap-ett.c ---*/ -#line 70 "packet-x2ap-template.c" +#line 68 "packet-x2ap-template.c" /* Global variables */ static guint32 ProcedureCode; @@ -2956,7 +2954,7 @@ static void dissect_X2AP_PDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, prot /*--- End of included file: packet-x2ap-fn.c ---*/ -#line 90 "packet-x2ap-template.c" +#line 88 "packet-x2ap-template.c" static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { @@ -3718,7 +3716,7 @@ void proto_register_x2ap(void) { "x2ap.UnsuccessfulOutcome_value", HFILL }}, /*--- End of included file: packet-x2ap-hfarr.c ---*/ -#line 143 "packet-x2ap-template.c" +#line 141 "packet-x2ap-template.c" }; /* List of subtrees */ @@ -3811,7 +3809,7 @@ void proto_register_x2ap(void) { &ett_x2ap_UnsuccessfulOutcome, /*--- End of included file: packet-x2ap-ettarr.c ---*/ -#line 149 "packet-x2ap-template.c" +#line 147 "packet-x2ap-template.c" }; @@ -3823,7 +3821,6 @@ void proto_register_x2ap(void) { /* Register dissector */ register_dissector("x2ap", dissect_x2ap, proto_x2ap); - x2ap_handle = find_dissector("x2ap"); /* Register dissector tables */ x2ap_ies_dissector_table = register_dissector_table("x2ap.ies", "X2AP-PROTOCOL-IES", FT_UINT32, BASE_DEC); @@ -3839,7 +3836,9 @@ void proto_register_x2ap(void) { void proto_reg_handoff_x2ap(void) { + dissector_handle_t x2ap_handle; + x2ap_handle = find_dissector("x2ap"); dissector_add("sctp.port", 0, x2ap_handle); @@ -3904,7 +3903,7 @@ proto_reg_handoff_x2ap(void) /*--- End of included file: packet-x2ap-dis-tab.c ---*/ -#line 180 "packet-x2ap-template.c" +#line 179 "packet-x2ap-template.c" } |