register_dissector -> new_register_dissector

Picking off "easy" dissectors that only have one or two exit points at most.
This concludes a "first pass" over the dissector directory.

Change-Id: If5ce5484214be50fe541cba478da1de62e354297
Reviewed-on: https://code.wireshark.org/review/11830
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Michael Mann 2015-11-14 09:23:33 -05:00
parent 13101020e1
commit 28ea58251c
70 changed files with 593 additions and 556 deletions

View File

@ -127,8 +127,8 @@ capture_pktap(const guchar *pd, int len, packet_counts *ld)
ld->other++;
}
static void
dissect_pktap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_pktap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_tree *pktap_tree = NULL;
proto_item *ti = NULL;
@ -151,7 +151,7 @@ dissect_pktap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (pkt_len < MIN_PKTAP_HDR_LEN) {
proto_tree_add_expert(tree, pinfo, &ei_pktap_hdrlen_too_short,
tvb, offset, 4);
return;
return tvb_captured_length(tvb);
}
offset += 4;
@ -205,6 +205,7 @@ dissect_pktap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dissector_try_uint(wtap_encap_dissector_table,
wtap_pcap_encap_to_wtap_encap(dlt), next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
void
@ -277,7 +278,7 @@ proto_register_pktap(void)
expert_pktap = expert_register_protocol(proto_pktap);
expert_register_field_array(expert_pktap, ei, array_length(ei));
pktap_handle = register_dissector("pktap", dissect_pktap, proto_pktap);
pktap_handle = new_register_dissector("pktap", dissect_pktap, proto_pktap);
}
void

View File

@ -142,8 +142,8 @@ static int dissect_ppcap_payload_data(tvbuff_t *, packet_info *, proto_tree *, i
/*Dissecting the function PPCAP */
static void
dissect_ppcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_ppcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *ti;
proto_tree *ppcap_tree, *ppcap_tree1;
@ -195,6 +195,7 @@ dissect_ppcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
}
}
return tvb_captured_length(tvb);
}
@ -657,7 +658,7 @@ module_t *ppcap_module;
proto_ppcap = proto_register_protocol("Proprietary PCAP", "PPCAP", "ppcap");
proto_register_field_array(proto_ppcap , hf , array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("ppcap", dissect_ppcap, proto_ppcap);
new_register_dissector("ppcap", dissect_ppcap, proto_ppcap);
ppcap_module = prefs_register_protocol(proto_ppcap, proto_reg_handoff_ppcap);
prefs_register_enum_preference(ppcap_module,"rev_doc","PPCAP, Select the document","Select Document",&global_ppcap_rev_doc,rev_doc,TRUE);

View File

@ -1605,7 +1605,7 @@ static const ip_tcp_opt bap_opts[] = {
#define N_BAP_OPTS (sizeof bap_opts / sizeof bap_opts[0])
static void dissect_ppp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
static int dissect_ppp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data);
static const value_string pap_vals[] = {
{CONFREQ, "Authenticate-Request"},
@ -3983,11 +3983,12 @@ dissect_ppp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
}
}
static void
dissect_lcp_options(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_lcp_options(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
dissect_ip_tcp_options(tvb, 0, tvb_reported_length(tvb), lcp_opts,
N_LCP_OPTS, -1, &PPP_OPT_TYPES, &ei_ppp_opt_len_invalid, pinfo, tree, NULL, NULL);
return tvb_captured_length(tvb);
}
/*
@ -4768,25 +4769,24 @@ dissect_mp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
hdrlen = mp_short_seqno ? 2 : 4;
if (tvb_reported_length_remaining(tvb, hdrlen) > 0) {
next_tvb = tvb_new_subset_remaining(tvb, hdrlen);
dissect_ppp(next_tvb, pinfo, tree);
dissect_ppp(next_tvb, pinfo, tree, NULL);
}
}
/*
* Handles PPP without HDLC framing, just a protocol field (RFC 1661).
*/
static void
dissect_ppp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_ppp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *ti = NULL;
proto_tree *fh_tree = NULL;
proto_item *ti;
proto_tree *fh_tree;
if (tree) {
ti = proto_tree_add_item(tree, proto_ppp, tvb, 0, -1, ENC_NA);
fh_tree = proto_item_add_subtree(ti, ett_ppp);
}
ti = proto_tree_add_item(tree, proto_ppp, tvb, 0, -1, ENC_NA);
fh_tree = proto_item_add_subtree(ti, ett_ppp);
dissect_ppp_common(tvb, pinfo, tree, fh_tree, ti, 0);
return tvb_captured_length(tvb);
}
static void
@ -4829,16 +4829,15 @@ dissect_ppp_hdlc_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* Handles link-layer encapsulations where the frame might be
* a PPP in HDLC-like Framing frame (RFC 1662) or a Cisco HDLC frame.
*/
static void
dissect_ppp_hdlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_ppp_hdlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint8 byte0;
byte0 = tvb_get_guint8(tvb, 0);
if (byte0 == CHDLC_ADDR_UNICAST || byte0 == CHDLC_ADDR_MULTICAST) {
/* Cisco HDLC encapsulation */
call_dissector(chdlc_handle, tvb, pinfo, tree);
return;
return call_dissector(chdlc_handle, tvb, pinfo, tree);
}
/*
@ -4865,6 +4864,7 @@ dissect_ppp_hdlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
dissect_ppp_hdlc_common(tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
static tvbuff_t*
@ -5073,7 +5073,7 @@ dissect_ppp_usb( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
next_tvb = tvb_new_subset_remaining(tvb, 2);
else
next_tvb = tvb_new_subset_remaining(tvb, 3);
dissect_ppp(next_tvb, pinfo, tree);
dissect_ppp(next_tvb, pinfo, tree, data);
} else if (tvb_get_guint8(tvb, 0) == 0x7e) {
/* Well, let's guess that since the 1st byte is 0x7e that it really is
* a PPP frame, and the address and control bytes are compressed (NULL)
@ -5419,9 +5419,9 @@ proto_register_ppp(void)
ppp_subdissector_table = register_dissector_table("ppp.protocol",
"PPP protocol", FT_UINT16, BASE_HEX, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE);
register_dissector("ppp_hdlc", dissect_ppp_hdlc, proto_ppp);
register_dissector("ppp_lcp_options", dissect_lcp_options, proto_ppp);
register_dissector("ppp", dissect_ppp, proto_ppp);
new_register_dissector("ppp_hdlc", dissect_ppp_hdlc, proto_ppp);
new_register_dissector("ppp_lcp_options", dissect_lcp_options, proto_ppp);
new_register_dissector("ppp", dissect_ppp, proto_ppp);
/* Register the preferences for the ppp protocol */
ppp_module = prefs_register_protocol(proto_ppp, NULL);

View File

@ -378,10 +378,10 @@ void dissect_pw_cesopsn_mpls( tvbuff_t * tvb_original, packet_info * pinfo, prot
static
void dissect_pw_cesopsn_udp( tvbuff_t * tvb_original, packet_info * pinfo, proto_tree * tree)
int dissect_pw_cesopsn_udp( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
dissect_pw_cesopsn(tvb_original,pinfo,tree,PWC_DEMUX_UDP);
return;
dissect_pw_cesopsn(tvb,pinfo,tree,PWC_DEMUX_UDP);
return tvb_captured_length(tvb);
}
@ -444,8 +444,7 @@ void proto_register_pw_cesopsn(void)
proto_register_subtree_array(ett_array, array_length(ett_array));
expert_pwcesopsn = expert_register_protocol(proto);
expert_register_field_array(expert_pwcesopsn, ei, array_length(ei));
register_dissector("pw_cesopsn_udp", dissect_pw_cesopsn_udp, proto);
return;
new_register_dissector("pw_cesopsn_udp", dissect_pw_cesopsn_udp, proto);
}

View File

@ -90,25 +90,21 @@ static int hf_padding_len = -1;
static dissector_handle_t dh_data;
static
void dissect_pw_padding(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
int dissect_pw_padding(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
/* do not touch columns */
if (tree)
{
gint size;
proto_item* item;
size = tvb_reported_length_remaining(tvb, 0);
item = proto_tree_add_item(tree, proto_pw_padding, tvb, 0, -1, ENC_NA);
pwc_item_append_text_n_items(item,size,"byte");
{
proto_tree* tree_p;
tree_p = proto_item_add_subtree(item, ett);
call_dissector(dh_data, tvb, pinfo, tree_p);
item = proto_tree_add_int(tree_p, hf_padding_len, tvb, 0, 0, size);
PROTO_ITEM_SET_HIDDEN(item); /*allow filtering*/
}
}
return;
gint size;
proto_item* item;
proto_tree* tree_p;
size = tvb_reported_length_remaining(tvb, 0);
item = proto_tree_add_item(tree, proto_pw_padding, tvb, 0, -1, ENC_NA);
pwc_item_append_text_n_items(item,size,"byte");
tree_p = proto_item_add_subtree(item, ett);
call_dissector(dh_data, tvb, pinfo, tree_p);
item = proto_tree_add_int(tree_p, hf_padding_len, tvb, 0, 0, size);
PROTO_ITEM_SET_HIDDEN(item); /*allow filtering*/
return tvb_captured_length(tvb);
}
void proto_register_pw_padding(void)
@ -124,15 +120,13 @@ void proto_register_pw_padding(void)
proto_pw_padding = proto_register_protocol("Pseudowire Padding","PW Padding","pw.padding");
proto_register_field_array(proto_pw_padding, hfpadding, array_length(hfpadding));
proto_register_subtree_array(ett_array, array_length(ett_array));
register_dissector("pw_padding", dissect_pw_padding, proto_pw_padding);
return;
new_register_dissector("pw_padding", dissect_pw_padding, proto_pw_padding);
}
void proto_reg_handoff_pw_padding(void)
{
dh_data = find_dissector("data");
return;
}
/*

View File

@ -130,8 +130,8 @@ looks_like_plain_eth(tvbuff_t *tvb _U_)
return FALSE;
}
static void
dissect_pw_eth_heuristic(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_pw_eth_heuristic(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint8 first_nibble = (tvb_get_guint8(tvb, 0) >> 4) & 0x0F;
@ -141,6 +141,7 @@ dissect_pw_eth_heuristic(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
call_dissector(pw_eth_handle_cw, tvb, pinfo, tree);
else
call_dissector(pw_eth_handle_nocw, tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
void
@ -191,7 +192,7 @@ proto_register_pw_eth(void)
"pwethheuristic");
proto_register_field_array(proto_pw_eth_cw, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("pw_eth_heuristic", dissect_pw_eth_heuristic,
new_register_dissector("pw_eth_heuristic", dissect_pw_eth_heuristic,
proto_pw_eth_heuristic);
}

View File

@ -391,10 +391,10 @@ void dissect_pw_satop_mpls( tvbuff_t * tvb_original, packet_info * pinfo, proto_
static
void dissect_pw_satop_udp( tvbuff_t * tvb_original, packet_info * pinfo, proto_tree * tree)
int dissect_pw_satop_udp( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
dissect_pw_satop(tvb_original,pinfo,tree,PWC_DEMUX_UDP);
return;
dissect_pw_satop(tvb,pinfo,tree,PWC_DEMUX_UDP);
return tvb_captured_length(tvb);
}
@ -460,7 +460,7 @@ void proto_register_pw_satop(void)
proto_register_subtree_array(ett_array, array_length(ett_array));
expert_pwsatop = expert_register_protocol(proto);
expert_register_field_array(expert_pwsatop, ei, array_length(ei));
register_dissector("pw_satop_udp", dissect_pw_satop_udp, proto);
new_register_dissector("pw_satop_udp", dissect_pw_satop_udp, proto);
return;
}

View File

@ -1866,8 +1866,8 @@ dissect_q2931_ie(tvbuff_t *tvb, packet_info* pinfo, int offset, int len, proto_t
}
}
static void
dissect_q2931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_q2931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
int offset = 0;
proto_tree *q2931_tree = NULL;
@ -1952,7 +1952,7 @@ dissect_q2931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dissect_q2931_ie(tvb, pinfo, offset, info_element_len,
q2931_tree, info_element, info_element_ext);
}
#if 0 /* XXX: Is codeset & etc supoosed to be used somehow ? */
#if 0 /* XXX: Is codeset & etc supposed to be used somehow ? */
if (non_locking_shift)
codeset = 0;
/*
@ -1977,6 +1977,7 @@ dissect_q2931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
#endif
offset += 1 + 1 + 2 + info_element_len;
}
return tvb_captured_length(tvb);
}
void
@ -2561,7 +2562,7 @@ proto_register_q2931(void)
expert_q2931 = expert_register_protocol(proto_q2931);
expert_register_field_array(expert_q2931, ei, array_length(ei));
register_dissector("q2931", dissect_q2931, proto_q2931);
new_register_dissector("q2931", dissect_q2931, proto_q2931);
}
/*

View File

@ -3146,10 +3146,11 @@ dissect_q931_tpkt_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
return TRUE;
}
static void
dissect_q931_tpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_q931_tpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
dissect_q931_tpkt_heur(tvb, pinfo, tree, NULL);
return tvb_captured_length(tvb);
}
static void
@ -3158,28 +3159,32 @@ dissect_q931_tpkt_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dissect_q931_pdu(tvb, pinfo, tree, TRUE);
}
static void
dissect_q931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_q931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
dissect_q931_pdu(tvb, pinfo, tree, FALSE);
return tvb_captured_length(tvb);
}
static void
dissect_q931_over_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_q931_over_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
dissect_q931_pdu(tvb, pinfo, tree, TRUE);
return tvb_captured_length(tvb);
}
static void
dissect_q931_ie_cs0(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_q931_ie_cs0(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
dissect_q931_IEs(tvb, pinfo, NULL, tree, FALSE, 0, 0);
return tvb_captured_length(tvb);
}
static void
dissect_q931_ie_cs7(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_q931_ie_cs7(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
dissect_q931_IEs(tvb, pinfo, NULL, tree, FALSE, 0, 7);
return tvb_captured_length(tvb);
}
static void
@ -3960,13 +3965,13 @@ proto_register_q931(void)
register_init_routine(q931_init);
register_cleanup_routine(q931_cleanup);
q931_handle = register_dissector("q931", dissect_q931, proto_q931);
q931_tpkt_handle = register_dissector("q931.tpkt", dissect_q931_tpkt, proto_q931);
q931_handle = new_register_dissector("q931", dissect_q931, proto_q931);
q931_tpkt_handle = new_register_dissector("q931.tpkt", dissect_q931_tpkt, proto_q931);
q931_tpkt_pdu_handle = create_dissector_handle(dissect_q931_tpkt_pdu,
proto_q931);
q931_over_ip_handle = register_dissector("q931.over_ip", dissect_q931_over_ip, proto_q931);
register_dissector("q931.ie", dissect_q931_ie_cs0, proto_q931);
register_dissector("q931.ie.cs7", dissect_q931_ie_cs7, proto_q931);
q931_over_ip_handle = new_register_dissector("q931.over_ip", dissect_q931_over_ip, proto_q931);
new_register_dissector("q931.ie", dissect_q931_ie_cs0, proto_q931);
new_register_dissector("q931.ie.cs7", dissect_q931_ie_cs7, proto_q931);
/* subdissector code */
codeset_dissector_table = register_dissector_table("q931.codeset", "Q.931 Codeset", FT_UINT8, BASE_HEX, DISSECTOR_TABLE_ALLOW_DUPLICATE);

