diff options
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-ansi_tcap.c | 15 | ||||
-rw-r--r-- | epan/dissectors/packet-ftam.c | 17 | ||||
-rw-r--r-- | epan/dissectors/packet-goose.c | 46 | ||||
-rw-r--r-- | epan/dissectors/packet-h245.c | 18 | ||||
-rw-r--r-- | epan/dissectors/packet-h248.c | 20 | ||||
-rw-r--r-- | epan/dissectors/packet-lcsap.c | 13 | ||||
-rw-r--r-- | epan/dissectors/packet-lte-rrc.c | 76 | ||||
-rw-r--r-- | epan/dissectors/packet-mms.c | 19 | ||||
-rw-r--r-- | epan/dissectors/packet-mpeg-pes.c | 23 | ||||
-rw-r--r-- | epan/dissectors/packet-p22.c | 17 | ||||
-rw-r--r-- | epan/dissectors/packet-p772.c | 17 | ||||
-rw-r--r-- | epan/dissectors/packet-pcap.c | 13 | ||||
-rw-r--r-- | epan/dissectors/packet-rrc.c | 13 | ||||
-rw-r--r-- | epan/dissectors/packet-s1ap.c | 13 | ||||
-rw-r--r-- | epan/dissectors/packet-spnego.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-sv.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-t38.c | 12 | ||||
-rw-r--r-- | epan/dissectors/packet-tcap.c | 27 | ||||
-rw-r--r-- | epan/dissectors/packet-tetra.c | 21 |
19 files changed, 208 insertions, 190 deletions
diff --git a/epan/dissectors/packet-ansi_tcap.c b/epan/dissectors/packet-ansi_tcap.c index 67a3bf7dbe..b4629e5150 100644 --- a/epan/dissectors/packet-ansi_tcap.c +++ b/epan/dissectors/packet-ansi_tcap.c @@ -222,8 +222,6 @@ static const value_string ansi_tcap_national_op_code_family_vals[] = { { 0, NULL } }; -static void dissect_ansi_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree); - /* static dissector_handle_t tcap_handle = NULL; static dissector_table_t sccp_ssn_table; @@ -1407,13 +1405,13 @@ dissect_ansi_tcap_PackageType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int /*--- End of included file: packet-ansi_tcap-fn.c ---*/ -#line 350 "../../asn1/ansi_tcap/packet-ansi_tcap-template.c" +#line 348 "../../asn1/ansi_tcap/packet-ansi_tcap-template.c" -static void -dissect_ansi_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) +static int +dissect_ansi_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_) { proto_item *item=NULL; proto_tree *tree=NULL; @@ -1473,6 +1471,7 @@ dissect_ansi_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) } } #endif + return tvb_captured_length(tvb); } @@ -1751,7 +1750,7 @@ proto_register_ansi_tcap(void) NULL, HFILL }}, /*--- End of included file: packet-ansi_tcap-hfarr.c ---*/ -#line 485 "../../asn1/ansi_tcap/packet-ansi_tcap-template.c" +#line 484 "../../asn1/ansi_tcap/packet-ansi_tcap-template.c" }; /* Setup protocol subtree array */ @@ -1789,7 +1788,7 @@ proto_register_ansi_tcap(void) &ett_ansi_tcap_T_paramSet, /*--- End of included file: packet-ansi_tcap-ettarr.c ---*/ -#line 496 "../../asn1/ansi_tcap/packet-ansi_tcap-template.c" +#line 495 "../../asn1/ansi_tcap/packet-ansi_tcap-template.c" }; static ei_register_info ei[] = { @@ -1807,7 +1806,7 @@ proto_register_ansi_tcap(void) /* Register the protocol name and description */ proto_ansi_tcap = proto_register_protocol(PNAME, PSNAME, PFNAME); - register_dissector("ansi_tcap", dissect_ansi_tcap, proto_ansi_tcap); + new_register_dissector("ansi_tcap", dissect_ansi_tcap, proto_ansi_tcap); /* Note the high bit should be masked off when registering in this table (0x7fff)*/ ansi_tcap_national_opcode_table = register_dissector_table("ansi_tcap.nat.opcode", "ANSI TCAP National Opcodes", FT_UINT16, BASE_DEC, DISSECTOR_TABLE_ALLOW_DUPLICATE); diff --git a/epan/dissectors/packet-ftam.c b/epan/dissectors/packet-ftam.c index 495d9ee3ce..12d284406c 100644 --- a/epan/dissectors/packet-ftam.c +++ b/epan/dissectors/packet-ftam.c @@ -4766,8 +4766,8 @@ dissect_ftam_unstructured_binary(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr /* * Dissect FTAM PDUs inside a PPDU. */ -static void -dissect_ftam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) +static int +dissect_ftam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_) { int offset = 0; int old_offset; @@ -4792,6 +4792,7 @@ dissect_ftam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) break; } } + return tvb_captured_length(tvb); } @@ -6468,7 +6469,7 @@ void proto_register_ftam(void) { NULL, HFILL }}, /*--- End of included file: packet-ftam-hfarr.c ---*/ -#line 128 "../../asn1/ftam/packet-ftam-template.c" +#line 129 "../../asn1/ftam/packet-ftam-template.c" }; /* List of subtrees */ @@ -6641,7 +6642,7 @@ void proto_register_ftam(void) { &ett_ftam_AE_title, /*--- End of included file: packet-ftam-ettarr.c ---*/ -#line 134 "../../asn1/ftam/packet-ftam-template.c" +#line 135 "../../asn1/ftam/packet-ftam-template.c" }; static ei_register_info ei[] = { { &ei_ftam_zero_pdu, { "ftam.zero_pdu", PI_PROTOCOL, PI_ERROR, "Internal error, zero-byte FTAM PDU", EXPFILL }}, @@ -6651,7 +6652,7 @@ void proto_register_ftam(void) { /* Register protocol */ proto_ftam = proto_register_protocol(PNAME, PSNAME, PFNAME); - register_dissector("ftam", dissect_ftam, proto_ftam); + new_register_dissector("ftam", dissect_ftam, proto_ftam); /* Register fields and subtrees */ proto_register_field_array(proto_ftam, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); @@ -6663,9 +6664,9 @@ void proto_register_ftam(void) { /*--- proto_reg_handoff_ftam --- */ void proto_reg_handoff_ftam(void) { - register_ber_oid_dissector("1.0.8571.1.1", dissect_ftam, proto_ftam,"iso-ftam(1)"); - register_ber_oid_dissector("1.0.8571.2.1", dissect_ftam, proto_ftam,"ftam-pci(1)"); - register_ber_oid_dissector("1.3.14.5.2.2", dissect_ftam, proto_ftam,"NIST file directory entry abstract syntax"); + new_register_ber_oid_dissector("1.0.8571.1.1", dissect_ftam, proto_ftam,"iso-ftam(1)"); + new_register_ber_oid_dissector("1.0.8571.2.1", dissect_ftam, proto_ftam,"ftam-pci(1)"); + new_register_ber_oid_dissector("1.3.14.5.2.2", dissect_ftam, proto_ftam,"NIST file directory entry abstract syntax"); /* Unstructured text file document type FTAM-1 */ register_ber_oid_dissector("1.0.8571.5.1", dissect_ftam_unstructured_text, proto_ftam,"ISO FTAM unstructured text"); diff --git a/epan/dissectors/packet-goose.c b/epan/dissectors/packet-goose.c index 1637f76d56..bfc5aa8dbd 100644 --- a/epan/dissectors/packet-goose.c +++ b/epan/dissectors/packet-goose.c @@ -709,8 +709,8 @@ dissect_goose_GOOSEpdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset /* * Dissect GOOSE PDUs inside a PPDU. */ -static void -dissect_goose(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) +static int +dissect_goose(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_) { int offset = 0; int old_offset; @@ -723,34 +723,34 @@ dissect_goose(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, PNAME); col_clear(pinfo->cinfo, COL_INFO); - if (parent_tree){ - item = proto_tree_add_item(parent_tree, proto_goose, tvb, 0, -1, ENC_NA); - tree = proto_item_add_subtree(item, ett_goose); + item = proto_tree_add_item(parent_tree, proto_goose, tvb, 0, -1, ENC_NA); + tree = proto_item_add_subtree(item, ett_goose); - /* APPID */ - proto_tree_add_item(tree, hf_goose_appid, tvb, offset, 2, ENC_BIG_ENDIAN); + /* APPID */ + proto_tree_add_item(tree, hf_goose_appid, tvb, offset, 2, ENC_BIG_ENDIAN); - /* Length */ - length = tvb_get_ntohs(tvb, offset + 2); - proto_tree_add_item(tree, hf_goose_length, tvb, offset + 2, 2, ENC_BIG_ENDIAN); + /* Length */ + length = tvb_get_ntohs(tvb, offset + 2); + proto_tree_add_item(tree, hf_goose_length, tvb, offset + 2, 2, ENC_BIG_ENDIAN); - /* Reserved 1 */ - proto_tree_add_item(tree, hf_goose_reserve1, tvb, offset + 4, 2, ENC_BIG_ENDIAN); + /* Reserved 1 */ + proto_tree_add_item(tree, hf_goose_reserve1, tvb, offset + 4, 2, ENC_BIG_ENDIAN); - /* Reserved 2 */ - proto_tree_add_item(tree, hf_goose_reserve2, tvb, offset + 6, 2, ENC_BIG_ENDIAN); + /* Reserved 2 */ + proto_tree_add_item(tree, hf_goose_reserve2, tvb, offset + 6, 2, ENC_BIG_ENDIAN); - offset = 8; - while (offset < length){ - old_offset = offset; - offset = dissect_goose_GOOSEpdu(FALSE, tvb, offset, &asn1_ctx , tree, -1); - if (offset == old_offset) { - proto_tree_add_expert(tree, pinfo, &ei_goose_zero_pdu, tvb, offset, -1); - return; - } + offset = 8; + while (offset < length){ + old_offset = offset; + offset = dissect_goose_GOOSEpdu(FALSE, tvb, offset, &asn1_ctx , tree, -1); + if (offset == old_offset) { + proto_tree_add_expert(tree, pinfo, &ei_goose_zero_pdu, tvb, offset, -1); + break; } } + + return tvb_captured_length(tvb); } @@ -1053,7 +1053,7 @@ void proto_register_goose(void) { /* Register protocol */ proto_goose = proto_register_protocol(PNAME, PSNAME, PFNAME); - register_dissector("goose", dissect_goose, proto_goose); + new_register_dissector("goose", dissect_goose, proto_goose); /* Register fields and subtrees */ proto_register_field_array(proto_goose, hf, array_length(hf)); diff --git a/epan/dissectors/packet-h245.c b/epan/dissectors/packet-h245.c index 9ac7913db1..cde430d526 100644 --- a/epan/dissectors/packet-h245.c +++ b/epan/dissectors/packet-h245.c @@ -14531,19 +14531,20 @@ static int dissect_OpenLogicalChannel_PDU(tvbuff_t *tvb _U_, packet_info *pinfo /*--- End of included file: packet-h245-fn.c ---*/ #line 421 "../../asn1/h245/packet-h245-template.c" -static void -dissect_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) +static int +dissect_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_) { /* * MultimediaSystemControlMessage_handle is the handle for * dissect_h245_h245, so we don't want to do any h245_pi or tap stuff here. */ dissect_tpkt_encap(tvb, pinfo, parent_tree, h245_reassembly, MultimediaSystemControlMessage_handle); + return tvb_captured_length(tvb); } -static void -dissect_h245_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) +static int +dissect_h245_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_) { proto_item *it; proto_tree *tr; @@ -14572,6 +14573,7 @@ dissect_h245_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) offset = (offset+0x07) & 0xfffffff8; CLEANUP_CALL_AND_POP; } + return tvb_captured_length(tvb); } void @@ -20226,7 +20228,7 @@ void proto_register_h245(void) { NULL, HFILL }}, /*--- End of included file: packet-h245-hfarr.c ---*/ -#line 505 "../../asn1/h245/packet-h245-template.c" +#line 507 "../../asn1/h245/packet-h245-template.c" }; /* List of subtrees */ @@ -20729,7 +20731,7 @@ void proto_register_h245(void) { &ett_h245_MobileMultilinkReconfigurationIndication, /*--- End of included file: packet-h245-ettarr.c ---*/ -#line 512 "../../asn1/h245/packet-h245-template.c" +#line 514 "../../asn1/h245/packet-h245-template.c" }; module_t *h245_module; @@ -20757,8 +20759,8 @@ void proto_register_h245(void) { "Show h245 info in reversed order", "Whether the dissector should print items of h245 Info column in reversed order", &info_col_fmt_prepend); - register_dissector("h245dg", dissect_h245_h245, proto_h245); - register_dissector("h245", dissect_h245, proto_h245); + new_register_dissector("h245dg", dissect_h245_h245, proto_h245); + new_register_dissector("h245", dissect_h245, proto_h245); nsp_object_dissector_table = register_dissector_table("h245.nsp.object", "H.245 NonStandardParameter (object)", FT_STRING, BASE_NONE, DISSECTOR_TABLE_ALLOW_DUPLICATE); nsp_h221_dissector_table = register_dissector_table("h245.nsp.h221", "H.245 NonStandardParameter (h221)", FT_UINT32, BASE_HEX, DISSECTOR_TABLE_ALLOW_DUPLICATE); diff --git a/epan/dissectors/packet-h248.c b/epan/dissectors/packet-h248.c index c89afa489e..d82d94cb37 100644 --- a/epan/dissectors/packet-h248.c +++ b/epan/dissectors/packet-h248.c @@ -5342,12 +5342,13 @@ dissect_h248_SigParameterV1(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of /*--- End of included file: packet-h248-fn.c ---*/ #line 1418 "../../asn1/h248/packet-h248-template.c" -static void dissect_h248_tpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { +static int dissect_h248_tpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { dissect_tpkt_encap(tvb, pinfo, tree, h248_desegment, h248_handle); + return tvb_captured_length(tvb); } -static void -dissect_h248(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_h248(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *h248_item; asn1_ctx_t asn1_ctx; @@ -5379,7 +5380,7 @@ dissect_h248(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } if(megaco_handle){ call_dissector(megaco_handle, tvb, pinfo, tree); - return; + return tvb_captured_length(tvb); } } { @@ -5389,7 +5390,7 @@ dissect_h248(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) hidden_item = proto_tree_add_uint(tree, hf_248_magic_num, tvb, offset, 4, magic_num); PROTO_ITEM_SET_HIDDEN(hidden_item); if( dissector_try_uint(subdissector_table, magic_num, tvb, pinfo, tree) ) { - return; + return tvb_captured_length(tvb); } } } @@ -5404,6 +5405,7 @@ dissect_h248(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) dissect_h248_MegacoMessage(FALSE, tvb, 0, &asn1_ctx, h248_tree, -1); + return tvb_captured_length(tvb); } /*--- proto_register_h248 ----------------------------------------------*/ @@ -6762,7 +6764,7 @@ void proto_register_h248(void) { NULL, HFILL }}, /*--- End of included file: packet-h248-hfarr.c ---*/ -#line 1583 "../../asn1/h248/packet-h248-template.c" +#line 1585 "../../asn1/h248/packet-h248-template.c" GCP_HF_ARR_ELEMS("h248",h248_arrel) @@ -6928,7 +6930,7 @@ void proto_register_h248(void) { &ett_h248_SigParameterV1, /*--- End of included file: packet-h248-ettarr.c ---*/ -#line 1601 "../../asn1/h248/packet-h248-template.c" +#line 1603 "../../asn1/h248/packet-h248-template.c" }; static ei_register_info ei[] = { @@ -6943,8 +6945,8 @@ void proto_register_h248(void) { /* Register protocol */ proto_h248 = proto_register_protocol(PNAME, PSNAME, PFNAME); - register_dissector("h248", dissect_h248, proto_h248); - register_dissector("h248.tpkt", dissect_h248_tpkt, proto_h248); + new_register_dissector("h248", dissect_h248, proto_h248); + new_register_dissector("h248.tpkt", dissect_h248_tpkt, proto_h248); /* Register fields and subtrees */ proto_register_field_array(proto_h248, hf, array_length(hf)); diff --git a/epan/dissectors/packet-lcsap.c b/epan/dissectors/packet-lcsap.c index 570c078316..fefe5e3ef4 100644 --- a/epan/dissectors/packet-lcsap.c +++ b/epan/dissectors/packet-lcsap.c @@ -2231,8 +2231,8 @@ static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, p } -static void -dissect_lcsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_lcsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *lcsap_item = NULL; proto_tree *lcsap_tree = NULL; @@ -2245,6 +2245,7 @@ dissect_lcsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) lcsap_tree = proto_item_add_subtree(lcsap_item, ett_lcsap); dissect_LCS_AP_PDU_PDU(tvb, pinfo, lcsap_tree, NULL); + return tvb_captured_length(tvb); } /*--- proto_reg_handoff_lcsap ---------------------------------------*/ @@ -2301,7 +2302,7 @@ proto_reg_handoff_lcsap(void) /*--- End of included file: packet-lcsap-dis-tab.c ---*/ -#line 248 "../../asn1/lcsap/packet-lcsap-template.c" +#line 249 "../../asn1/lcsap/packet-lcsap-template.c" } else { if (SctpPort != 0) { dissector_delete_uint("sctp.port", SctpPort, lcsap_handle); @@ -2783,7 +2784,7 @@ void proto_register_lcsap(void) { "UnsuccessfulOutcome_value", HFILL }}, /*--- End of included file: packet-lcsap-hfarr.c ---*/ -#line 293 "../../asn1/lcsap/packet-lcsap-template.c" +#line 294 "../../asn1/lcsap/packet-lcsap-template.c" }; /* List of subtrees */ @@ -2839,7 +2840,7 @@ void proto_register_lcsap(void) { &ett_lcsap_UnsuccessfulOutcome, /*--- End of included file: packet-lcsap-ettarr.c ---*/ -#line 299 "../../asn1/lcsap/packet-lcsap-template.c" +#line 300 "../../asn1/lcsap/packet-lcsap-template.c" }; module_t *lcsap_module; @@ -2850,7 +2851,7 @@ void proto_register_lcsap(void) { /* Register fields and subtrees */ proto_register_field_array(proto_lcsap, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); - register_dissector("lcsap", dissect_lcsap, proto_lcsap); + new_register_dissector("lcsap", dissect_lcsap, proto_lcsap); /* Register dissector tables */ lcsap_ies_dissector_table = register_dissector_table("lcsap.ies", "LCS-AP-PROTOCOL-IES", FT_UINT32, BASE_DEC, DISSECTOR_TABLE_ALLOW_DUPLICATE); diff --git a/epan/dissectors/packet-lte-rrc.c b/epan/dissectors/packet-lte-rrc.c index d55284fe63..a35ae45f8f 100644 --- a/epan/dissectors/packet-lte-rrc.c +++ b/epan/dissectors/packet-lte-rrc.c @@ -45265,8 +45265,8 @@ static int dissect_UE_EUTRA_Capability_v9a0_IEs_PDU(tvbuff_t *tvb _U_, packet_in /*--- End of included file: packet-lte-rrc-fn.c ---*/ #line 2670 "../../asn1/lte-rrc/packet-lte-rrc-template.c" -static void -dissect_lte_rrc_DL_CCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_lte_rrc_DL_CCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *ti; proto_tree *lte_rrc_tree; @@ -45277,10 +45277,11 @@ dissect_lte_rrc_DL_CCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA); lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc); dissect_DL_CCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL); + return tvb_captured_length(tvb); } -static void -dissect_lte_rrc_DL_DCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_lte_rrc_DL_DCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *ti; proto_tree *lte_rrc_tree; @@ -45291,11 +45292,12 @@ dissect_lte_rrc_DL_DCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA); lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc); dissect_DL_DCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL); + return tvb_captured_length(tvb); } -static void -dissect_lte_rrc_UL_CCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_lte_rrc_UL_CCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *ti; proto_tree *lte_rrc_tree; @@ -45306,10 +45308,11 @@ dissect_lte_rrc_UL_CCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA); lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc); dissect_UL_CCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL); + return tvb_captured_length(tvb); } -static void -dissect_lte_rrc_UL_DCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_lte_rrc_UL_DCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *ti; proto_tree *lte_rrc_tree; @@ -45320,10 +45323,11 @@ dissect_lte_rrc_UL_DCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA); lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc); dissect_UL_DCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL); + return tvb_captured_length(tvb); } -static void -dissect_lte_rrc_BCCH_BCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_lte_rrc_BCCH_BCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *ti; proto_tree *lte_rrc_tree; @@ -45334,10 +45338,11 @@ dissect_lte_rrc_BCCH_BCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA); lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc); dissect_BCCH_BCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL); + return tvb_captured_length(tvb); } -static void -dissect_lte_rrc_BCCH_DL_SCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_lte_rrc_BCCH_DL_SCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *ti; proto_tree *lte_rrc_tree; @@ -45348,10 +45353,11 @@ dissect_lte_rrc_BCCH_DL_SCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA); lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc); dissect_BCCH_DL_SCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL); + return tvb_captured_length(tvb); } -static void -dissect_lte_rrc_PCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_lte_rrc_PCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *ti; proto_tree *lte_rrc_tree; @@ -45362,10 +45368,11 @@ dissect_lte_rrc_PCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA); lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc); dissect_PCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL); + return tvb_captured_length(tvb); } -static void -dissect_lte_rrc_MCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_lte_rrc_MCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *ti; proto_tree *lte_rrc_tree; @@ -45376,10 +45383,11 @@ dissect_lte_rrc_MCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA); lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc); dissect_MCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL); + return tvb_captured_length(tvb); } -static void -dissect_lte_rrc_Handover_Preparation_Info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_lte_rrc_Handover_Preparation_Info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *ti; proto_tree *lte_rrc_tree; @@ -45397,10 +45405,11 @@ dissect_lte_rrc_Handover_Preparation_Info(tvbuff_t *tvb, packet_info *pinfo, pro dissect_lte_rrc_HandoverPreparationInformation_PDU(tvb, pinfo, lte_rrc_tree, NULL); col_set_writable(pinfo->cinfo, TRUE); + return tvb_captured_length(tvb); } -static void -dissect_lte_rrc_SBCCH_SL_BCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_lte_rrc_SBCCH_SL_BCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *ti; proto_tree *lte_rrc_tree; @@ -45411,6 +45420,7 @@ dissect_lte_rrc_SBCCH_SL_BCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA); lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc); dissect_SBCCH_SL_BCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL); + return tvb_captured_length(tvb); } static void @@ -56908,7 +56918,7 @@ void proto_register_lte_rrc(void) { "BIT_STRING_SIZE_19", HFILL }}, /*--- End of included file: packet-lte-rrc-hfarr.c ---*/ -#line 2846 "../../asn1/lte-rrc/packet-lte-rrc-template.c" +#line 2856 "../../asn1/lte-rrc/packet-lte-rrc-template.c" { &hf_lte_rrc_eutra_cap_feat_group_ind_1, { "Indicator 1", "lte-rrc.eutra_cap_feat_group_ind_1", @@ -59028,7 +59038,7 @@ void proto_register_lte_rrc(void) { &ett_lte_rrc_MasterInformationBlock_SL, /*--- End of included file: packet-lte-rrc-ettarr.c ---*/ -#line 3557 "../../asn1/lte-rrc/packet-lte-rrc-template.c" +#line 3567 "../../asn1/lte-rrc/packet-lte-rrc-template.c" &ett_lte_rrc_featureGroupIndicators, &ett_lte_rrc_featureGroupIndRel9Add, @@ -59072,16 +59082,16 @@ void proto_register_lte_rrc(void) { proto_lte_rrc = proto_register_protocol(PNAME, PSNAME, PFNAME); /* These entry points will first create an lte_rrc root node */ - register_dissector("lte_rrc.dl_ccch", dissect_lte_rrc_DL_CCCH, proto_lte_rrc); - register_dissector("lte_rrc.dl_dcch", dissect_lte_rrc_DL_DCCH, proto_lte_rrc); - register_dissector("lte_rrc.ul_ccch", dissect_lte_rrc_UL_CCCH, proto_lte_rrc); - register_dissector("lte_rrc.ul_dcch", dissect_lte_rrc_UL_DCCH, proto_lte_rrc); - register_dissector("lte_rrc.bcch_bch", dissect_lte_rrc_BCCH_BCH, proto_lte_rrc); - register_dissector("lte_rrc.bcch_dl_sch", dissect_lte_rrc_BCCH_DL_SCH, proto_lte_rrc); - register_dissector("lte_rrc.pcch", dissect_lte_rrc_PCCH, proto_lte_rrc); - register_dissector("lte_rrc.mcch", dissect_lte_rrc_MCCH, proto_lte_rrc); - register_dissector("lte_rrc.handover_prep_info", dissect_lte_rrc_Handover_Preparation_Info, proto_lte_rrc); - register_dissector("lte_rrc.sbcch_sl_bch", dissect_lte_rrc_SBCCH_SL_BCH, proto_lte_rrc); + new_register_dissector("lte_rrc.dl_ccch", dissect_lte_rrc_DL_CCCH, proto_lte_rrc); + new_register_dissector("lte_rrc.dl_dcch", dissect_lte_rrc_DL_DCCH, proto_lte_rrc); + new_register_dissector("lte_rrc.ul_ccch", dissect_lte_rrc_UL_CCCH, proto_lte_rrc); + new_register_dissector("lte_rrc.ul_dcch", dissect_lte_rrc_UL_DCCH, proto_lte_rrc); + new_register_dissector("lte_rrc.bcch_bch", dissect_lte_rrc_BCCH_BCH, proto_lte_rrc); + new_register_dissector("lte_rrc.bcch_dl_sch", dissect_lte_rrc_BCCH_DL_SCH, proto_lte_rrc); + new_register_dissector("lte_rrc.pcch", dissect_lte_rrc_PCCH, proto_lte_rrc); + new_register_dissector("lte_rrc.mcch", dissect_lte_rrc_MCCH, proto_lte_rrc); + new_register_dissector("lte_rrc.handover_prep_info", dissect_lte_rrc_Handover_Preparation_Info, proto_lte_rrc); + new_register_dissector("lte_rrc.sbcch_sl_bch", dissect_lte_rrc_SBCCH_SL_BCH, proto_lte_rrc); /* Register fields and subtrees */ proto_register_field_array(proto_lte_rrc, hf, array_length(hf)); @@ -59107,7 +59117,7 @@ void proto_register_lte_rrc(void) { /*--- End of included file: packet-lte-rrc-dis-reg.c ---*/ -#line 3619 "../../asn1/lte-rrc/packet-lte-rrc-template.c" +#line 3629 "../../asn1/lte-rrc/packet-lte-rrc-template.c" register_init_routine(<e_rrc_init_protocol); register_cleanup_routine(<e_rrc_cleanup_protocol); diff --git a/epan/dissectors/packet-mms.c b/epan/dissectors/packet-mms.c index 7dce5636ef..438d29d4e4 100644 --- a/epan/dissectors/packet-mms.c +++ b/epan/dissectors/packet-mms.c @@ -7052,8 +7052,8 @@ dissect_mms_MMSpdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, /* * Dissect MMS PDUs inside a PPDU. */ -static void -dissect_mms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) +static int +dissect_mms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_) { int offset = 0; int old_offset; @@ -7067,7 +7067,7 @@ dissect_mms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) tree = proto_item_add_subtree(item, ett_mms); } col_set_str(pinfo->cinfo, COL_PROTOCOL, "MMS"); - col_clear(pinfo->cinfo, COL_INFO); + col_clear(pinfo->cinfo, COL_INFO); while (tvb_reported_length_remaining(tvb, offset) > 0){ old_offset=offset; @@ -7077,6 +7077,7 @@ dissect_mms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) break; } } + return tvb_captured_length(tvb); } @@ -9755,7 +9756,7 @@ void proto_register_mms(void) { NULL, HFILL }}, /*--- End of included file: packet-mms-hfarr.c ---*/ -#line 95 "../../asn1/mms/packet-mms-template.c" +#line 96 "../../asn1/mms/packet-mms-template.c" }; /* List of subtrees */ @@ -9974,7 +9975,7 @@ void proto_register_mms(void) { &ett_mms_FileAttributes, /*--- End of included file: packet-mms-ettarr.c ---*/ -#line 101 "../../asn1/mms/packet-mms-template.c" +#line 102 "../../asn1/mms/packet-mms-template.c" }; static ei_register_info ei[] = { @@ -9987,7 +9988,7 @@ void proto_register_mms(void) { /* Register protocol */ proto_mms = proto_register_protocol(PNAME, PSNAME, PFNAME); - register_dissector("mms", dissect_mms, proto_mms); + new_register_dissector("mms", dissect_mms, proto_mms); /* Register fields and subtrees */ proto_register_field_array(proto_mms, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); @@ -10041,14 +10042,14 @@ dissect_mms_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, voi if (!tvb_bytes_exist(tvb, offset, length)) return FALSE; - dissect_mms(tvb, pinfo, parent_tree); + dissect_mms(tvb, pinfo, parent_tree, data); return TRUE; } /*--- proto_reg_handoff_mms --- */ void proto_reg_handoff_mms(void) { - register_ber_oid_dissector("1.0.9506.2.3", dissect_mms, proto_mms,"MMS"); - register_ber_oid_dissector("1.0.9506.2.1", dissect_mms, proto_mms,"mms-abstract-syntax-version1(1)"); + new_register_ber_oid_dissector("1.0.9506.2.3", dissect_mms, proto_mms,"MMS"); + new_register_ber_oid_dissector("1.0.9506.2.1", dissect_mms, proto_mms,"mms-abstract-syntax-version1(1)"); heur_dissector_add("cotp", dissect_mms_heur, "MMS over COTP", "mms_cotp", proto_mms, HEURISTIC_ENABLE); heur_dissector_add("cotp_is", dissect_mms_heur, "MMS over COTP (inactive subset)", "mms_cotp_is", proto_mms, HEURISTIC_ENABLE); } diff --git a/epan/dissectors/packet-mpeg-pes.c b/epan/dissectors/packet-mpeg-pes.c index 0ef1805ed2..23ab12dc15 100644 --- a/epan/dissectors/packet-mpeg-pes.c +++ b/epan/dissectors/packet-mpeg-pes.c @@ -805,8 +805,8 @@ dissect_mpeg_pes_pack_header(tvbuff_t *tvb, gint offset, return offset; } -static void -dissect_mpeg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); +static int +dissect_mpeg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data); static gboolean dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) @@ -940,7 +940,7 @@ dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data if (tvb_get_ntoh24(es, 0) == PES_PREFIX) dissect_mpeg_pes(es, pinfo, tree, NULL); else if (tvb_get_guint8(es, 0) == 0xff) - dissect_mpeg(es, pinfo, tree); + dissect_mpeg(es, pinfo, tree, data); else proto_tree_add_item(tree, hf_mpeg_pes_data, es, 0, -1, ENC_NA); @@ -962,17 +962,18 @@ dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data static heur_dissector_list_t heur_subdissector_list; -static void -dissect_mpeg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_mpeg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { heur_dtbl_entry_t *hdtbl_entry; if (!dissector_try_heuristic(heur_subdissector_list, tvb, pinfo, tree, &hdtbl_entry, NULL)) { - col_set_str(pinfo->cinfo, COL_PROTOCOL, "MPEG"); - col_clear(pinfo->cinfo, COL_INFO); - if (tree) + col_set_str(pinfo->cinfo, COL_PROTOCOL, "MPEG"); + col_clear(pinfo->cinfo, COL_INFO); + proto_tree_add_item(tree, proto_mpeg, tvb, 0, -1, ENC_NA); } + return tvb_captured_length(tvb); } void @@ -1184,7 +1185,7 @@ proto_register_mpeg_pes(void) "BIT_STRING_SIZE_16", HFILL }}, /*--- End of included file: packet-mpeg-pes-hfarr.c ---*/ -#line 542 "../../asn1/mpeg-pes/packet-mpeg-pes-template.c" +#line 543 "../../asn1/mpeg-pes/packet-mpeg-pes-template.c" { &hf_mpeg_pes_pack_header, { "Pack header", "mpeg-pes.pack", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, @@ -1302,7 +1303,7 @@ proto_register_mpeg_pes(void) &ett_mpeg_pes_Picture, /*--- End of included file: packet-mpeg-pes-ettarr.c ---*/ -#line 649 "../../asn1/mpeg-pes/packet-mpeg-pes-template.c" +#line 650 "../../asn1/mpeg-pes/packet-mpeg-pes-template.c" &ett_mpeg_pes_pack_header, &ett_mpeg_pes_header_data, &ett_mpeg_pes_trick_mode @@ -1310,7 +1311,7 @@ proto_register_mpeg_pes(void) proto_mpeg = proto_register_protocol( "Moving Picture Experts Group", "MPEG", "mpeg"); - register_dissector("mpeg", dissect_mpeg, proto_mpeg); + new_register_dissector("mpeg", dissect_mpeg, proto_mpeg); heur_subdissector_list = register_heur_dissector_list("mpeg"); proto_mpeg_pes = proto_register_protocol( diff --git a/epan/dissectors/packet-p22.c b/epan/dissectors/packet-p22.c index 02a63a0a88..e298cb07cc 100644 --- a/epan/dissectors/packet-p22.c +++ b/epan/dissectors/packet-p22.c @@ -4675,8 +4675,8 @@ static int dissect_ForwardedContentToken_PDU(tvbuff_t *tvb _U_, packet_info *pin /* * Dissect P22 PDUs inside a PPDU. */ -static void -dissect_p22(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) +static int +dissect_p22(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_) { int offset = 0; proto_item *item=NULL; @@ -4693,6 +4693,7 @@ dissect_p22(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) col_set_str(pinfo->cinfo, COL_INFO, "InterPersonal"); dissect_p22_InformationObject(TRUE, tvb, offset, &asn1_ctx , tree, -1); + return tvb_captured_length(tvb); } @@ -6215,7 +6216,7 @@ void proto_register_p22(void) { NULL, HFILL }}, /*--- End of included file: packet-p22-hfarr.c ---*/ -#line 119 "../../asn1/p22/packet-p22-template.c" +#line 120 "../../asn1/p22/packet-p22-template.c" }; /* List of subtrees */ @@ -6351,12 +6352,12 @@ void proto_register_p22(void) { &ett_p22_T_choice, /*--- End of included file: packet-p22-ettarr.c ---*/ -#line 125 "../../asn1/p22/packet-p22-template.c" +#line 126 "../../asn1/p22/packet-p22-template.c" }; /* Register protocol */ proto_p22 = proto_register_protocol(PNAME, PSNAME, PFNAME); - register_dissector("p22", dissect_p22, proto_p22); + new_register_dissector("p22", dissect_p22, proto_p22); /* Register fields and subtrees */ proto_register_field_array(proto_p22, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); @@ -6471,10 +6472,10 @@ void proto_reg_handoff_p22(void) { /*--- End of included file: packet-p22-dis-tab.c ---*/ -#line 141 "../../asn1/p22/packet-p22-template.c" +#line 142 "../../asn1/p22/packet-p22-template.c" - register_ber_oid_dissector("2.6.1.10.0", dissect_p22, proto_p22, "InterPersonal Message (1984)"); - register_ber_oid_dissector("2.6.1.10.1", dissect_p22, proto_p22, "InterPersonal Message (1988)"); + new_register_ber_oid_dissector("2.6.1.10.0", dissect_p22, proto_p22, "InterPersonal Message (1984)"); + new_register_ber_oid_dissector("2.6.1.10.1", dissect_p22, proto_p22, "InterPersonal Message (1988)"); } diff --git a/epan/dissectors/packet-p772.c b/epan/dissectors/packet-p772.c index 35a5cd7800..a30ef711f4 100644 --- a/epan/dissectors/packet-p772.c +++ b/epan/dissectors/packet-p772.c @@ -1296,8 +1296,8 @@ static int dissect_Acp127NotificationType_PDU(tvbuff_t *tvb _U_, packet_info *pi /* * Dissect STANAG 4406 PDUs inside a PPDU. */ -static void -dissect_p772(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) +static int +dissect_p772(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_) { int offset = 0; proto_item *item=NULL; @@ -1314,6 +1314,7 @@ dissect_p772(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) col_set_str(pinfo->cinfo, COL_INFO, "Military"); dissect_p772_InformationObject(TRUE, tvb, offset, &asn1_ctx , tree, -1); + return tvb_captured_length(tvb); } @@ -1641,7 +1642,7 @@ void proto_register_p772(void) { NULL, HFILL }}, /*--- End of included file: packet-p772-hfarr.c ---*/ -#line 91 "../../asn1/p772/packet-p772-template.c" +#line 92 "../../asn1/p772/packet-p772-template.c" }; /* List of subtrees */ @@ -1679,18 +1680,18 @@ void proto_register_p772(void) { &ett_p772_Acp127NotificationType, /*--- End of included file: packet-p772-ettarr.c ---*/ -#line 97 "../../asn1/p772/packet-p772-template.c" +#line 98 "../../asn1/p772/packet-p772-template.c" }; /* Register protocol */ proto_p772 = proto_register_protocol(PNAME, PSNAME, PFNAME); - register_dissector("p772", dissect_p772, proto_p772); + new_register_dissector("p772", dissect_p772, proto_p772); /* Register fields and subtrees */ proto_register_field_array(proto_p772, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); - register_ber_syntax_dissector("STANAG 4406", proto_p772, dissect_p772); + new_register_ber_syntax_dissector("STANAG 4406", proto_p772, dissect_p772); register_ber_oid_syntax(".p772", NULL, "STANAG 4406"); } @@ -1733,7 +1734,7 @@ void proto_reg_handoff_p772(void) { /*--- End of included file: packet-p772-dis-tab.c ---*/ -#line 115 "../../asn1/p772/packet-p772-template.c" +#line 116 "../../asn1/p772/packet-p772-template.c" - register_ber_oid_dissector("1.3.26.0.4406.0.4.1", dissect_p772, proto_p772, "STANAG 4406"); + new_register_ber_oid_dissector("1.3.26.0.4406.0.4.1", dissect_p772, proto_p772, "STANAG 4406"); } diff --git a/epan/dissectors/packet-pcap.c b/epan/dissectors/packet-pcap.c index d0a1b7d198..263c680c46 100644 --- a/epan/dissectors/packet-pcap.c +++ b/epan/dissectors/packet-pcap.c @@ -13550,8 +13550,8 @@ static int dissect_OutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t return (dissector_try_uint(pcap_proc_out_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0; } -static void -dissect_pcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_pcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *pcap_item = NULL; proto_tree *pcap_tree = NULL; @@ -13564,6 +13564,7 @@ dissect_pcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) pcap_tree = proto_item_add_subtree(pcap_item, ett_pcap); dissect_PCAP_PDU_PDU(tvb, pinfo, pcap_tree, NULL); + return tvb_captured_length(tvb); } /*--- proto_reg_handoff_pcap ---------------------------------------*/ @@ -13718,7 +13719,7 @@ proto_reg_handoff_pcap(void) /*--- End of included file: packet-pcap-dis-tab.c ---*/ -#line 155 "../../asn1/pcap/packet-pcap-template.c" +#line 156 "../../asn1/pcap/packet-pcap-template.c" } else { dissector_delete_uint_range("sccp.ssn", ssn_range, pcap_handle); g_free(ssn_range); @@ -18299,7 +18300,7 @@ void proto_register_pcap(void) { NULL, HFILL }}, /*--- End of included file: packet-pcap-hfarr.c ---*/ -#line 171 "../../asn1/pcap/packet-pcap-template.c" +#line 172 "../../asn1/pcap/packet-pcap-template.c" }; /* List of subtrees */ @@ -18703,7 +18704,7 @@ void proto_register_pcap(void) { &ett_pcap_Outcome, /*--- End of included file: packet-pcap-ettarr.c ---*/ -#line 177 "../../asn1/pcap/packet-pcap-template.c" +#line 178 "../../asn1/pcap/packet-pcap-template.c" }; module_t *pcap_module; @@ -18717,7 +18718,7 @@ void proto_register_pcap(void) { pcap_module = prefs_register_protocol(proto_pcap, proto_reg_handoff_pcap); /* Register dissector */ - register_dissector("pcap", dissect_pcap, proto_pcap); + new_register_dissector("pcap", dissect_pcap, proto_pcap); /* Register dissector tables */ pcap_ies_dissector_table = register_dissector_table("pcap.ies", "PCAP-PROTOCOL-IES", FT_UINT32, BASE_DEC, DISSECTOR_TABLE_ALLOW_DUPLICATE); diff --git a/epan/dissectors/packet-rrc.c b/epan/dissectors/packet-rrc.c index 9968564527..5ed37ce7bf 100644 --- a/epan/dissectors/packet-rrc.c +++ b/epan/dissectors/packet-rrc.c @@ -156104,8 +156104,8 @@ static int dissect_MeasurementReport_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _ -static void -dissect_rrc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_rrc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { /* FIX ME Currently don't know the 'starting point' of this protocol * exported DL-DCCH-Message is the entry point. @@ -156151,6 +156151,7 @@ dissect_rrc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ; } } + return tvb_captured_length(tvb); } static void @@ -198026,7 +198027,7 @@ void proto_register_rrc(void) { NULL, HFILL }}, /*--- End of included file: packet-rrc-hfarr.c ---*/ -#line 275 "../../asn1/rrc/packet-rrc-template.c" +#line 276 "../../asn1/rrc/packet-rrc-template.c" { &hf_test, { "RAB Test", "rrc.RAB.test", FT_UINT8, BASE_DEC, NULL, 0, @@ -204722,7 +204723,7 @@ void proto_register_rrc(void) { &ett_rrc_UL_RFC3095_Context, /*--- End of included file: packet-rrc-ettarr.c ---*/ -#line 317 "../../asn1/rrc/packet-rrc-template.c" +#line 318 "../../asn1/rrc/packet-rrc-template.c" &ett_rrc_eutraFeatureGroupIndicators, &ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo, &ett_rrc_ims_info, @@ -204742,7 +204743,7 @@ void proto_register_rrc(void) { expert_rrc = expert_register_protocol(proto_rrc); expert_register_field_array(expert_rrc, ei, array_length(ei)); - register_dissector("rrc", dissect_rrc, proto_rrc); + new_register_dissector("rrc", dissect_rrc, proto_rrc); /*--- Included file: packet-rrc-dis-reg.c ---*/ @@ -204818,7 +204819,7 @@ void proto_register_rrc(void) { /*--- End of included file: packet-rrc-dis-reg.c ---*/ -#line 339 "../../asn1/rrc/packet-rrc-template.c" +#line 340 "../../asn1/rrc/packet-rrc-template.c" diff --git a/epan/dissectors/packet-s1ap.c b/epan/dissectors/packet-s1ap.c index 8f62e95195..ca07b92813 100644 --- a/epan/dissectors/packet-s1ap.c +++ b/epan/dissectors/packet-s1ap.c @@ -10576,8 +10576,8 @@ static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, p } -static void -dissect_s1ap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_s1ap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *s1ap_item = NULL; proto_tree *s1ap_tree = NULL; @@ -10590,6 +10590,7 @@ dissect_s1ap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) s1ap_tree = proto_item_add_subtree(s1ap_item, ett_s1ap); dissect_S1AP_PDU_PDU(tvb, pinfo, s1ap_tree, NULL); + return tvb_captured_length(tvb); } /*--- proto_reg_handoff_s1ap ---------------------------------------*/ @@ -10861,7 +10862,7 @@ proto_reg_handoff_s1ap(void) /*--- End of included file: packet-s1ap-dis-tab.c ---*/ -#line 223 "../../asn1/s1ap/packet-s1ap-template.c" +#line 224 "../../asn1/s1ap/packet-s1ap-template.c" } else { if (SctpPort != 0) { dissector_delete_uint("sctp.port", SctpPort, s1ap_handle); @@ -13086,7 +13087,7 @@ void proto_register_s1ap(void) { NULL, HFILL }}, /*--- End of included file: packet-s1ap-hfarr.c ---*/ -#line 251 "../../asn1/s1ap/packet-s1ap-template.c" +#line 252 "../../asn1/s1ap/packet-s1ap-template.c" }; /* List of subtrees */ @@ -13377,7 +13378,7 @@ void proto_register_s1ap(void) { &ett_s1ap_EHRPDMultiSectorLoadReportingResponseItem, /*--- End of included file: packet-s1ap-ettarr.c ---*/ -#line 265 "../../asn1/s1ap/packet-s1ap-template.c" +#line 266 "../../asn1/s1ap/packet-s1ap-template.c" }; module_t *s1ap_module; @@ -13389,7 +13390,7 @@ void proto_register_s1ap(void) { proto_register_subtree_array(ett, array_length(ett)); /* Register dissector */ - register_dissector("s1ap", dissect_s1ap, proto_s1ap); + new_register_dissector("s1ap", dissect_s1ap, proto_s1ap); /* Register dissector tables */ s1ap_ies_dissector_table = register_dissector_table("s1ap.ies", "S1AP-PROTOCOL-IES", FT_UINT32, BASE_DEC, DISSECTOR_TABLE_ALLOW_DUPLICATE); diff --git a/epan/dissectors/packet-spnego.c b/epan/dissectors/packet-spnego.c index 652610ec5d..a2a95bf667 100644 --- a/epan/dissectors/packet-spnego.c +++ b/epan/dissectors/packet-spnego.c @@ -1838,8 +1838,8 @@ dissect_spnego_wrap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d } -static void -dissect_spnego(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) +static int +dissect_spnego(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_) { proto_item *item; proto_tree *subtree; @@ -1906,7 +1906,7 @@ dissect_spnego(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) * */ dissect_spnego_NegotiationToken(FALSE, tvb, offset, &asn1_ctx, subtree, -1); - + return tvb_captured_length(tvb); } /*--- proto_register_spnego -------------------------------------------*/ @@ -2100,7 +2100,7 @@ void proto_register_spnego(void) { /* Register protocol */ proto_spnego = proto_register_protocol(PNAME, PSNAME, PFNAME); - register_dissector("spnego", dissect_spnego, proto_spnego); + new_register_dissector("spnego", dissect_spnego, proto_spnego); proto_spnego_krb5 = proto_register_protocol("SPNEGO-KRB5", "SPNEGO-KRB5", diff --git a/epan/dissectors/packet-sv.c b/epan/dissectors/packet-sv.c index 276f4d104c..2582bbb82f 100644 --- a/epan/dissectors/packet-sv.c +++ b/epan/dissectors/packet-sv.c @@ -441,8 +441,8 @@ dissect_sv_SampledValues(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse /* * Dissect SV PDUs inside a PPDU. */ -static void -dissect_sv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) +static int +dissect_sv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_) { int offset = 0; int old_offset; @@ -480,8 +480,8 @@ dissect_sv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) } } - if(tree) - tap_queue_packet(sv_tap, pinfo, &sv_data); + tap_queue_packet(sv_tap, pinfo, &sv_data); + return tvb_captured_length(tvb); } @@ -635,7 +635,7 @@ void proto_register_sv(void) { /* Register protocol */ proto_sv = proto_register_protocol(PNAME, PSNAME, PFNAME); - register_dissector("sv", dissect_sv, proto_sv); + new_register_dissector("sv", dissect_sv, proto_sv); /* Register fields and subtrees */ proto_register_field_array(proto_sv, hf, array_length(hf)); diff --git a/epan/dissectors/packet-t38.c b/epan/dissectors/packet-t38.c index 08676f72ef..00008d32f0 100644 --- a/epan/dissectors/packet-t38.c +++ b/epan/dissectors/packet-t38.c @@ -1090,8 +1090,8 @@ init_t38_info_conv(packet_info *pinfo) } /* Entry point for dissection */ -static void -dissect_t38_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_t38_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { guint8 octet1; proto_item *it; @@ -1104,8 +1104,7 @@ dissect_t38_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (dissect_possible_rtpv2_packets_as_rtp){ octet1 = tvb_get_guint8(tvb, offset); if (RTP_VERSION(octet1) == 2){ - call_dissector(rtp_handle,tvb,pinfo,tree); - return; + return call_dissector(rtp_handle,tvb,pinfo,tree); } } @@ -1137,6 +1136,7 @@ dissect_t38_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) "[MALFORMED PACKET or wrong preference settings]"); col_append_str(pinfo->cinfo, COL_INFO, " [Malformed?]"); } + return tvb_captured_length(tvb); } static void @@ -1400,7 +1400,7 @@ proto_register_t38(void) proto_register_subtree_array(ett, array_length(ett)); expert_t38 = expert_register_protocol(proto_t38); expert_register_field_array(expert_t38, ei, array_length(ei)); - register_dissector("t38_udp", dissect_t38_udp, proto_t38); + new_register_dissector("t38_udp", dissect_t38_udp, proto_t38); /* Init reassemble tables for HDLC */ register_init_routine(t38_defragment_init); @@ -1456,7 +1456,7 @@ proto_reg_handoff_t38(void) static guint udp_port; if (!t38_prefs_initialized) { - t38_udp_handle=create_dissector_handle(dissect_t38_udp, proto_t38); + t38_udp_handle=new_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"); diff --git a/epan/dissectors/packet-tcap.c b/epan/dissectors/packet-tcap.c index 854c952782..b4052090ac 100644 --- a/epan/dissectors/packet-tcap.c +++ b/epan/dissectors/packet-tcap.c @@ -240,8 +240,6 @@ static int dissect_tcap_ITU_ComponentPDU(gboolean implicit_tag _U_, tvbuff_t *tv static GHashTable* ansi_sub_dissectors = NULL; static GHashTable* itu_sub_dissectors = NULL; -static void dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree); - extern void add_ansi_tcap_subdissector(guint32 ssn, dissector_handle_t dissector) { g_hash_table_insert(ansi_sub_dissectors,GUINT_TO_POINTER(ssn),dissector); dissector_add_uint("sccp.ssn",ssn,tcap_handle); @@ -1423,7 +1421,7 @@ static int dissect_DialoguePDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, pr /*--- End of included file: packet-tcap-fn.c ---*/ -#line 156 "../../asn1/tcap/packet-tcap-template.c" +#line 154 "../../asn1/tcap/packet-tcap-template.c" /* * DEBUG functions @@ -3237,8 +3235,8 @@ const value_string tcap_component_type_str[] = { { 0, NULL } }; -static void -dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) +static int +dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_) { proto_item *item=NULL; proto_tree *tree=NULL; @@ -3274,12 +3272,10 @@ dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) case 5: case 6: case 22: - call_dissector(ansi_tcap_handle, tvb, pinfo, parent_tree); - return; - break; + return call_dissector(ansi_tcap_handle, tvb, pinfo, parent_tree); default: - return; + return tvb_captured_length(tvb); } } @@ -3328,6 +3324,7 @@ dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) (p_tcap_context->callback)(tvb, pinfo, tcap_stat_tree, p_tcap_context); } } + return tvb_captured_length(tvb); } void @@ -3346,7 +3343,7 @@ proto_reg_handoff_tcap(void) /*--- End of included file: packet-tcap-dis-tab.c ---*/ -#line 2071 "../../asn1/tcap/packet-tcap-template.c" +#line 2068 "../../asn1/tcap/packet-tcap-template.c" } static void init_tcap(void); @@ -3688,7 +3685,7 @@ proto_register_tcap(void) NULL, HFILL }}, /*--- End of included file: packet-tcap-hfarr.c ---*/ -#line 2144 "../../asn1/tcap/packet-tcap-template.c" +#line 2141 "../../asn1/tcap/packet-tcap-template.c" }; /* Setup protocol subtree array */ @@ -3737,7 +3734,7 @@ proto_register_tcap(void) &ett_tcap_Associate_source_diagnostic, /*--- End of included file: packet-tcap-ettarr.c ---*/ -#line 2154 "../../asn1/tcap/packet-tcap-template.c" +#line 2151 "../../asn1/tcap/packet-tcap-template.c" }; /*static enum_val_t tcap_options[] = { @@ -3804,9 +3801,9 @@ proto_register_tcap(void) itu_sub_dissectors = g_hash_table_new(g_direct_hash,g_direct_equal); /* 'globally' register dissector */ - register_dissector("tcap", dissect_tcap, proto_tcap); + new_register_dissector("tcap", dissect_tcap, proto_tcap); - tcap_handle = create_dissector_handle(dissect_tcap, proto_tcap); + tcap_handle = new_create_dissector_handle(dissect_tcap, proto_tcap); register_init_routine(&init_tcap); register_cleanup_routine(&cleanup_tcap); @@ -4061,7 +4058,7 @@ call_tcap_dissector(dissector_handle_t handle, tvbuff_t* tvb, packet_info* pinfo requested_subdissector_handle = handle; TRY { - dissect_tcap(tvb, pinfo, tree); + dissect_tcap(tvb, pinfo, tree, NULL); } CATCH_ALL { requested_subdissector_handle = NULL; RETHROW; diff --git a/epan/dissectors/packet-tetra.c b/epan/dissectors/packet-tetra.c index 03c82f62ec..e43689e9a7 100644 --- a/epan/dissectors/packet-tetra.c +++ b/epan/dissectors/packet-tetra.c @@ -58,7 +58,6 @@ static int proto_tetra = -1; static dissector_handle_t data_handle = NULL; static dissector_handle_t tetra_handle; -static void dissect_tetra(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); static int global_tetra_port = 7074; @@ -684,7 +683,7 @@ static int hf_tetra_proprietary_element_owner_extension = -1; /* BIT_STRING */ static int hf_tetra_simplex_duplex_selection_06 = -1; /* T_simplex_duplex_selection_05 */ /*--- End of included file: packet-tetra-hf.c ---*/ -#line 83 "../../asn1/tetra/packet-tetra-template.c" +#line 82 "../../asn1/tetra/packet-tetra-template.c" /* Initialize the subtree pointers */ /* These are the ids of the subtrees that we may be creating */ @@ -969,7 +968,7 @@ static gint ett_tetra_Type2 = -1; static gint ett_tetra_Modify_type = -1; /*--- End of included file: packet-tetra-ett.c ---*/ -#line 93 "../../asn1/tetra/packet-tetra-template.c" +#line 92 "../../asn1/tetra/packet-tetra-template.c" static expert_field ei_tetra_channels_incorrect = EI_INIT; @@ -8815,7 +8814,7 @@ static int dissect_MAC_ACCESS_DEFINE_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _ /*--- End of included file: packet-tetra-fn.c ---*/ -#line 97 "../../asn1/tetra/packet-tetra-template.c" +#line 96 "../../asn1/tetra/packet-tetra-template.c" static const value_string channeltypenames[] = { { 0, "Reserved" }, @@ -9152,10 +9151,9 @@ static void dissect_tetra_UNITDATA_REQ(tvbuff_t *tvb, packet_info *pinfo, proto_ } } -static void -dissect_tetra(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_tetra(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { - proto_item *tetra_item = NULL; proto_item *tetra_sub_item = NULL; proto_tree *tetra_tree = NULL; @@ -9268,6 +9266,7 @@ dissect_tetra(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; } } + return tvb_captured_length(tvb); } void proto_reg_handoff_tetra(void) @@ -9276,7 +9275,7 @@ void proto_reg_handoff_tetra(void) if (!initialized) { data_handle = find_dissector("data"); - tetra_handle = create_dissector_handle(dissect_tetra, proto_tetra); + tetra_handle = new_create_dissector_handle(dissect_tetra, proto_tetra); dissector_add_uint("udp.port", global_tetra_port, tetra_handle); } @@ -11718,7 +11717,7 @@ void proto_register_tetra (void) "T_simplex_duplex_selection_05", HFILL }}, /*--- End of included file: packet-tetra-hfarr.c ---*/ -#line 627 "../../asn1/tetra/packet-tetra-template.c" +#line 626 "../../asn1/tetra/packet-tetra-template.c" }; /* List of subtrees */ @@ -12003,7 +12002,7 @@ void proto_register_tetra (void) &ett_tetra_Modify_type, /*--- End of included file: packet-tetra-ettarr.c ---*/ -#line 637 "../../asn1/tetra/packet-tetra-template.c" +#line 636 "../../asn1/tetra/packet-tetra-template.c" }; static ei_register_info ei[] = { @@ -12013,7 +12012,7 @@ void proto_register_tetra (void) proto_tetra = proto_register_protocol("TETRA Protocol", "tetra", "tetra"); proto_register_field_array (proto_tetra, hf, array_length (hf)); proto_register_subtree_array (ett, array_length (ett)); - register_dissector("tetra", dissect_tetra, proto_tetra); + new_register_dissector("tetra", dissect_tetra, proto_tetra); expert_tetra = expert_register_protocol(proto_tetra); expert_register_field_array(expert_tetra, ei, array_length(ei)); |