View File

@ -801,9 +801,9 @@ dissect_q932_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
}
/*--- dissect_q932_apdu -----------------------------------------------------*/
static void
dissect_q932_apdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
call_dissector(q932_ros_handle, tvb, pinfo, tree);
static int
dissect_q932_apdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) {
return call_dissector(q932_ros_handle, tvb, pinfo, tree);
}
/*--- proto_register_q932 ---------------------------------------------------*/
@ -1025,7 +1025,7 @@ void proto_register_q932(void) {
/* Register protocol and dissector */
proto_q932 = proto_register_protocol(PNAME, PSNAME, PFNAME);
register_dissector("q932.apdu", dissect_q932_apdu, proto_q932);
new_register_dissector("q932.apdu", dissect_q932_apdu, proto_q932);
/* Register fields and subtrees */
proto_register_field_array(proto_q932, hf, array_length(hf));

View File

@ -1787,8 +1787,8 @@ static const value_string q933_codeset_vals[] = {
{ 0x00, NULL },
};
static void
dissect_q933(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_q933(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
int offset = 0;
proto_tree *q933_tree = NULL;
@ -2033,6 +2033,7 @@ dissect_q933(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 1 + 1 + info_element_len;
codeset = locked_codeset;
}
return tvb_captured_length(tvb);
}
void
@ -2232,7 +2233,7 @@ proto_register_q933(void)
expert_q933 = expert_register_protocol(proto_q933);
expert_register_field_array(expert_q933, ei, array_length(ei));
register_dissector("q933", dissect_q933, proto_q933);
new_register_dissector("q933", dissect_q933, proto_q933);
}
void

View File

@ -473,8 +473,8 @@ init_raknet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint *offset)
* RakNet is just a dissector. It is invoked by protocols whose applications
* are built using the RakNet libs.
*/
static void
dissect_raknet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_raknet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint8 packet_id;
@ -488,6 +488,7 @@ dissect_raknet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_expert(tree, pinfo, &ei_raknet_uknown_id, tvb,
0, 1);
}
return tvb_captured_length(tvb);
}
void
@ -648,7 +649,7 @@ proto_register_raknet(void)
/*
* Raknet subdissector for use by external protocols.
*/
register_dissector("raknet", dissect_raknet, proto_raknet);
new_register_dissector("raknet", dissect_raknet, proto_raknet);
}
void

View File

@ -2040,8 +2040,8 @@ dissect_rdm_mdb(tvbuff_t *tvb, guint offset, proto_tree *tree)
return offset;
}
static void
dissect_rdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_rdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RDM");
col_clear(pinfo->cinfo, COL_INFO);
@ -2127,6 +2127,7 @@ dissect_rdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(rdm_tree, hf_rdm_trailer, tvb,
offset, -1, ENC_NA);
}
return tvb_captured_length(tvb);
}
void
@ -2778,7 +2779,7 @@ proto_register_rdm(void)
"RDM", "rdm");
proto_register_field_array(proto_rdm, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("rdm", dissect_rdm, proto_rdm);
new_register_dissector("rdm", dissect_rdm, proto_rdm);
}
/*

View File

@ -53,30 +53,27 @@ static int hf_retix_bpdu_forward_delay = -1;
* There are several fields I've not dissected as I'm not exactly sure what they are
* What ever happened to Retix anyway?
*/
static void
dissect_retix_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_retix_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_tree *retix_bpdu_tree;
proto_tree *ti;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "R-STP");
col_add_fstr(pinfo->cinfo, COL_INFO, "Bridge MAC %s", tvb_ether_to_str(tvb, 10));
retix_bpdu_tree = NULL;
if (tree) {
ti = proto_tree_add_item(tree, proto_retix_bpdu, tvb, 0, -1, ENC_NA);
retix_bpdu_tree = proto_item_add_subtree(ti, ett_retix_bpdu);
}
ti = proto_tree_add_item(tree, proto_retix_bpdu, tvb, 0, -1, ENC_NA);
retix_bpdu_tree = proto_item_add_subtree(ti, ett_retix_bpdu);
proto_tree_add_item(retix_bpdu_tree, hf_retix_bpdu_root_mac, tvb, 0, 6, ENC_NA);
proto_tree_add_item(retix_bpdu_tree, hf_retix_bpdu_bridge_mac, tvb, 10, 6, ENC_NA);
col_add_fstr(pinfo->cinfo, COL_INFO, "Bridge MAC %s", tvb_ether_to_str(tvb, 10));
proto_tree_add_item(retix_bpdu_tree, hf_retix_bpdu_max_age, tvb, 20, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(retix_bpdu_tree, hf_retix_bpdu_hello_time, tvb, 22, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(retix_bpdu_tree, hf_retix_bpdu_forward_delay, tvb, 24, 2, ENC_BIG_ENDIAN);
return tvb_captured_length(tvb);
}
@ -112,7 +109,7 @@ proto_register_retix_bpdu(void)
proto_retix_bpdu = proto_register_protocol("Retix Spanning Tree Protocol", "R-STP", "r-stp");
proto_register_field_array(proto_retix_bpdu, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("rbpdu", dissect_retix_bpdu, proto_retix_bpdu);
new_register_dissector("rbpdu", dissect_retix_bpdu, proto_retix_bpdu);
}
/*

View File

@ -75,8 +75,8 @@ static gint ett_rfc2190 = -1;
static dissector_handle_t h263_handle;
static void
dissect_rfc2190( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
static int
dissect_rfc2190( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ )
{
proto_item *ti = NULL;
proto_tree *rfc2190_tree = NULL;
@ -238,6 +238,7 @@ dissect_rfc2190( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
/* The rest of the packet is the H.263 stream */
next_tvb = tvb_new_subset_remaining( tvb, offset);
call_dissector(h263_handle,next_tvb,pinfo,tree);
return tvb_captured_length(tvb);
}
void
@ -521,7 +522,7 @@ proto_register_rfc2190(void)
"RFC2190", "rfc2190");
proto_register_field_array(proto_rfc2190, hf, array_length(hf));
register_dissector("rfc2190", dissect_rfc2190, proto_rfc2190);
new_register_dissector("rfc2190", dissect_rfc2190, proto_rfc2190);
}
/*

View File

@ -219,34 +219,28 @@ static const value_string felica_sys_codes[] = {
static dissector_handle_t data_handle=NULL;
/* Forward-declare the dissector functions */
static void dissect_felica(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
/* Subtree handles: set by register_subtree_array */
static gint ett_felica = -1;
static void dissect_felica(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int dissect_felica(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *item;
proto_tree *felica_tree = NULL;
proto_tree *felica_tree;
guint8 opcode;
guint8 rwe_pos = 0;
tvbuff_t *rwe_resp_data_tvb;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FeliCa");
if (tree) {
/* Start with a top-level item to add everything else to */
item = proto_tree_add_item(tree, proto_felica, tvb, 0, -1, ENC_NA);
felica_tree = proto_item_add_subtree(item, ett_felica);
}
/* Start with a top-level item to add everything else to */
item = proto_tree_add_item(tree, proto_felica, tvb, 0, -1, ENC_NA);
felica_tree = proto_item_add_subtree(item, ett_felica);
opcode = tvb_get_guint8(tvb, 0);
col_set_str(pinfo->cinfo, COL_INFO,
val_to_str_const(opcode, felica_opcodes, "Unknown"));
if (tree) {
proto_tree_add_item(felica_tree, hf_felica_opcode, tvb, 0, 1, ENC_BIG_ENDIAN);
}
proto_tree_add_item(felica_tree, hf_felica_opcode, tvb, 0, 1, ENC_BIG_ENDIAN);
switch (opcode) {
@ -453,6 +447,7 @@ static void dissect_felica(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
default:
break;
}
return tvb_captured_length(tvb);
}
void
@ -551,7 +546,7 @@ proto_register_felica(void)
proto_register_field_array(proto_felica, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("felica", dissect_felica, proto_felica);
new_register_dissector("felica", dissect_felica, proto_felica);
}
/* Handler registration */

View File

@ -71,8 +71,8 @@ static const value_string hf_mifare_commands[] = {
/* Subtree handles: set by register_subtree_array */
static gint ett_mifare = -1;
static void
dissect_mifare(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_mifare(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *item;
proto_tree *mifare_tree;
@ -152,6 +152,7 @@ dissect_mifare(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "Unknown");
break;
}
return tvb_captured_length(tvb);
}
void
@ -190,7 +191,7 @@ proto_register_mifare(void)
proto_register_field_array(proto_mifare, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("mifare", dissect_mifare, proto_mifare);
new_register_dissector("mifare", dissect_mifare, proto_mifare);
}
/*

View File

@ -2800,9 +2800,10 @@ static gboolean dissect_rlc_lte_heur(tvbuff_t *tvb, packet_info *pinfo,
/* Main dissection function. */
/*****************************/
static void dissect_rlc_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int dissect_rlc_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
dissect_rlc_lte_common(tvb, pinfo, tree, FALSE);
return tvb_captured_length(tvb);
}
static void dissect_rlc_lte_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean is_udp_framing)
@ -3517,7 +3518,7 @@ void proto_register_rlc_lte(void)
expert_register_field_array(expert_rlc_lte, ei, array_length(ei));
/* Allow other dissectors to find this one by name. */
register_dissector("rlc-lte", dissect_rlc_lte, proto_rlc_lte);
new_register_dissector("rlc-lte", dissect_rlc_lte, proto_rlc_lte);
/* Register the tap name */
rlc_lte_tap = register_tap("rlc-lte");

View File

@ -97,8 +97,8 @@ const value_string rmp_error_vals[] = {
{ 0x00, NULL }
};
static void
dissect_rmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_rmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_tree *rmp_tree = NULL;
proto_item *ti = NULL;
@ -113,96 +113,95 @@ dissect_rmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_INFO,
val_to_str_const(type, rmp_type_vals, "Unknown Type"));
if (tree) {
ti = proto_tree_add_item(tree, proto_rmp, tvb, 0, -1, ENC_NA);
rmp_tree = proto_item_add_subtree(ti, ett_rmp);
proto_tree_add_uint(rmp_tree, hf_rmp_type, tvb, 0, 1, type);
ti = proto_tree_add_item(tree, proto_rmp, tvb, 0, -1, ENC_NA);
rmp_tree = proto_item_add_subtree(ti, ett_rmp);
proto_tree_add_uint(rmp_tree, hf_rmp_type, tvb, 0, 1, type);
switch (type) {
case RMP_BOOT_REQ:
proto_tree_add_item(rmp_tree,
hf_rmp_retcode, tvb, 1, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_seqnum, tvb, 2, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_sessionid, tvb, 6, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_version, tvb, 8, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_machtype, tvb, 10, 20, ENC_ASCII|ENC_NA);
/* The remaining fields are optional */
if(!tvb_offset_exists(tvb, 30))
return;
len = tvb_get_guint8(tvb, 30);
proto_tree_add_item(rmp_tree,
hf_rmp_filename, tvb, 30, 1, ENC_ASCII|ENC_BIG_ENDIAN);
if(tvb_offset_exists(tvb, len+31))
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, len+31),
pinfo, tree);
break;
switch (type) {
case RMP_BOOT_REQ:
proto_tree_add_item(rmp_tree,
hf_rmp_retcode, tvb, 1, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_seqnum, tvb, 2, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_sessionid, tvb, 6, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_version, tvb, 8, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_machtype, tvb, 10, 20, ENC_ASCII|ENC_NA);
/* The remaining fields are optional */
if(!tvb_offset_exists(tvb, 30))
return 30;
len = tvb_get_guint8(tvb, 30);
proto_tree_add_item(rmp_tree,
hf_rmp_filename, tvb, 30, 1, ENC_ASCII|ENC_BIG_ENDIAN);
if(tvb_offset_exists(tvb, len+31))
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, len+31),
pinfo, tree);
break;
case RMP_BOOT_REPL:
proto_tree_add_item(rmp_tree,
hf_rmp_retcode, tvb, 1, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_seqnum, tvb, 2, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_sessionid, tvb, 6, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_version, tvb, 8, 2, ENC_BIG_ENDIAN);
len = tvb_get_guint8(tvb, 10);
proto_tree_add_item(rmp_tree,
hf_rmp_filename, tvb, 10, 1, ENC_ASCII|ENC_BIG_ENDIAN);
if(tvb_offset_exists(tvb, len+11))
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, len+11),
pinfo, tree);
break;
case RMP_BOOT_REPL:
proto_tree_add_item(rmp_tree,
hf_rmp_retcode, tvb, 1, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_seqnum, tvb, 2, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_sessionid, tvb, 6, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_version, tvb, 8, 2, ENC_BIG_ENDIAN);
len = tvb_get_guint8(tvb, 10);
proto_tree_add_item(rmp_tree,
hf_rmp_filename, tvb, 10, 1, ENC_ASCII|ENC_BIG_ENDIAN);
if(tvb_offset_exists(tvb, len+11))
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, len+11),
pinfo, tree);
break;
case RMP_READ_REQ:
proto_tree_add_item(rmp_tree,
hf_rmp_retcode, tvb, 1, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_offset, tvb, 2, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_sessionid, tvb, 6, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_size, tvb, 8, 2, ENC_BIG_ENDIAN);
if(tvb_offset_exists(tvb, 10))
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, 10),
pinfo, tree);
break;
case RMP_READ_REQ:
proto_tree_add_item(rmp_tree,
hf_rmp_retcode, tvb, 1, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_offset, tvb, 2, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_sessionid, tvb, 6, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_size, tvb, 8, 2, ENC_BIG_ENDIAN);
if(tvb_offset_exists(tvb, 10))
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, 10),
pinfo, tree);
break;
case RMP_READ_REPL:
proto_tree_add_item(rmp_tree,
hf_rmp_retcode, tvb, 1, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_offset, tvb, 2, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_sessionid, tvb, 6, 2, ENC_BIG_ENDIAN);
call_dissector(data_handle, tvb_new_subset_remaining(tvb,
8), pinfo, rmp_tree);
break;
case RMP_READ_REPL:
proto_tree_add_item(rmp_tree,
hf_rmp_retcode, tvb, 1, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_offset, tvb, 2, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_sessionid, tvb, 6, 2, ENC_BIG_ENDIAN);
call_dissector(data_handle, tvb_new_subset_remaining(tvb,
8), pinfo, rmp_tree);
break;
case RMP_BOOT_DONE:
proto_tree_add_item(rmp_tree,
hf_rmp_retcode, tvb, 1, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_reserved, tvb, 2, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_sessionid, tvb, 6, 2, ENC_BIG_ENDIAN);
if(tvb_offset_exists(tvb, 8))
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, 6),
pinfo, tree);
break;
default:
call_dissector(data_handle, tvb_new_subset_remaining(tvb,
1), pinfo, tree);
}
case RMP_BOOT_DONE:
proto_tree_add_item(rmp_tree,
hf_rmp_retcode, tvb, 1, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_reserved, tvb, 2, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_sessionid, tvb, 6, 2, ENC_BIG_ENDIAN);
if(tvb_offset_exists(tvb, 8))
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, 6),
pinfo, tree);
break;
default:
call_dissector(data_handle, tvb_new_subset_remaining(tvb,
1), pinfo, tree);
}
return tvb_captured_length(tvb);
}
void
@ -250,7 +249,7 @@ proto_register_rmp(void)
proto_register_field_array(proto_rmp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("rmp", dissect_rmp, proto_rmp);
new_register_dissector("rmp", dissect_rmp, proto_rmp);
}
void

View File

@ -315,7 +315,6 @@ GHashTable *rpc_progs = NULL;
typedef gboolean (*rec_dissector_t)(tvbuff_t *, packet_info *, proto_tree *,
tvbuff_t *, fragment_head *, gboolean, guint32, gboolean);
static void dissect_rpc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
static void show_rpc_fraginfo(tvbuff_t *tvb, tvbuff_t *frag_tvb, proto_tree *tree,
guint32 rpc_rm, fragment_head *ipfd_head, packet_info *pinfo);
static const char *rpc_proc_name_internal(wmem_allocator_t *allocator, guint32 prog,
@ -2973,14 +2972,15 @@ dissect_rpc_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
TRUE);
}
static void
dissect_rpc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_rpc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
if (!dissect_rpc_message(tvb, pinfo, tree, NULL, NULL, FALSE, 0,
TRUE)) {
if (tvb_reported_length(tvb) != 0)
dissect_rpc_continuation(tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@ -4297,7 +4297,7 @@ proto_register_rpc(void)
"Whether the RPC dissector should attempt to locate RPC PDU boundaries when initial fragment alignment is not known. This may cause false positives, or slow operation.",
&rpc_find_fragment_start);
register_dissector("rpc", dissect_rpc, proto_rpc);
new_register_dissector("rpc", dissect_rpc, proto_rpc);
new_register_dissector("rpc-tcp", dissect_rpc_tcp, proto_rpc);
rpc_tap = register_tap("rpc");

View File

@ -259,8 +259,8 @@ dissect_rpl_container(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvb_new_subset_remaining(tvb, offset), pinfo, tree);
}
static void
dissect_rpl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_rpl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint16 rpl_len, rpl_type;
proto_item *ti;
@ -286,6 +286,8 @@ dissect_rpl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, rpl_len), pinfo,
tree);
return tvb_captured_length(tvb);
}
void
@ -400,7 +402,7 @@ proto_register_rpl(void)
"RPL", "rpl");
proto_register_field_array(proto_rpl, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("rpl", dissect_rpl, proto_rpl);
new_register_dissector("rpl", dissect_rpl, proto_rpl);
}
void

View File

@ -702,8 +702,8 @@ static expert_field ei_rtcp_block_length = EI_INIT;
static expert_field ei_srtcp_encrypted_payload = EI_INIT;
/* Main dissection function */
static void dissect_rtcp( tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree );
static int dissect_rtcp( tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data );
/* Displaying set info */
static gboolean global_rtcp_show_setup_info = TRUE;
@ -834,7 +834,7 @@ dissect_rtcp_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
}
/* OK, dissect as RTCP */
dissect_rtcp(tvb, pinfo, tree);
dissect_rtcp(tvb, pinfo, tree, data);
return TRUE;
}
@ -3302,8 +3302,8 @@ rtcp_packet_type_to_tree( int rtcp_packet_type)
return tree;
}
static void
dissect_rtcp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
static int
dissect_rtcp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ )
{
proto_item *ti;
proto_tree *rtcp_tree = NULL;
@ -3595,6 +3595,7 @@ dissect_rtcp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
expert_add_info_format(pinfo, ti, &ei_rtcp_length_check, "Incorrect RTCP packet length information (expected %u bytes, found %d)", total_packet_length, offset);
}
return tvb_captured_length(tvb);
}
void
@ -6506,7 +6507,7 @@ proto_register_rtcp(void)
expert_rtcp = expert_register_protocol(proto_rtcp);
expert_register_field_array(expert_rtcp, ei, array_length(ei));
register_dissector("rtcp", dissect_rtcp, proto_rtcp);
new_register_dissector("rtcp", dissect_rtcp, proto_rtcp);
rtcp_module = prefs_register_protocol(proto_rtcp, NULL);

View File

@ -319,8 +319,8 @@ static gint ett_rtp_events = -1;
static struct _rtp_event_info rtp_event_info;
static void
dissect_rtp_events( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
static int
dissect_rtp_events( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ )
{
proto_item *ti;
proto_tree *rtp_events_tree;
@ -390,6 +390,7 @@ dissect_rtp_events( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
}
tap_queue_packet(rtp_event_tap, pinfo, &rtp_event_info);
return tvb_captured_length(tvb);
}
@ -491,7 +492,7 @@ proto_register_rtp_events(void)
" that specifies Cisco Named Signaling Events", 10,
&cisco_nse_pt_value);
register_dissector("rtpevent", dissect_rtp_events, proto_rtp_events);
new_register_dissector("rtpevent", dissect_rtp_events, proto_rtp_events);
rtp_event_tap = register_tap("rtpevent");
}

View File

@ -6105,8 +6105,8 @@ decode_system_journal( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
* external decoders. Afterwards the journal-section is decoded.
*/
static void
dissect_rtp_midi( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree )
static int
dissect_rtp_midi( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_ )
{
proto_item *ti;
proto_tree *rtp_midi_tree;
@ -6188,8 +6188,7 @@ dissect_rtp_midi( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree )
/* Decode a MIDI-command - if 0 is returned something went wrong */
consumed = decodemidi( tvb, pinfo, rtp_midi_commands_tree, cmd_count, offset, cmd_len, &runningstatus, &rsoffset );
if ( -1 == consumed ) {
THROW( ReportedBoundsError );
return;
return offset;
}
/* seek to next delta-time and set remaining length */
@ -6235,8 +6234,7 @@ dissect_rtp_midi( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree )
consumed = decode_system_journal( tvb, pinfo, rtp_midi_journal_tree, offset );
if ( -1 == consumed ) {
THROW( ReportedBoundsError );
return;
return offset;
}
/* seek to optional channel-journals-section */
@ -6255,8 +6253,7 @@ dissect_rtp_midi( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree )
consumed = decode_channel_journal( tvb, pinfo, rtp_midi_chanjournals_tree, offset );
if ( -1 == consumed ) {
THROW( ReportedBoundsError );
return;
return offset;
}
/* seek to next channel-journal */
@ -6265,6 +6262,7 @@ dissect_rtp_midi( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree )
}
}
}
return tvb_captured_length(tvb);
}
@ -10031,7 +10029,7 @@ proto_register_rtp_midi( void )
rtp_midi_module = prefs_register_protocol ( proto_rtp_midi, proto_reg_handoff_rtp_midi );
prefs_register_uint_preference ( rtp_midi_module, "midi_payload_type_value", "Payload Type for RFC 4695/6295 RTP-MIDI", "This is the value of the Payload Type field that specifies RTP-MIDI", 10, &rtp_midi_payload_type_value );
register_dissector( RTP_MIDI_DISSECTOR_ABBREVIATION, dissect_rtp_midi, proto_rtp_midi );
new_register_dissector( RTP_MIDI_DISSECTOR_ABBREVIATION, dissect_rtp_midi, proto_rtp_midi );
}

View File

@ -1733,8 +1733,8 @@ dissect_rtp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
static void
dissect_rtp_rfc2198(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_rtp_rfc2198(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
gint offset = 0;
int cnt;
@ -1819,6 +1819,7 @@ dissect_rtp_rfc2198(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += hdr_last->len;
hdr_last = hdr_last->next;
}
return tvb_captured_length(tvb);
}
static void
@ -2413,8 +2414,8 @@ dissect_rtp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
return offset;
}
static void
dissect_rtp_hdr_ext_ed137(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
static int
dissect_rtp_hdr_ext_ed137(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ )
{
unsigned int hdr_extension_len;
@ -2500,10 +2501,11 @@ dissect_rtp_hdr_ext_ed137(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
hdrext_offset += 4;
}
}
return tvb_captured_length(tvb);
}
static void
dissect_rtp_hdr_ext_ed137a(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
static int
dissect_rtp_hdr_ext_ed137a(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ )
{
unsigned int hdr_extension_len;
@ -2592,6 +2594,7 @@ dissect_rtp_hdr_ext_ed137a(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
hdrext_offset += 4;
}
}
return tvb_captured_length(tvb);
}
/* calculate the extended sequence number - top 16 bits of the previous sequence number,
@ -3664,7 +3667,7 @@ proto_register_rtp(void)
expert_register_field_array(expert_rtp, ei, array_length(ei));
new_register_dissector("rtp", dissect_rtp, proto_rtp);
register_dissector("rtp.rfc2198", dissect_rtp_rfc2198, proto_rtp);
new_register_dissector("rtp.rfc2198", dissect_rtp_rfc2198, proto_rtp);
rtp_tap = register_tap("rtp");
@ -3679,8 +3682,8 @@ proto_register_rtp(void)
rtp_hdr_ext_rfc5285_dissector_table = register_dissector_table("rtp.ext.rfc5285.id",
"RTP Generic header extension (RFC 5285)", FT_UINT8, BASE_DEC, DISSECTOR_TABLE_ALLOW_DUPLICATE);
register_dissector("rtp.ext.ed137", dissect_rtp_hdr_ext_ed137, proto_rtp);
register_dissector("rtp.ext.ed137a", dissect_rtp_hdr_ext_ed137a, proto_rtp);
new_register_dissector("rtp.ext.ed137", dissect_rtp_hdr_ext_ed137, proto_rtp);
new_register_dissector("rtp.ext.ed137a", dissect_rtp_hdr_ext_ed137a, proto_rtp);
rtp_module = prefs_register_protocol(proto_rtp, proto_reg_handoff_rtp);

View File

@ -1360,8 +1360,8 @@ process_rtsp_reply(tvbuff_t *tvb, int offset, const guchar *data,
(gint) (status - status_start), status_i);
}
static void
dissect_rtsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_rtsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
int offset = 0;
int len;
@ -1381,6 +1381,7 @@ dissect_rtsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
col_set_writable(pinfo->cinfo, FALSE);
}
return tvb_captured_length(tvb);
}
void
@ -1463,7 +1464,7 @@ proto_register_rtsp(void)
expert_register_field_array(expert_rtsp, ei, array_length(ei));
/* Make this dissector findable by name */
register_dissector("rtsp", dissect_rtsp, proto_rtsp);
new_register_dissector("rtsp", dissect_rtsp, proto_rtsp);
/* Register our configuration options, particularly our ports */

View File

@ -3326,8 +3326,8 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
return offset;
}
static void
dissect_sccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_sccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *sccp_item = NULL;
proto_tree *sccp_tree = NULL;
@ -3400,7 +3400,7 @@ dissect_sccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* dissect the message */
dissect_sccp_message(tvb, pinfo, sccp_tree, tree);
return tvb_captured_length(tvb);
}
/*** SccpUsers Table **/
@ -4076,7 +4076,7 @@ proto_register_sccp(void)
proto_sccp = proto_register_protocol("Signalling Connection Control Part",
"SCCP", "sccp");
register_dissector("sccp", dissect_sccp, proto_sccp);
new_register_dissector("sccp", dissect_sccp, proto_sccp);
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_sccp, hf, array_length(hf));

View File

@ -4679,8 +4679,8 @@ dissect_sctp_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolea
proto_tree_move_item(sctp_tree, vt, pi);
}
static void
dissect_sctp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_sctp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint16 source_port, destination_port;
guint number_of_ppid;
@ -4728,6 +4728,8 @@ dissect_sctp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dissect_sctp_packet(tvb, pinfo, tree, FALSE);
if (!pinfo->flags.in_error_pkt && sctp_info.number_of_tvbs > 0)
tap_queue_packet(sctp_tap, pinfo, &sctp_info);
return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
@ -5041,7 +5043,7 @@ proto_register_sctp(void)
sctp_port_dissector_table = register_dissector_table("sctp.port", "SCTP port", FT_UINT16, BASE_DEC, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE);
sctp_ppi_dissector_table = register_dissector_table("sctp.ppi", "SCTP payload protocol identifier", FT_UINT32, BASE_HEX, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE);
register_dissector("sctp", dissect_sctp, proto_sctp);
new_register_dissector("sctp", dissect_sctp, proto_sctp);
sctp_heur_subdissector_list = register_heur_dissector_list("sctp");
register_init_routine(sctp_init);

View File

@ -138,8 +138,8 @@ get_sdh_level(tvbuff_t *tvb, packet_info *pinfo)
}
static void
dissect_sdh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_sdh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
col_set_str(pinfo->cinfo, COL_PROTOCOL, "SDH");
col_clear(pinfo->cinfo,COL_INFO);
@ -195,6 +195,7 @@ dissect_sdh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
auoffset = (((9 + 3*COLUMNS) /*start after H3*/ + au*3 + 9*(au/87) /*add extra SOH rows to offset*/) * level) % (COLUMNS*9*level);
proto_tree_add_item(sdh_tree, hf_sdh_j1, tvb, auoffset, 1, ENC_BIG_ENDIAN);
}
return tvb_captured_length(tvb);
}
void
@ -276,7 +277,7 @@ proto_register_sdh(void)
"Data rate",
&sdh_data_rate, data_rates, ENC_BIG_ENDIAN);
register_dissector("sdh", dissect_sdh, proto_sdh);
new_register_dissector("sdh", dissect_sdh, proto_sdh);
}
void

View File

@ -2252,8 +2252,8 @@ void setup_sdp_transport_resend(int current_frame, int request_frame)
}
}
static void
dissect_sdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_sdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_tree *sdp_tree;
proto_item *ti, *sub_ti;
@ -2643,6 +2643,8 @@ dissect_sdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
/* Report this packet to the tap */
tap_queue_packet(sdp_tap, pinfo, sdp_pi);
return tvb_captured_length(tvb);
}
void
@ -3094,7 +3096,7 @@ proto_register_sdp(void)
* Register the dissector by name, so other dissectors can
* grab it by name rather than just referring to it directly.
*/
register_dissector("sdp", dissect_sdp, proto_sdp);
new_register_dissector("sdp", dissect_sdp, proto_sdp);
/* Register for tapping */
sdp_tap = register_tap("sdp");

View File

@ -1052,8 +1052,8 @@ dissect_spdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
/*
* Dissect SPDUs inside a TSDU.
*/
static void
dissect_ses(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_ses(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
int offset = 0;
guint8 type;
@ -1082,6 +1082,7 @@ dissect_ses(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Dissect the remaining SPDUs. */
while (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_spdu(tvb, offset, pinfo, tree, NON_TOKENS_SPDU, is_clsp);
return tvb_captured_length(tvb);
}
static void ses_reassemble_init (void)
@ -1159,7 +1160,7 @@ dissect_ses_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, voi
}
}
dissect_ses(tvb, pinfo, parent_tree);
dissect_ses(tvb, pinfo, parent_tree, data);
return TRUE;
}
@ -1904,7 +1905,7 @@ proto_register_ses(void)
* (you can't refer to it directly from a plugin dissector
* on Windows without stuffing it into the Big Transfer Vector).
*/
register_dissector("ses", dissect_ses, proto_ses);
new_register_dissector("ses", dissect_ses, proto_ses);
}
void

View File

@ -1481,8 +1481,8 @@ static void get_sgsap_msg_params(guint8 oct, const gchar **msg_str, int *ett_tre
}
static void
dissect_sgsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_sgsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *item;
proto_tree *sgsap_tree;
@ -1515,7 +1515,7 @@ dissect_sgsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_add_fstr(pinfo->cinfo, COL_INFO, "%s", msg_str);
}else{
proto_tree_add_item(tree, hf_sgsap_unknown_msg, tvb, offset, 1, ENC_BIG_ENDIAN);
return;
return tvb_captured_length(tvb);
}
/*
@ -1537,6 +1537,7 @@ dissect_sgsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
(*msg_fcn_p)(tvb, sgsap_tree, pinfo, offset, len - offset);
}
return tvb_captured_length(tvb);
}
@ -1680,7 +1681,7 @@ void proto_register_sgsap(void) {
expert_register_field_array(expert_sgsap, ei, array_length(ei));
/* Register dissector */
register_dissector(PFNAME, dissect_sgsap, proto_sgsap);
new_register_dissector(PFNAME, dissect_sgsap, proto_sgsap);
/* Set default SCTP ports */
range_convert_str(&global_sgsap_port_range, SGSAP_SCTP_PORT_RANGE, MAX_SCTP_PORT);

View File

@ -40,11 +40,10 @@ static int hf_sipfrag_line = -1;
static int ett_sipfrag = -1;
void proto_reg_handoff_sipfrag(void);
static void dissect_sipfrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
/* Main dissection function. */
static void dissect_sipfrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int dissect_sipfrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_tree *sipfrag_tree;
proto_item *ti;
@ -91,6 +90,7 @@ static void dissect_sipfrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Close off summary of sipfrag in info column */
col_append_str(pinfo->cinfo, COL_INFO, (lines > 1) ? "...)" : ")");
return tvb_captured_length(tvb);
}
void proto_register_sipfrag(void)
@ -115,7 +115,7 @@ void proto_register_sipfrag(void)
proto_register_subtree_array(ett, array_length(ett));
/* Allow other dissectors to find this one by name. */
register_dissector("sipfrag", dissect_sipfrag, proto_sipfrag);
new_register_dissector("sipfrag", dissect_sipfrag, proto_sipfrag);
}
void proto_reg_handoff_sipfrag(void)

View File

@ -95,8 +95,8 @@ format_flags_string(guchar value, const gchar *array[])
return wmem_strbuf_get_str(buf);
}
static void
dissect_sita(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_sita(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *ti;
guchar flags, signals, errors1, errors2, proto;
@ -199,6 +199,7 @@ dissect_sita(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_add_fstr(pinfo->cinfo, COL_INFO, "IOP protocol number: %u", pinfo->pseudo_header->sita.sita_proto);
call_dissector(data_handle, tvb, pinfo, tree); /* call the generic (hex display) decoder instead */
}
return tvb_captured_length(tvb);
}
static const true_false_string tfs_sita_flags = { "From Remote", "From Local" };
@ -378,7 +379,7 @@ proto_register_sita(void)
sita_dissector_table = register_dissector_table("sita.proto", "SITA protocol number", FT_UINT8, BASE_HEX, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE);
proto_register_field_array(proto_sita, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("sita", dissect_sita, proto_sita);
new_register_dissector("sita", dissect_sita, proto_sita);
}
void

View File

@ -521,8 +521,8 @@ dissect_smb_server_type_flags(tvbuff_t *tvb, int offset, packet_info *pinfo,
#define HOST_NAME_LEN 16
static void
dissect_mailslot_browse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
static int
dissect_mailslot_browse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_)
{
int offset = 0;
guint8 cmd;
@ -730,6 +730,7 @@ dissect_mailslot_browse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
tvb, offset, namelen, ENC_ASCII|ENC_NA);
break;
}
return tvb_captured_length(tvb);
}
/*
@ -749,13 +750,13 @@ dissect_mailslot_browse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
*
* XXX - what other browser packets go out to that mailslot?
*/
static void
dissect_mailslot_lanman(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
static int
dissect_mailslot_lanman(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_)
{
int offset = 0;
guint8 cmd;
proto_tree *tree = NULL;
proto_item *item = NULL;
proto_tree *tree;
proto_item *item;
guint32 periodicity;
const guint8 *host_name;
guint8 os_major_ver, os_minor_ver;
@ -770,11 +771,8 @@ dissect_mailslot_lanman(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
/* Put in something, and replace it later */
col_add_str(pinfo->cinfo, COL_INFO, val_to_str(cmd, commands, "Unknown command:0x%02x"));
if (parent_tree) {
item = proto_tree_add_item(parent_tree, proto_smb_browse, tvb, offset, -1, ENC_NA);
tree = proto_item_add_subtree(item, ett_browse);
}
item = proto_tree_add_item(parent_tree, proto_smb_browse, tvb, offset, -1, ENC_NA);
tree = proto_item_add_subtree(item, ett_browse);
/* command */
proto_tree_add_uint(tree, hf_command, tvb, offset, 1, cmd);
@ -831,6 +829,7 @@ dissect_mailslot_lanman(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
tvb, offset, namelen, ENC_CP437|ENC_NA);
break;
}
return tvb_captured_length(tvb);
}
void
@ -1108,9 +1107,9 @@ proto_register_smb_browse(void)
proto_register_field_array(proto_smb_browse, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("mailslot_browse", dissect_mailslot_browse,
new_register_dissector("mailslot_browse", dissect_mailslot_browse,
proto_smb_browse);
register_dissector("mailslot_lanman", dissect_mailslot_lanman,
new_register_dissector("mailslot_lanman", dissect_mailslot_lanman,
proto_smb_browse);
}

View File

@ -891,8 +891,8 @@ static int (*dissect_smb_logon_cmds[])(tvbuff_t *tvb, packet_info *pinfo, proto_
};
static void
dissect_smb_logon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_smb_logon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
int offset = 0;
guint8 cmd;
@ -929,6 +929,7 @@ dissect_smb_logon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dissect_smb_unknown(tvb, pinfo, smb_logon_tree,
offset);
}
return tvb_captured_length(tvb);
}
void
@ -1150,7 +1151,7 @@ proto_register_smb_logon( void)
proto_register_field_array(proto_smb_logon, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("smb_netlogon", dissect_smb_logon, proto_smb_logon);
new_register_dissector("smb_netlogon", dissect_smb_logon, proto_smb_logon);
}
/*

View File

@ -17115,8 +17115,8 @@ dissect_smb_flags2(tvbuff_t *tvb, proto_tree *parent_tree, int offset)
#define SMB_FLAGS_DIRN 0x80
static void
dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
static int
dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_)
{
int offset = 0;
proto_item *item;
@ -17665,6 +17665,7 @@ dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
}
}
}
return tvb_captured_length(tvb);
}
static gboolean
@ -17681,7 +17682,7 @@ dissect_smb_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, voi
return FALSE;
}
dissect_smb(tvb, pinfo, parent_tree);
dissect_smb(tvb, pinfo, parent_tree, data);
return TRUE;
}
@ -20535,7 +20536,7 @@ proto_register_smb(void)
/* Register the tap for the "Export Object" function */
smb_eo_tap = register_tap("smb_eo"); /* SMB Export Object tap */
register_dissector("smb", dissect_smb, proto_smb);
new_register_dissector("smb", dissect_smb, proto_smb);
register_srt_table(proto_smb, NULL, 3, smbstat_packet, smbstat_init, NULL);
}

View File

@ -2445,8 +2445,8 @@ dissect_gds(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
* --------------------------------------------------------------------
*/
static void
dissect_sna(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_sna(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint8 fid;
proto_tree *sna_tree = NULL;
@ -2479,10 +2479,11 @@ dissect_sna(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
default:
dissect_fid(tvb, pinfo, sna_tree, tree);
}
return tvb_captured_length(tvb);
}
static void
dissect_sna_xid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_sna_xid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_tree *sna_tree = NULL;
proto_item *sna_ti = NULL;
@ -2502,6 +2503,7 @@ dissect_sna_xid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
sna_tree = proto_item_add_subtree(sna_ti, ett_sna);
}
dissect_xid(tvb, pinfo, sna_tree, tree);
return tvb_captured_length(tvb);
}
static void
@ -3482,11 +3484,11 @@ proto_register_sna(void)
"SNA", "sna");
proto_register_field_array(proto_sna, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("sna", dissect_sna, proto_sna);
new_register_dissector("sna", dissect_sna, proto_sna);
proto_sna_xid = proto_register_protocol(
"Systems Network Architecture XID", "SNA XID", "sna_xid");
register_dissector("sna_xid", dissect_sna_xid, proto_sna_xid);
new_register_dissector("sna_xid", dissect_sna_xid, proto_sna_xid);
sna_address_type = address_type_dissector_register("AT_SNA", "SNA Address", sna_fid_to_str_buf, sna_address_str_len, NULL, NULL, NULL, NULL);

View File

@ -467,8 +467,8 @@ static algo_parameters_t dcomp_algo_pars[] = {
/* Code to actually dissect the packets
*/
static void
dissect_sndcp_xid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
static int
dissect_sndcp_xid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
/* Set up structures needed to add the protocol subtree and manage it
*/
@ -543,6 +543,7 @@ dissect_sndcp_xid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
break; /* error: exit */
}
}
return tvb_captured_length(tvb);
}
@ -863,7 +864,7 @@ proto_register_sndcp_xid(void)
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_sndcp_xid, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("sndcpxid", dissect_sndcp_xid, proto_sndcp_xid);
new_register_dissector("sndcpxid", dissect_sndcp_xid, proto_sndcp_xid);
}
/*

View File

@ -71,7 +71,7 @@ static const value_string ccsrl_ls_vals[] = {
/*****************************************************************************/
static void dissect_ccsrl(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
static int dissect_ccsrl(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *ccsrl_item;
proto_tree *ccsrl_tree=NULL;
@ -92,6 +92,7 @@ static void dissect_ccsrl(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree
*/
next_tvb = tvb_new_subset_remaining(tvb, 1);
call_dissector( h245dg_handle, next_tvb, pinfo, ccsrl_tree );
return tvb_captured_length(tvb);
}
static void dissect_srp_command(tvbuff_t * tvb, packet_info * pinfo, proto_tree * srp_tree)
@ -111,7 +112,7 @@ static void dissect_srp_command(tvbuff_t * tvb, packet_info * pinfo, proto_tree
call_dissector(ccsrl_handle, next_tvb, pinfo, srp_tree );
}
static void dissect_srp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
static int dissect_srp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *srp_item = NULL;
proto_tree *srp_tree = NULL;
@ -167,6 +168,7 @@ static void dissect_srp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
}
}
return tvb_captured_length(tvb);
}
void proto_register_ccsrl (void)
@ -184,7 +186,7 @@ void proto_register_ccsrl (void)
proto_ccsrl = proto_register_protocol ("H.324/CCSRL", "CCSRL", "ccsrl");
proto_register_field_array (proto_ccsrl, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector("ccsrl", dissect_ccsrl, proto_ccsrl);
new_register_dissector("ccsrl", dissect_ccsrl, proto_ccsrl);
}
void proto_register_srp (void)
@ -211,7 +213,7 @@ void proto_register_srp (void)
proto_srp = proto_register_protocol ("H.324/SRP", "SRP", "srp");
proto_register_field_array (proto_srp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector("srp", dissect_srp, proto_srp);
new_register_dissector("srp", dissect_srp, proto_srp);
/* register our init routine to be called at the start of a capture,
to clear out our hash tables etc */

View File

@ -68,8 +68,8 @@ static const value_string sscf_status_vals[] = {
{ 0, NULL }
};
static void
dissect_sscf_nni(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_sscf_nni(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint reported_length;
proto_item *sscf_item = NULL;
@ -102,6 +102,7 @@ dissect_sscf_nni(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
SSCF_SPARE_LENGTH, ENC_BIG_ENDIAN);
}
return tvb_captured_length(tvb);
}
void
@ -123,7 +124,7 @@ proto_register_sscf(void)
proto_register_field_array(proto_sscf, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("sscf-nni", dissect_sscf_nni, proto_sscf);
new_register_dissector("sscf-nni", dissect_sscf_nni, proto_sscf);
}

View File

@ -341,10 +341,11 @@ get_sstp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _
return tvb_get_ntohs(tvb, offset+SSTP_OFFSET_LENGTH);
}
static void
dissect_sstp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_sstp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
tcp_dissect_pdus(tvb, pinfo, tree, TRUE, SSTP_OFFSET_LENGTH+SSTP_FSIZE_LENGTH, get_sstp_pdu_len, dissect_sstp_pdu, NULL);
tcp_dissect_pdus(tvb, pinfo, tree, TRUE, SSTP_OFFSET_LENGTH+SSTP_FSIZE_LENGTH, get_sstp_pdu_len, dissect_sstp_pdu, data);
return tvb_captured_length(tvb);
}
void
@ -505,7 +506,7 @@ proto_register_sstp(void)
proto_sstp = proto_register_protocol("Secure Socket Tunneling Protocol", "SSTP", "sstp");
register_dissector("sstp", dissect_sstp, proto_sstp);
new_register_dissector("sstp", dissect_sstp, proto_sstp);
proto_register_field_array(proto_sstp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}

View File

@ -818,8 +818,8 @@ dissect_platform_location(tvbuff_t *tvb, proto_tree *seg_tree, gint offset)
expert_add_info(pinfo, pi, &ei_bad_length); \
}
static void
dissect_stanag4607(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_stanag4607(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint32 offset = 0;
gint8 first_segment;
@ -833,7 +833,7 @@ dissect_stanag4607(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Basic length check */
if (tvb_captured_length(tvb) < STANAG4607_MIN_LENGTH)
return;
return 0;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "S4607");
/* Clear out stuff in the info column */
@ -926,6 +926,7 @@ dissect_stanag4607(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
}
}
return tvb_captured_length(tvb);
}
void
@ -1633,7 +1634,7 @@ proto_register_stanag4607(void)
expert_4607 = expert_register_protocol(proto_stanag4607);
expert_register_field_array(expert_4607, ei, array_length(ei));
register_dissector("STANAG 4607", dissect_stanag4607, proto_stanag4607);
new_register_dissector("STANAG 4607", dissect_stanag4607, proto_stanag4607);
/* prefs_register_protocol(proto_stanag4607, proto_reg_handoff_stanag4607); */
}
@ -1642,7 +1643,7 @@ proto_reg_handoff_stanag4607(void)
{
static dissector_handle_t stanag4607_handle;
stanag4607_handle = create_dissector_handle(dissect_stanag4607,
stanag4607_handle = new_create_dissector_handle(dissect_stanag4607,
proto_stanag4607);
dissector_add_uint("wtap_encap", WTAP_ENCAP_STANAG_4607, stanag4607_handle);
}

View File

@ -2272,8 +2272,8 @@ dissect_sua_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *sua_t
}
}
static void
dissect_sua(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_sua(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *sua_item;
proto_tree *sua_tree;
@ -2292,19 +2292,13 @@ dissect_sua(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree)
/* Clear entries in Info column on summary display */
col_clear(pinfo->cinfo, COL_INFO);
/* In the interest of speed, if "tree" is NULL, don't do any work not
necessary to generate protocol tree items. */
if (tree) {
/* create the sua protocol tree */
sua_item = proto_tree_add_item(tree, proto_sua, message_tvb, 0, -1, ENC_NA);
sua_tree = proto_item_add_subtree(sua_item, ett_sua);
} else {
sua_tree = NULL;
}
/* create the sua protocol tree */
sua_item = proto_tree_add_item(tree, proto_sua, message_tvb, 0, -1, ENC_NA);
sua_tree = proto_item_add_subtree(sua_item, ett_sua);
/* dissect the message */
dissect_sua_message(message_tvb, pinfo, sua_tree, tree);
return tvb_captured_length(message_tvb);
}
/* Register the protocol with Wireshark */
@ -2460,7 +2454,7 @@ proto_register_sua(void)
/* Register the protocol name and description */
proto_sua = proto_register_protocol("SS7 SCCP-User Adaptation Layer", "SUA", "sua");
register_dissector("sua", dissect_sua, proto_sua);
new_register_dissector("sua", dissect_sua, proto_sua);
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_sua, hf, array_length(hf));

View File

@ -1105,122 +1105,119 @@ dissect_digitech_procedure(guint8 procedure, const gint offset,
}
/* dissector for System Exclusive MIDI data */
static void
dissect_sysex_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
static int
dissect_sysex_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_)
{
guint8 sysex_helper;
gint data_len;
proto_item *item;
proto_item *ti = NULL;
proto_tree *tree = NULL;
gint offset = 0;
guint8 manufacturer_id;
guint32 three_byte_manufacturer_id = 0xFFFFFF;
guint8 procedure_id;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "SYSEX");
col_set_str(pinfo->cinfo, COL_INFO, "MIDI System Exclusive Command");
data_len = tvb_reported_length(tvb);
if (parent_tree)
ti = proto_tree_add_protocol_format(parent_tree, proto_sysex, tvb, 0, -1, "MIDI System Exclusive Command");
tree = proto_item_add_subtree(ti, ett_sysex);
/* Check start byte (System Exclusive - 0xF0) */
sysex_helper = tvb_get_guint8(tvb, 0);
item = proto_tree_add_item(tree, hf_sysex_message_start, tvb, offset, 1, ENC_BIG_ENDIAN);
if (sysex_helper != 0xF0)
{
proto_item *ti = NULL;
proto_tree *tree = NULL;
gint offset = 0;
guint8 manufacturer_id;
guint32 three_byte_manufacturer_id = 0xFFFFFF;
guint8 procedure_id;
ti = proto_tree_add_protocol_format(parent_tree, proto_sysex, tvb, 0, -1, "MIDI System Exclusive Command");
tree = proto_item_add_subtree(ti, ett_sysex);
/* Check start byte (System Exclusive - 0xF0) */
sysex_helper = tvb_get_guint8(tvb, 0);
item = proto_tree_add_item(tree, hf_sysex_message_start, tvb, offset, 1, ENC_BIG_ENDIAN);
if (sysex_helper != 0xF0)
{
expert_add_info(pinfo, item, &ei_sysex_message_start_byte);
}
offset++;
manufacturer_id = tvb_get_guint8(tvb, offset);
/* Three-byte manufacturer ID starts with 00 */
if (manufacturer_id == 0)
{
three_byte_manufacturer_id = tvb_get_ntoh24(tvb, offset);
proto_tree_add_item(tree, hf_sysex_three_byte_manufacturer_id, tvb, offset, 3, ENC_BIG_ENDIAN);
offset += 3;
}
/* One-byte manufacturer ID */
else
{
proto_tree_add_item(tree, hf_sysex_manufacturer_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
}
proto_tree_add_item(tree, hf_sysex_device_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Following data is menufacturer-specific */
switch (three_byte_manufacturer_id)
{
case SYSEX_MANUFACTURER_DOD:
{
guint8 digitech_helper;
const guint8 *data_ptr;
int len;
int i;
digitech_helper = tvb_get_guint8(tvb, offset);
proto_tree_add_item(tree, hf_digitech_family_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
proto_tree_add_item(tree, get_digitech_hf_product_by_family(digitech_helper),
tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
procedure_id = tvb_get_guint8(tvb, offset);
proto_tree_add_item(tree, hf_digitech_procedure_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
dissect_digitech_procedure(procedure_id, offset, tvb, pinfo, tree);
len = tvb_reported_length(tvb) - 2;
offset = len; /* Penultimate byte is checksum */
data_ptr = tvb_get_ptr(tvb, 1, len);
/* Calculate checksum */
for (i = 0, digitech_helper = 0; i < len; ++i)
{
digitech_helper ^= *data_ptr++;
}
item = proto_tree_add_item(tree, hf_digitech_checksum, tvb, offset, 1, ENC_BIG_ENDIAN);
if (digitech_helper == 0)
{
proto_item_append_text(item, " (correct)");
}
else
{
proto_item_append_text(item, " (NOT correct)");
expert_add_info(pinfo, item, &ei_digitech_checksum_bad);
}
offset++;
break;
}
default:
break;
}
if (offset < data_len - 1)
{
proto_tree_add_expert(tree, pinfo, &ei_sysex_undecoded,
tvb, offset, data_len - offset - 1);
}
/* Check end byte (EOX - 0xF7) */
sysex_helper = tvb_get_guint8(tvb, data_len - 1);
item = proto_tree_add_item(tree, hf_sysex_message_eox, tvb, data_len - 1, 1, ENC_BIG_ENDIAN);
if (sysex_helper != 0xF7)
{
expert_add_info(pinfo, item, &ei_sysex_message_end_byte);
}
expert_add_info(pinfo, item, &ei_sysex_message_start_byte);
}
offset++;
manufacturer_id = tvb_get_guint8(tvb, offset);
/* Three-byte manufacturer ID starts with 00 */
if (manufacturer_id == 0)
{
three_byte_manufacturer_id = tvb_get_ntoh24(tvb, offset);
proto_tree_add_item(tree, hf_sysex_three_byte_manufacturer_id, tvb, offset, 3, ENC_BIG_ENDIAN);
offset += 3;
}
/* One-byte manufacturer ID */
else
{
proto_tree_add_item(tree, hf_sysex_manufacturer_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
}
proto_tree_add_item(tree, hf_sysex_device_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Following data is menufacturer-specific */
switch (three_byte_manufacturer_id)
{
case SYSEX_MANUFACTURER_DOD:
{
guint8 digitech_helper;
const guint8 *data_ptr;
int len;
int i;
digitech_helper = tvb_get_guint8(tvb, offset);
proto_tree_add_item(tree, hf_digitech_family_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
proto_tree_add_item(tree, get_digitech_hf_product_by_family(digitech_helper),
tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
procedure_id = tvb_get_guint8(tvb, offset);
proto_tree_add_item(tree, hf_digitech_procedure_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
dissect_digitech_procedure(procedure_id, offset, tvb, pinfo, tree);
len = tvb_reported_length(tvb) - 2;
offset = len; /* Penultimate byte is checksum */
data_ptr = tvb_get_ptr(tvb, 1, len);
/* Calculate checksum */
for (i = 0, digitech_helper = 0; i < len; ++i)
{
digitech_helper ^= *data_ptr++;
}
item = proto_tree_add_item(tree, hf_digitech_checksum, tvb, offset, 1, ENC_BIG_ENDIAN);
if (digitech_helper == 0)
{
proto_item_append_text(item, " (correct)");
}
else
{
proto_item_append_text(item, " (NOT correct)");
expert_add_info(pinfo, item, &ei_digitech_checksum_bad);
}
offset++;
break;
}
default:
break;
}
if (offset < data_len - 1)
{
proto_tree_add_expert(tree, pinfo, &ei_sysex_undecoded,
tvb, offset, data_len - offset - 1);
}
/* Check end byte (EOX - 0xF7) */
sysex_helper = tvb_get_guint8(tvb, data_len - 1);
item = proto_tree_add_item(tree, hf_sysex_message_eox, tvb, data_len - 1, 1, ENC_BIG_ENDIAN);
if (sysex_helper != 0xF7)
{
expert_add_info(pinfo, item, &ei_sysex_message_end_byte);
}
return tvb_captured_length(tvb);
}
void
@ -1415,7 +1412,7 @@ proto_register_sysex(void)
expert_sysex = expert_register_protocol(proto_sysex);
expert_register_field_array(expert_sysex, ei, array_length(ei));
register_dissector("sysex", dissect_sysex_command, proto_sysex);
new_register_dissector("sysex", dissect_sysex_command, proto_sysex);
}
/*

View File

@ -1789,8 +1789,8 @@ static int find_unescaped_iac(tvbuff_t *tvb, int offset, int len)
return iac_offset;
}
static void
dissect_telnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_telnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_tree *telnet_tree, *ti;
tvbuff_t *next_tvb;
@ -1841,7 +1841,7 @@ dissect_telnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (is_tn3270 || is_tn5250) {
pinfo->desegment_offset = offset;
pinfo->desegment_len = DESEGMENT_ONE_MORE_SEGMENT;
return;
return tvb_captured_length(tvb);
}
/*
* We found no IAC byte, so what remains in the buffer
@ -1852,6 +1852,7 @@ dissect_telnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
}
}
return tvb_captured_length(tvb);
}
void
@ -2105,7 +2106,7 @@ proto_register_telnet(void)
expert_telnet = expert_register_protocol(proto_telnet);
expert_register_field_array(expert_telnet, ei, array_length(ei));
telnet_handle = register_dissector("telnet", dissect_telnet, proto_telnet);
telnet_handle = new_register_dissector("telnet", dissect_telnet, proto_telnet);
}
void

View File

@ -434,7 +434,7 @@ void proto_register_thrift(void) {
proto_register_subtree_array(ett, array_length(ett));
/* register dissector */
/*register_dissector("thrift", dissect_thrift, proto_thrift); */
/*new_register_dissector("thrift", dissect_thrift, proto_thrift); */
}
void proto_reg_handoff_thrift(void) {

View File

@ -486,7 +486,7 @@ static void dissect_mapiprops(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
}
static void dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *attr_item, *item;
proto_tree *attr_tree, *tag_tree, *props_tree, *addr_tree, *date_tree;
@ -511,7 +511,7 @@ static void dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
expert_add_info_format(pinfo, item, &ei_tnef_incorrect_signature,
" [Incorrect, should be 0x%x. No further dissection possible. Check any Content-Transfer-Encoding has been removed.]", TNEF_SIGNATURE);
return;
return offset;
} else {
@ -618,6 +618,8 @@ static void dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* there may be some padding */
if(tvb_reported_length_remaining(tvb, offset)) /* XXX: Not sure if they is really padding or not */
proto_tree_add_item(tree, hf_tnef_padding, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_NA);
return tvb_captured_length(tvb);
}
static void dissect_tnef_file(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
@ -628,7 +630,7 @@ static void dissect_tnef_file(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
col_append_str(pinfo->cinfo, COL_INFO, PNAME);
dissect_tnef(tvb, pinfo, tree);
dissect_tnef(tvb, pinfo, tree, NULL);
}
/* Register all the bits needed by the filtering engine */
@ -817,7 +819,7 @@ proto_register_tnef(void)
expert_register_field_array(expert_tnef, ei, array_length(ei));
/* Allow dissector to find be found by name. */
tnef_handle = register_dissector(PFNAME, dissect_tnef, proto_tnef);
tnef_handle = new_register_dissector(PFNAME, dissect_tnef, proto_tnef);
}

View File

@ -556,10 +556,11 @@ dissect_tpkt_encap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
* Dissect RFC 1006 TPKT, which wraps a TPKT header around an OSI TP
* PDU.
*/
static void
dissect_tpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_tpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
dissect_tpkt_encap(tvb, pinfo, tree, tpkt_desegment, osi_tp_handle);
return tvb_captured_length(tvb);
}
/*
@ -638,7 +639,7 @@ proto_register_tpkt(void)
proto_tpkt_ptr = find_protocol_by_id(proto_tpkt);
proto_register_field_array(proto_tpkt, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("tpkt", dissect_tpkt, proto_tpkt);
new_register_dissector("tpkt", dissect_tpkt, proto_tpkt);
tpkt_module = prefs_register_protocol(proto_tpkt, NULL);
prefs_register_bool_preference(tpkt_module, "desegment",

View File

@ -375,8 +375,8 @@ capture_tr(const guchar *pd, int offset, int len, packet_counts *ld) {
}
static void
dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_tree *tr_tree;
proto_item *ti, *hidden_item;
@ -637,6 +637,7 @@ dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
tap_queue_packet(tr_tap, pinfo, trh);
return tvb_captured_length(tvb);
}
/* this routine is taken from the Linux net/802/tr.c code, which shows
@ -798,7 +799,7 @@ proto_register_tr(void)
"Whether Linux mangling of the link-layer header should be checked for and worked around",
&fix_linux_botches);
register_dissector("tr", dissect_tr, proto_tr);
new_register_dissector("tr", dissect_tr, proto_tr);
tr_tap=register_tap("tr");
register_conversation_table(proto_tr, TRUE, tr_conversation_packet, tr_hostlist_packet);

View File

@ -474,8 +474,8 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree)
return sv_length;
}
static void
dissect_trmac(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_trmac(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_tree *mac_tree = NULL;
proto_item *ti;
@ -515,6 +515,7 @@ dissect_trmac(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
}
}
return tvb_captured_length(tvb);
}
void
@ -691,7 +692,7 @@ proto_register_trmac(void)
expert_trmac = expert_register_protocol(proto_trmac);
expert_register_field_array(expert_trmac, ei, array_length(ei));
register_dissector("trmac", dissect_trmac, proto_trmac);
new_register_dissector("trmac", dissect_trmac, proto_trmac);
}
/*

View File

@ -61,8 +61,8 @@ static const value_string pcf_type_str_vals[] =
/* Code to actually dissect the packets */
static void
dissect_tte_pcf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_tte_pcf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
/* Set up structures needed to add the protocol subtree and manage it */
proto_item *tte_pcf_root_item;
@ -75,7 +75,7 @@ dissect_tte_pcf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Check that there's enough data */
if (tvb_reported_length(tvb) < TTE_PCF_LENGTH )
{
return;
return 0;
}
/* get sync_priority and sync_domain */
@ -135,6 +135,7 @@ dissect_tte_pcf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
TTE_PCF_TYPE_LENGTH+TTE_PCF_RES1_LENGTH, TTE_PCF_TC_LENGTH, ENC_BIG_ENDIAN);
}
return tvb_captured_length(tvb);
}
@ -202,7 +203,7 @@ proto_register_tte_pcf(void)
proto_register_field_array(proto_tte_pcf, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("tte_pcf", dissect_tte_pcf, proto_tte_pcf);
new_register_dissector("tte_pcf", dissect_tte_pcf, proto_tte_pcf);
}

View File

@ -99,8 +99,8 @@ static const value_string turbocell_satmode_values[] = {
};
static void
dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *ti, *name_item;
@ -226,6 +226,7 @@ dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
}
}
return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
@ -328,7 +329,7 @@ void proto_register_turbocell(void)
"Turbocell Aggregate Data", "turbocell_aggregate");
proto_register_field_array(proto_aggregate, aggregate_fields, array_length(aggregate_fields));
register_dissector("turbocell", dissect_turbocell, proto_turbocell);
new_register_dissector("turbocell", dissect_turbocell, proto_turbocell);
proto_register_field_array(proto_turbocell, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));

View File

@ -240,14 +240,16 @@ static void _dissect_ua_msg(tvbuff_t *tvb,
}
static void dissect_ua_sys_to_term(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int dissect_ua_sys_to_term(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
_dissect_ua_msg(tvb, pinfo, tree, SYS_TO_TERM);
return tvb_captured_length(tvb);
}
static void dissect_ua_term_to_sys(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int dissect_ua_term_to_sys(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
_dissect_ua_msg(tvb, pinfo, tree, TERM_TO_SYS);
return tvb_captured_length(tvb);
}
@ -267,8 +269,8 @@ void proto_register_ua_msg(void)
/* UA dissector registration */
proto_ua_msg = proto_register_protocol("Universal Alcatel Protocol", "UA", "ua");
register_dissector("ua_sys_to_term", dissect_ua_sys_to_term, proto_ua_msg);
register_dissector("ua_term_to_sys", dissect_ua_term_to_sys, proto_ua_msg);
new_register_dissector("ua_sys_to_term", dissect_ua_sys_to_term, proto_ua_msg);
new_register_dissector("ua_term_to_sys", dissect_ua_term_to_sys, proto_ua_msg);
/* Common subtree array registration */
proto_register_subtree_array(ett, array_length(ett));

View File

@ -329,19 +329,22 @@ static void _dissect_uaudp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
#if 0
/* XXX: The following are never actually used ?? */
static void dissect_uaudp_dir_unknown(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int dissect_uaudp_dir_unknown(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
_dissect_uaudp(tvb, pinfo, tree, DIR_UNKNOWN);
return tvb_captured_length(tvb);
}
static void dissect_uaudp_term_to_serv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static void dissect_uaudp_term_to_serv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
_dissect_uaudp(tvb, pinfo, tree, TERM_TO_SYS);
return tvb_captured_length(tvb);
}
static void dissect_uaudp_serv_to_term(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static void dissect_uaudp_serv_to_term(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
_dissect_uaudp(tvb, pinfo, tree, SYS_TO_TERM);
return tvb_captured_length(tvb);
}
#endif
@ -590,9 +593,9 @@ void proto_register_uaudp(void)
uaudp_handle = register_dissector("uaudp", dissect_uaudp, proto_uaudp);
#if 0 /* XXX: Not used ?? */
register_dissector("uaudp_dir_unknown", dissect_uaudp_dir_unknown, proto_uaudp);
register_dissector("uaudp_term_to_serv", dissect_uaudp_term_to_serv, proto_uaudp);
register_dissector("uaudp_serv_to_term", dissect_uaudp_serv_to_term, proto_uaudp);
new_register_dissector("uaudp_dir_unknown", dissect_uaudp_dir_unknown, proto_uaudp);
new_register_dissector("uaudp_term_to_serv", dissect_uaudp_term_to_serv, proto_uaudp);
new_register_dissector("uaudp_serv_to_term", dissect_uaudp_serv_to_term, proto_uaudp);
#endif
proto_register_field_array(proto_uaudp, hf_uaudp, array_length(hf_uaudp));

View File

@ -996,10 +996,11 @@ dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 ip_proto)
decode_udp_ports(tvb, offset, pinfo, tree, udph->uh_sport, udph->uh_dport, udph->uh_ulen);
}
static void
dissect_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
dissect(tvb, pinfo, tree, IP_PROTO_UDP);
return tvb_captured_length(tvb);
}
static void
@ -1075,7 +1076,7 @@ proto_register_udp(void)
proto_udp = proto_register_protocol("User Datagram Protocol",
"UDP", "udp");
hfi_udp = proto_registrar_get_nth(proto_udp);
udp_handle = register_dissector("udp", dissect_udp, proto_udp);
udp_handle = new_register_dissector("udp", dissect_udp, proto_udp);
expert_udp = expert_register_protocol(proto_udp);
proto_register_fields(proto_udp, hfi, array_length(hfi));

View File

@ -3807,10 +3807,11 @@ dissect_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent,
}
}
static void
dissect_linux_usb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent)
static int
dissect_linux_usb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, void* data _U_)
{
dissect_usb_common(tvb, pinfo, parent, USB_HEADER_LINUX_48_BYTES);
return tvb_captured_length(tvb);
}
static void
@ -4508,7 +4509,7 @@ proto_register_usb(void)
proto_usb = proto_register_protocol("USB", "USB", "usb");
proto_register_field_array(proto_usb, hf, array_length(hf));
proto_register_subtree_array(usb_subtrees, array_length(usb_subtrees));
linux_usb_handle = register_dissector("usb", dissect_linux_usb, proto_usb);
linux_usb_handle = new_register_dissector("usb", dissect_linux_usb, proto_usb);
expert_usb = expert_register_protocol(proto_usb);
expert_register_field_array(expert_usb, ei, array_length(ei));

View File

@ -99,8 +99,8 @@ set_addr(packet_info *pinfo _U_ , int field, gchar rid, gchar sid, gchar did)
}
}
static void
dissect_uts(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree)
static int
dissect_uts(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree, void* data _U_)
{
proto_tree *uts_tree = NULL;
proto_tree *uts_header_tree = NULL;
@ -317,6 +317,7 @@ dissect_uts(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree)
}
}
}
return tvb_captured_length(tvb);
}
void
@ -367,7 +368,7 @@ proto_register_uts(void)
proto_uts = proto_register_protocol("Unisys Transmittal System", "UTS", "uts"); /* name, short name, abbrev */
proto_register_field_array(proto_uts, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("uts", dissect_uts, proto_uts);
new_register_dissector("uts", dissect_uts, proto_uts);
}
/*

View File

@ -2105,10 +2105,11 @@ dissect_v52_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
}
static void
dissect_v52(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_v52(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
dissect_v52_message(tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
void
@ -2403,7 +2404,7 @@ proto_register_v52(void)
proto_register_field_array (proto_v52, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("v52", dissect_v52, proto_v52);
new_register_dissector("v52", dissect_v52, proto_v52);
}
/*

View File

@ -127,11 +127,8 @@ static const xdlc_cf_items v5dl_cf_items_ext = {
#define MAX_V5DL_PACKET_LEN 1024
static void
dissect_v5dl(tvbuff_t*, packet_info*, proto_tree*);
static void
dissect_v5dl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_v5dl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_tree *v5dl_tree, *addr_tree;
proto_item *v5dl_ti, *addr_ti;
@ -307,6 +304,7 @@ dissect_v5dl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* call V5.2 dissector */
call_dissector(v52_handle, next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
void
@ -430,7 +428,7 @@ proto_register_v5dl(void)
proto_register_field_array (proto_v5dl, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("v5dl", dissect_v5dl, proto_v5dl);
new_register_dissector("v5dl", dissect_v5dl, proto_v5dl);
}
void

View File

@ -67,11 +67,8 @@ static const value_string v5ef_direction_vals[] = {
#define MAX_V5EF_PACKET_LEN 1024
static void
dissect_v5ef(tvbuff_t*, packet_info*, proto_tree*);
static void
dissect_v5ef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_v5ef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_tree *v5ef_tree, *addr_tree;
proto_item *v5ef_ti, *addr_ti;
@ -141,6 +138,8 @@ dissect_v5ef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
call_dissector(v5dl_handle,next_tvb, pinfo, tree);
else
call_dissector(lapd_handle,next_tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
void
@ -186,7 +185,7 @@ proto_register_v5ef(void)
proto_register_field_array (proto_v5ef, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("v5ef", dissect_v5ef, proto_v5ef);
new_register_dissector("v5ef", dissect_v5ef, proto_v5ef);
}

View File

@ -169,8 +169,8 @@ static const true_false_string vp8_hdr_frametype_vals = {
"keyframe"
};
static void
dissect_vp8(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_vp8(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *item;
@ -196,6 +196,8 @@ dissect_vp8(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_append_fstr(pinfo->cinfo, COL_INFO, " - %s",
val_to_str(frametype, vp8_type_values, "Unknown Type (%u)"));
return tvb_captured_length(tvb);
}
static void
@ -578,7 +580,7 @@ proto_register_vp8(void)
"; Values must be in the range 96 - 127",
&temp_dynamic_payload_type_range, 127);
register_dissector("vp8", dissect_vp8, proto_vp8);
new_register_dissector("vp8", dissect_vp8, proto_vp8);
}
static void

View File

@ -7846,16 +7846,18 @@ dissect_wbxml_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
&codepage_attr, content_map);
}
static void
dissect_wbxml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_wbxml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
dissect_wbxml_common(tvb, pinfo, tree, NULL);
return tvb_captured_length(tvb);
}
static void
dissect_uaprof(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_uaprof(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
dissect_wbxml_common(tvb, pinfo, tree, &decode_uaprof_wap_248);
return tvb_captured_length(tvb);
}
/****************** Register the protocol with Wireshark ******************/
@ -8118,8 +8120,8 @@ proto_register_wbxml(void)
"dissected (and visualized) then.",
&disable_wbxml_token_parsing);
register_dissector("wbxml", dissect_wbxml, proto_wbxml);
register_dissector("wbxml-uaprof", dissect_uaprof, proto_wbxml);
new_register_dissector("wbxml", dissect_wbxml, proto_wbxml);
new_register_dissector("wbxml-uaprof", dissect_uaprof, proto_wbxml);
}

View File

@ -42,8 +42,8 @@ static const value_string wfleet_hdlc_cmd_vals[] = {
{ 0, NULL}
};
static void
dissect_wfleet_hdlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_wfleet_hdlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *ti;
proto_tree *fh_tree = NULL;
@ -76,7 +76,7 @@ dissect_wfleet_hdlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
next_tvb = tvb_new_subset_remaining(tvb, 2);
call_dissector(eth_withoutfcs_handle, next_tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
void
@ -98,7 +98,7 @@ proto_register_wfleet_hdlc(void)
proto_register_field_array(proto_wfleet_hdlc, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("wfleet_hdlc", dissect_wfleet_hdlc, proto_wfleet_hdlc);
new_register_dissector("wfleet_hdlc", dissect_wfleet_hdlc, proto_wfleet_hdlc);
}

View File

@ -5040,13 +5040,14 @@ dissect_wsp_fromudp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* Leave the "Protocol" column alone - the dissector calling us should
* have set it.
*/
static void
dissect_wsp_fromwap_co(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_wsp_fromwap_co(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
/*
* XXX - what about WTLS->WTP->WSP?
*/
dissect_wsp_common(tvb, pinfo, tree, wtp_fromudp_handle, FALSE);
return tvb_captured_length(tvb);
}
@ -5055,14 +5056,15 @@ dissect_wsp_fromwap_co(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* Leave the "Protocol" column alone - the dissector calling us should
* have set it.
*/
static void
dissect_wsp_fromwap_cl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_wsp_fromwap_cl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
/*
* XXX - what about WTLS->WSP?
*/
col_clear(pinfo->cinfo, COL_INFO);
dissect_wsp_common(tvb, pinfo, tree, wtp_fromudp_handle, TRUE);
return tvb_captured_length(tvb);
}
@ -7157,8 +7159,8 @@ proto_register_wsp(void)
expert_wsp = expert_register_protocol(proto_wsp);
expert_register_field_array(expert_wsp, ei, array_length(ei));
register_dissector("wsp-co", dissect_wsp_fromwap_co, proto_wsp);
register_dissector("wsp-cl", dissect_wsp_fromwap_cl, proto_wsp);
new_register_dissector("wsp-co", dissect_wsp_fromwap_co, proto_wsp);
new_register_dissector("wsp-cl", dissect_wsp_fromwap_cl, proto_wsp);
heur_subdissector_list = register_heur_dissector_list("wsp");
wsp_fromudp_handle = create_dissector_handle(dissect_wsp_fromudp,

View File

@ -778,13 +778,14 @@ dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* Called directly from UDP.
* Put "WTP+WSP" into the "Protocol" column.
*/
static void
dissect_wtp_fromudp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_wtp_fromudp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
col_set_str(pinfo->cinfo, COL_PROTOCOL, "WTP+WSP");
col_clear(pinfo->cinfo, COL_INFO);
dissect_wtp_common(tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
/*
@ -796,13 +797,14 @@ dissect_wtp_fromudp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*
* XXX - can this be called from any other dissector?
*/
static void
dissect_wtp_fromwtls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_wtp_fromwtls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
col_set_str(pinfo->cinfo, COL_PROTOCOL, "WTLS+WTP+WSP");
col_clear(pinfo->cinfo, COL_INFO);
dissect_wtp_common(tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
@ -1058,8 +1060,8 @@ proto_register_wtp(void)
proto_register_field_array(proto_wtp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("wtp-wtls", dissect_wtp_fromwtls, proto_wtp);
register_dissector("wtp-udp", dissect_wtp_fromudp, proto_wtp);
new_register_dissector("wtp-wtls", dissect_wtp_fromwtls, proto_wtp);
new_register_dissector("wtp-udp", dissect_wtp_fromudp, proto_wtp);
register_init_routine(wtp_defragment_init);
register_cleanup_routine(wtp_defragment_cleanup);
}

View File

@ -1998,21 +1998,22 @@ dissect_x25_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
* X.25 dissector for use when "pinfo->pseudo_header" points to a
* "struct x25_phdr".
*/
static void
dissect_x25_dir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_x25_dir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
dissect_x25_common(tvb, pinfo, tree,
(pinfo->pseudo_header->x25.flags & FROM_DCE) ? X25_FROM_DCE :
X25_FROM_DTE,
pinfo->pseudo_header->x25.flags & FROM_DCE);
return tvb_captured_length(tvb);
}
/*
* X.25 dissector for use when "pinfo->pseudo_header" doesn't point to a
* "struct x25_phdr".
*/
static void
dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
int direction;
@ -2026,6 +2027,7 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (direction == 0)
direction = (pinfo->srcport > pinfo->destport)*2 - 1;
dissect_x25_common(tvb, pinfo, tree, X25_UNKNOWN, direction > 0);
return tvb_captured_length(tvb);
}
static void
@ -2371,8 +2373,8 @@ proto_register_x25(void)
"X.25 secondary protocol identifier", FT_UINT8, BASE_HEX, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE);
x25_heur_subdissector_list = register_heur_dissector_list("x.25");
register_dissector("x.25_dir", dissect_x25_dir, proto_x25);
register_dissector("x.25", dissect_x25, proto_x25);
new_register_dissector("x.25_dir", dissect_x25_dir, proto_x25);
new_register_dissector("x.25", dissect_x25, proto_x25);
/* Preferences */
x25_module = prefs_register_protocol(proto_x25, NULL);

View File

@ -557,10 +557,10 @@ static const value_string zbee_zcl_power_config_batt_type_names[] = {
* none
*---------------------------------------------------------------
*/
static void
dissect_zbee_zcl_power_config(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
static int
dissect_zbee_zcl_power_config(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_)
{
return;
return tvb_captured_length(tvb);
} /*dissect_zbee_zcl_power_config*/
/*FUNCTION:------------------------------------------------------
@ -829,7 +829,7 @@ proto_register_zbee_zcl_power_config(void)
proto_register_subtree_array(ett, array_length(ett));
/* Register the ZigBee ZCL power configuration dissector. */
register_dissector(ZBEE_PROTOABBREV_ZCL_POWER_CONFIG, dissect_zbee_zcl_power_config, proto_zbee_zcl_power_config);
new_register_dissector(ZBEE_PROTOABBREV_ZCL_POWER_CONFIG, dissect_zbee_zcl_power_config, proto_zbee_zcl_power_config);
} /*proto_register_zbee_zcl_power_config*/
/*FUNCTION:------------------------------------------------------

View File

@ -216,10 +216,10 @@ static const value_string zbee_zcl_appl_idt_ceced_spec_ver_names[] = {
* none
*---------------------------------------------------------------
*/
static void
dissect_zbee_zcl_appl_idt(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
static int
dissect_zbee_zcl_appl_idt(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_)
{
return;
return tvb_captured_length(tvb);
} /*dissect_zbee_zcl_appl_idt*/
/*FUNCTION:------------------------------------------------------
@ -355,7 +355,7 @@ proto_register_zbee_zcl_appl_idt(void)
proto_register_subtree_array(ett, array_length(ett));
/* Register the ZigBee ZCL Appliance Identification dissector. */
register_dissector(ZBEE_PROTOABBREV_ZCL_APPLIDT, dissect_zbee_zcl_appl_idt, proto_zbee_zcl_appl_idt);
new_register_dissector(ZBEE_PROTOABBREV_ZCL_APPLIDT, dissect_zbee_zcl_appl_idt, proto_zbee_zcl_appl_idt);
} /*proto_register_zbee_zcl_appl_idt*/
/*FUNCTION:------------------------------------------------------
@ -505,10 +505,10 @@ static const value_string zbee_zcl_met_idt_data_quality_names[] = {
* none
*---------------------------------------------------------------
*/
static void
dissect_zbee_zcl_met_idt(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
static int
dissect_zbee_zcl_met_idt(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_)
{
return;
return tvb_captured_length(tvb);
} /*dissect_zbee_zcl_met_idt*/
/*FUNCTION:------------------------------------------------------
@ -586,7 +586,7 @@ proto_register_zbee_zcl_met_idt(void)
proto_register_field_array(proto_zbee_zcl_met_idt, hf, array_length(hf));
/* Register the ZigBee ZCL Meter Identification dissector. */
register_dissector(ZBEE_PROTOABBREV_ZCL_METIDT, dissect_zbee_zcl_met_idt, proto_zbee_zcl_met_idt);
new_register_dissector(ZBEE_PROTOABBREV_ZCL_METIDT, dissect_zbee_zcl_met_idt, proto_zbee_zcl_met_idt);
} /*proto_register_zbee_zcl_met_idt*/
/*FUNCTION:------------------------------------------------------

View File

@ -139,10 +139,10 @@ static const value_string zbee_zcl_illum_meas_sensor_type_names[] = {
* none
*---------------------------------------------------------------
*/
static void
dissect_zbee_zcl_illum_meas(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
static int
dissect_zbee_zcl_illum_meas(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_)
{
return;
return tvb_captured_length(tvb);
} /*dissect_zbee_zcl_illum_meas*/
/*FUNCTION:------------------------------------------------------
@ -343,7 +343,7 @@ proto_register_zbee_zcl_illum_meas(void)
proto_register_field_array(proto_zbee_zcl_illum_meas, hf, array_length(hf));
/* Register the ZigBee ZCL Illuminance Measurement dissector. */
register_dissector(ZBEE_PROTOABBREV_ZCL_ILLUMMEAS, dissect_zbee_zcl_illum_meas, proto_zbee_zcl_illum_meas);
new_register_dissector(ZBEE_PROTOABBREV_ZCL_ILLUMMEAS, dissect_zbee_zcl_illum_meas, proto_zbee_zcl_illum_meas);
} /*proto_register_zbee_zcl_illum_meas*/
@ -462,10 +462,10 @@ static const value_string zbee_zcl_temp_meas_attr_names[] = {
* none
*---------------------------------------------------------------
*/
static void
dissect_zbee_zcl_temp_meas(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
static int
dissect_zbee_zcl_temp_meas(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_)
{
return;
return tvb_captured_length(tvb);
} /*dissect_zbee_zcl_temp_meas*/
/*FUNCTION:------------------------------------------------------
@ -654,7 +654,7 @@ proto_register_zbee_zcl_temp_meas(void)
proto_register_field_array(proto_zbee_zcl_temp_meas, hf, array_length(hf));
/* Register the ZigBee ZCL Temperature Measurement dissector. */
register_dissector(ZBEE_PROTOABBREV_ZCL_TEMPMEAS, dissect_zbee_zcl_temp_meas, proto_zbee_zcl_temp_meas);
new_register_dissector(ZBEE_PROTOABBREV_ZCL_TEMPMEAS, dissect_zbee_zcl_temp_meas, proto_zbee_zcl_temp_meas);
} /*proto_register_zbee_zcl_temp_meas*/
/*FUNCTION:------------------------------------------------------
@ -789,10 +789,10 @@ static const value_string zbee_zcl_press_meas_attr_names[] = {
* none
*---------------------------------------------------------------
*/
static void
dissect_zbee_zcl_press_meas(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
static int
dissect_zbee_zcl_press_meas(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_)
{
return;
return tvb_captured_length(tvb);
} /*dissect_zbee_zcl_press_meas*/
/*FUNCTION:------------------------------------------------------
@ -1026,7 +1026,7 @@ proto_register_zbee_zcl_press_meas(void)
proto_register_field_array(proto_zbee_zcl_press_meas, hf, array_length(hf));
/* Register the ZigBee ZCL Pressure Measurement dissector. */
register_dissector(ZBEE_PROTOABBREV_ZCL_PRESSMEAS, dissect_zbee_zcl_press_meas, proto_zbee_zcl_press_meas);
new_register_dissector(ZBEE_PROTOABBREV_ZCL_PRESSMEAS, dissect_zbee_zcl_press_meas, proto_zbee_zcl_press_meas);
} /*proto_register_zbee_zcl_press_meas*/
/*FUNCTION:------------------------------------------------------
@ -1144,10 +1144,10 @@ static const value_string zbee_zcl_relhum_meas_attr_names[] = {
* none
*---------------------------------------------------------------
*/
static void
dissect_zbee_zcl_relhum_meas(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
static int
dissect_zbee_zcl_relhum_meas(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_)
{
return;
return tvb_captured_length(tvb);
} /*dissect_zbee_zcl_relhum_meas*/
/*FUNCTION:------------------------------------------------------
@ -1334,7 +1334,7 @@ proto_register_zbee_zcl_relhum_meas(void)
proto_register_field_array(proto_zbee_zcl_relhum_meas, hf, array_length(hf));
/* Register the ZigBee ZCL Relative Humidity Measurement dissector. */
register_dissector(ZBEE_PROTOABBREV_ZCL_RELHUMMEAS, dissect_zbee_zcl_relhum_meas, proto_zbee_zcl_relhum_meas);
new_register_dissector(ZBEE_PROTOABBREV_ZCL_RELHUMMEAS, dissect_zbee_zcl_relhum_meas, proto_zbee_zcl_relhum_meas);
} /*proto_register_zbee_zcl_relhum_meas*/