Picking off "easy" dissectors that only have one or two exit points at most.
Change-Id: Ie98e071a7cb568c13c8958de56b1fc25a4ce2ce9
Reviewed-on: https://code.wireshark.org/review/11831
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
static gint ett_docsis_bintrngreq = -1;
/* Dissection */
-static void
-dissect_bintrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_bintrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *bintrngreq_item;
proto_tree *bintrngreq_tree;
proto_tree_add_item (bintrngreq_tree, hf_docsis_bintrngreq_up_chid,
tvb, offset, 1, ENC_BIG_ENDIAN);
}
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_bintrngreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_bintrngreq", dissect_bintrngreq, proto_docsis_bintrngreq);
+ new_register_dissector ("docsis_bintrngreq", dissect_bintrngreq, proto_docsis_bintrngreq);
}
void
} /* while */
}
-static void
-dissect_bpkmattr (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_bpkmattr (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
bpkmattr_tree = proto_item_add_subtree (it, ett_docsis_bpkmattr);
dissect_attrs (tvb, pinfo, bpkmattr_tree);
}
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_bpkmattr, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_bpkmattr", dissect_bpkmattr,
+ new_register_dissector ("docsis_bpkmattr", dissect_bpkmattr,
proto_docsis_bpkmattr);
}
static dissector_handle_t attrs_handle;
/* Dissection */
-static void
-dissect_bpkmreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_bpkmreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *bpkmreq_tree;
attrs_tvb = tvb_new_subset_remaining (tvb, 4);
call_dissector (attrs_handle, attrs_tvb, pinfo, tree);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_bpkmreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_bpkmreq", dissect_bpkmreq,
+ new_register_dissector ("docsis_bpkmreq", dissect_bpkmreq,
proto_docsis_bpkmreq);
}
static dissector_handle_t attrs_handle;
/* Dissection */
-static void
-dissect_bpkmrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_bpkmrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *bpkmrsp_tree;
/* Code to Call subdissector */
attrs_tvb = tvb_new_subset_remaining (tvb, 4);
call_dissector (attrs_handle, attrs_tvb, pinfo, tree);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_bpkmrsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_bpkmrsp", dissect_bpkmrsp,
+ new_register_dissector ("docsis_bpkmrsp", dissect_bpkmrsp,
proto_docsis_bpkmrsp);
}
static gint ett_docsis_cmctrlreq = -1;
/* Dissection */
-static void
-dissect_cmctrlreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_cmctrlreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *cmctrlreq_tree = NULL;
/* Call Dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 2);
call_dissector (cmctrl_tlv_handle, next_tvb, pinfo, cmctrlreq_tree);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_cmctrlreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_cmctrlreq", dissect_cmctrlreq, proto_docsis_cmctrlreq);
+ new_register_dissector ("docsis_cmctrlreq", dissect_cmctrlreq, proto_docsis_cmctrlreq);
}
void
static gint ett_docsis_cmctrlrsp = -1;
/* Dissection */
-static void
-dissect_cmctrlrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_cmctrlrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *cmctrlrsp_tree = NULL;
/* Call Dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 2);
call_dissector (cmctrl_tlv_handle, next_tvb, pinfo, cmctrlrsp_tree);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_cmctrlrsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_cmctrlrsp", dissect_cmctrlrsp, proto_docsis_cmctrlrsp);
+ new_register_dissector ("docsis_cmctrlrsp", dissect_cmctrlrsp, proto_docsis_cmctrlrsp);
}
void
} /* while */
}
-static void
-dissect_cmstatus (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_cmstatus (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *cmstatus_tree = NULL;
}
/* Call Dissector TLV's */
dissect_cmstatus_tlv(tvb, cmstatus_tree, 3, len);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_cmstatus, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_cmstatus", dissect_cmstatus, proto_docsis_cmstatus);
+ new_register_dissector ("docsis_cmstatus", dissect_cmstatus, proto_docsis_cmstatus);
}
void
static gint ett_docsis_dbcack = -1;
/* Dissection */
-static void
-dissect_dbcack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dbcack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *dbcack_item;
proto_tree *dbcack_tree = NULL;
/* Call Dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 2);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, dbcack_tree);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_dbcack, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_dbcack", dissect_dbcack, proto_docsis_dbcack);
+ new_register_dissector ("docsis_dbcack", dissect_dbcack, proto_docsis_dbcack);
}
void
static gint ett_docsis_dbcreq = -1;
/* Dissection */
-static void
-dissect_dbcreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dbcreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *dbcreq_item;
proto_tree *dbcreq_tree = NULL;
/* Call Dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 4);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, dbcreq_tree);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_dbcreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_dbcreq", dissect_dbcreq, proto_docsis_dbcreq);
+ new_register_dissector ("docsis_dbcreq", dissect_dbcreq, proto_docsis_dbcreq);
}
void
static gint ett_docsis_dbcrsp = -1;
/* Dissection */
-static void
-dissect_dbcrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dbcrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *dbcrsp_item;
proto_tree *dbcrsp_tree = NULL;
/* Call Dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 3);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, dbcrsp_tree);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_dbcrsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_dbcrsp", dissect_dbcrsp, proto_docsis_dbcrsp);
+ new_register_dissector ("docsis_dbcrsp", dissect_dbcrsp, proto_docsis_dbcrsp);
}
static gint ett_docsis_dccack = -1;
/* Dissection */
-static void
-dissect_dccack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dccack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
guint16 pos;
guint8 type, length;
pos = pos + length;
} /* while (pos < len) */
} /* if (tree) */
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_dccack, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_dccack", dissect_dccack, proto_docsis_dccack);
+ new_register_dissector ("docsis_dccack", dissect_dccack, proto_docsis_dccack);
}
void
}
}
-static void
-dissect_dccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
guint16 pos;
guint8 type, length;
pos = pos + length;
} /* while (pos < len) */
} /* if (tree) */
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_dccreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_dccreq", dissect_dccreq, proto_docsis_dccreq);
+ new_register_dissector ("docsis_dccreq", dissect_dccreq, proto_docsis_dccreq);
}
void
}
}
-static void
-dissect_dccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
guint16 pos;
guint8 type, length;
} /* while (pos < len) */
} /* if (tree) */
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_dccrsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_dccrsp", dissect_dccrsp, proto_docsis_dccrsp);
+ new_register_dissector ("docsis_dccrsp", dissect_dccrsp, proto_docsis_dccrsp);
}
void
}
}
-static void
-dissect_dcd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dcd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
guint16 pos;
guint8 type, length;
} /* while (pos < len) */
} /* if (tree) */
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_dcd, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_dcd", dissect_dcd, proto_docsis_dcd);
+ new_register_dissector ("docsis_dcd", dissect_dcd, proto_docsis_dcd);
}
void
}
-static void
-dissect_docsis (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_docsis (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
guint8 fc;
guint8 fctype;
}
break;
}
+ return tvb_captured_length(tvb);
}
proto_register_field_array (proto_docsis, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis", dissect_docsis, proto_docsis);
+ new_register_dissector ("docsis", dissect_docsis, proto_docsis);
}
void
static gint ett_docsis_dpvreq = -1;
/* Dissection */
-static void
-dissect_dpvreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dpvreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *dpvreq_tree = NULL;
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_ts_end, tvb,
16, 4, ENC_BIG_ENDIAN);
}
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_dpvreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_dpvreq", dissect_dpvreq, proto_docsis_dpvreq);
+ new_register_dissector ("docsis_dpvreq", dissect_dpvreq, proto_docsis_dpvreq);
}
void
static gint ett_docsis_dpvrsp = -1;
/* Dissection */
-static void
-dissect_dpvrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dpvrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *dpvrsp_tree = NULL;
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_ts_end, tvb,
16, 4, ENC_BIG_ENDIAN);
}
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_dpvrsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_dpvrsp", dissect_dpvrsp, proto_docsis_dpvrsp);
+ new_register_dissector ("docsis_dpvrsp", dissect_dpvrsp, proto_docsis_dpvrsp);
}
void
extern value_string docsis_conf_code[];
/* Dissection */
-static void
-dissect_dsaack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dsaack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *dsaack_tree = NULL;
/* Call Dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 3);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, dsaack_tree);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_dsaack, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_dsaack", dissect_dsaack, proto_docsis_dsaack);
+ new_register_dissector ("docsis_dsaack", dissect_dsaack, proto_docsis_dsaack);
}
void
static gint ett_docsis_dsareq = -1;
/* Dissection */
-static void
-dissect_dsareq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dsareq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *dsareq_tree = NULL;
/* Call Dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 2);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, dsareq_tree);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_dsareq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_dsareq", dissect_dsareq, proto_docsis_dsareq);
+ new_register_dissector ("docsis_dsareq", dissect_dsareq, proto_docsis_dsareq);
}
void
extern value_string docsis_conf_code[];
/* Dissection */
-static void
-dissect_dsarsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dsarsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *dsarsp_tree = NULL;
/* Call dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 3);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, dsarsp_tree);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_dsarsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_dsarsp", dissect_dsarsp, proto_docsis_dsarsp);
+ new_register_dissector ("docsis_dsarsp", dissect_dsarsp, proto_docsis_dsarsp);
}
void
extern value_string docsis_conf_code[];
/* Dissection */
-static void
-dissect_dscack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dscack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *dscack_tree = NULL;
/* Call Dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 3);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, dscack_tree);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_dscack, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_dscack", dissect_dscack, proto_docsis_dscack);
+ new_register_dissector ("docsis_dscack", dissect_dscack, proto_docsis_dscack);
}
void
static gint ett_docsis_dscreq = -1;
/* Dissection */
-static void
-dissect_dscreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dscreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *dscreq_tree = NULL;
/* Call dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 2);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, dscreq_tree);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_dscreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_dscreq", dissect_dscreq, proto_docsis_dscreq);
+ new_register_dissector ("docsis_dscreq", dissect_dscreq, proto_docsis_dscreq);
}
void
extern value_string docsis_conf_code[];
/* Dissection */
-static void
-dissect_dscrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dscrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *dscrsp_tree = NULL;
/* Call Dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 3);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, dscrsp_tree);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_dscrsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_dscrsp", dissect_dscrsp, proto_docsis_dscrsp);
+ new_register_dissector ("docsis_dscrsp", dissect_dscrsp, proto_docsis_dscrsp);
}
void
static gint ett_docsis_dsdreq = -1;
/* Dissection */
-static void
-dissect_dsdreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dsdreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *dsdreq_tree = NULL;
/* Call Dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 8);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, dsdreq_tree);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_dsdreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_dsdreq", dissect_dsdreq, proto_docsis_dsdreq);
+ new_register_dissector ("docsis_dsdreq", dissect_dsdreq, proto_docsis_dsdreq);
}
void
static gint ett_docsis_dsdrsp = -1;
/* Dissection */
-static void
-dissect_dsdrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dsdrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *dsdrsp_tree;
ENC_BIG_ENDIAN);
}
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_dsdrsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_dsdrsp", dissect_dsdrsp, proto_docsis_dsdrsp);
+ new_register_dissector ("docsis_dsdrsp", dissect_dsdrsp, proto_docsis_dsdrsp);
}
void
static gint ett_docsis_intrngreq = -1;
/* Dissection */
-static void
-dissect_intrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_intrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *intrngreq_item;
proto_tree *intrngreq_tree;
proto_tree_add_item (intrngreq_tree, hf_docsis_intrngreq_up_chid, tvb, 3,
1, ENC_BIG_ENDIAN);
}
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_intrngreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_intrngreq", dissect_intrngreq, proto_docsis_intrngreq);
+ new_register_dissector ("docsis_intrngreq", dissect_intrngreq, proto_docsis_intrngreq);
}
void
};
/* Dissection */
-static void
-dissect_macmgmt (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_macmgmt (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
guint16 msg_len;
proto_item *mgt_hdr_it;
msg_len = tvb_get_ntohs (tvb, 12);
payload_tvb = tvb_new_subset_length (tvb, 20, msg_len - 6);
- if (dissector_try_uint
- (docsis_mgmt_dissector_table, type, payload_tvb, pinfo, tree))
- return;
- else
+ if (!dissector_try_uint(docsis_mgmt_dissector_table, type, payload_tvb, pinfo, tree))
call_dissector (data_handle, payload_tvb, pinfo, tree);
+
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_mgmt, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_mgmt", dissect_macmgmt, proto_docsis_mgmt);
+ new_register_dissector ("docsis_mgmt", dissect_macmgmt, proto_docsis_mgmt);
}
void
extern value_string iuc_vals[];
/* Code to actually dissect the packets */
-static void
-dissect_map (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_map (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
guint8 i, numie;
int pos;
pos = pos + 4;
} /* for... */
} /* if(tree) */
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_map, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_map", dissect_map, proto_docsis_map);
+ new_register_dissector ("docsis_map", dissect_map, proto_docsis_map);
}
void
static gint ett_sub_tlv = -1;
/* Dissection */
-static void
-dissect_mdd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_mdd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *mdd_tree;
pos += length + 2;
}
} /* if(tree) */
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_mdd, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_mdd", dissect_mdd, proto_docsis_mdd);
+ new_register_dissector ("docsis_mdd", dissect_mdd, proto_docsis_mdd);
}
void
static gint ett_docsis_regack = -1;
/* Dissection */
-static void
-dissect_regack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_regack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *regack_tree = NULL;
/* Call Dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 3);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, regack_tree);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_regack, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_regack", dissect_regack, proto_docsis_regack);
+ new_register_dissector ("docsis_regack", dissect_regack, proto_docsis_regack);
}
void
static dissector_handle_t docsis_tlv_handle;
/* Code to actually dissect the packets */
-static void
-dissect_regreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_regreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *regreq_tree = NULL;
/* Call Dissector for Appendix C TlV's */
next_tvb = tvb_new_subset_remaining (tvb, 2);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, regreq_tree);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_regreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_regreq", dissect_regreq, proto_docsis_regreq);
+ new_register_dissector ("docsis_regreq", dissect_regreq, proto_docsis_regreq);
}
void
static gint ett_docsis_regreqmp = -1;
/* Dissection */
-static void
-dissect_regreqmp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_regreqmp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *regreqmp_tree = NULL;
/* Call Dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 4);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, regreqmp_tree);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_regreqmp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_regreqmp", dissect_regreqmp, proto_docsis_regreqmp);
+ new_register_dissector ("docsis_regreqmp", dissect_regreqmp, proto_docsis_regreqmp);
}
void
static gint ett_docsis_regrsp = -1;
/* Dissection */
-static void
-dissect_regrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_regrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *regrsp_tree = NULL;
/* Call Dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 3);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, regrsp_tree);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_regrsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_regrsp", dissect_regrsp, proto_docsis_regrsp);
+ new_register_dissector ("docsis_regrsp", dissect_regrsp, proto_docsis_regrsp);
}
void
static gint ett_docsis_regrspmp = -1;
/* Dissection */
-static void
-dissect_regrspmp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_regrspmp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *regrspmp_tree = NULL;
/* Call Dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 5);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, regrspmp_tree);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_regrspmp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_regrspmp", dissect_regrspmp, proto_docsis_regrspmp);
+ new_register_dissector ("docsis_regrspmp", dissect_regrspmp, proto_docsis_regrspmp);
}
void
static gint ett_docsis_rngreq = -1;
/* Dissection */
-static void
-dissect_rngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_rngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *rngreq_tree;
proto_tree_add_item (rngreq_tree, hf_docsis_rngreq_pend_compl, tvb, 3,
1, ENC_BIG_ENDIAN);
}
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_rngreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_rngreq", dissect_rngreq, proto_docsis_rngreq);
+ new_register_dissector ("docsis_rngreq", dissect_rngreq, proto_docsis_rngreq);
}
void
static gint ett_docsis_rngrsp = -1;
/* Code to actually dissect the packets */
-static void
-dissect_rngrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_rngrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *rngrsp_tree;
pos = pos + tlvlen;
} /* while (pos < length) */
} /* if (tree) */
+ return tvb_captured_length(tvb);
}
proto_register_field_array (proto_docsis_rngrsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_rngrsp", dissect_rngrsp, proto_docsis_rngrsp);
+ new_register_dissector ("docsis_rngrsp", dissect_rngrsp, proto_docsis_rngrsp);
}
static gint ett_docsis_sync = -1;
/* Dissection */
-static void
-dissect_sync (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_sync (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *sync_tree;
proto_tree_add_item (sync_tree, hf_docsis_sync_cmts_timestamp, tvb, 0, 4,
ENC_BIG_ENDIAN);
} /* if(tree) */
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_sync, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_sync", dissect_sync, proto_docsis_sync);
+ new_register_dissector ("docsis_sync", dissect_sync, proto_docsis_sync);
}
void
} /* while */
}
-static void
-dissect_cmctrl_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
+static int
+dissect_cmctrl_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *tlv_tree;
} /* switch */
pos = pos + length;
} /* while */
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_cmctrl_tlv, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("cmctrl_tlv", dissect_cmctrl_tlv, proto_cmctrl_tlv);
+ new_register_dissector ("cmctrl_tlv", dissect_cmctrl_tlv, proto_cmctrl_tlv);
}
void
}
-static void
-dissect_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
+static int
+dissect_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, void* data _U_)
{
proto_item *it;
} /* while (pos < total_len) */
} /*if (tree) */
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_tlv, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_tlv", dissect_tlv, proto_docsis_tlv);
+ new_register_dissector ("docsis_tlv", dissect_tlv, proto_docsis_tlv);
}
void
};
/* Dissection */
-static void
-dissect_type29ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_type29ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
guint16 pos, endtlvpos;
guint8 type, length;
} /* switch(type) */
} /* while (pos < len) */
} /* if (tree) */
+
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_type29ucd, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_type29ucd", dissect_type29ucd, proto_docsis_type29ucd);
+ new_register_dissector ("docsis_type29ucd", dissect_type29ucd, proto_docsis_type29ucd);
}
void
static gint ett_docsis_uccreq = -1;
/* Dissection */
-static void
-dissect_uccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_uccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *uccreq_tree = NULL;
/* call dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 1);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, uccreq_tree);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_uccreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_uccreq", dissect_uccreq, proto_docsis_uccreq);
+ new_register_dissector ("docsis_uccreq", dissect_uccreq, proto_docsis_uccreq);
}
void
static gint ett_docsis_uccrsp = -1;
/* Dissection */
-static void
-dissect_uccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_uccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *uccrsp_tree;
proto_tree_add_item (uccrsp_tree, hf_docsis_uccrsp_upchid, tvb, 0, 1,
ENC_BIG_ENDIAN);
}
+
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_uccrsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_uccrsp", dissect_uccrsp, proto_docsis_uccrsp);
+ new_register_dissector ("docsis_uccrsp", dissect_uccrsp, proto_docsis_uccrsp);
}
void
};
/* Dissection */
-static void
-dissect_ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
int pos, endtlvpos;
guint8 type, length;
} /* switch(type) */
} /* while (pos < len) */
} /* if (tree) */
+
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
proto_register_field_array (proto_docsis_ucd, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_ucd", dissect_ucd, proto_docsis_ucd);
+ new_register_dissector ("docsis_ucd", dissect_ucd, proto_docsis_ucd);
}
void
gint vsif_len);
/* Dissection */
-static void
-dissect_vsif (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
+static int
+dissect_vsif (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *vsif_tree;
} /* if(tree) */
-
+ return tvb_captured_length(tvb);
}
/* Dissector for Cisco Vendor Specific TLV's */
proto_register_field_array (proto_docsis_vsif, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_vsif", dissect_vsif, proto_docsis_vsif);
+ new_register_dissector ("docsis_vsif", dissect_vsif, proto_docsis_vsif);
}
void
}
}
-static void dissect_ecat_mailbox(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_ecat_mailbox(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_tree *ecat_mailbox_tree = NULL;
proto_tree *ecat_mailbox_header_tree = NULL;
col_append_str(pinfo->cinfo, COL_INFO, ")");
}
}
+ return tvb_captured_length(tvb);
}
void proto_register_ecat_mailbox(void)
proto_register_field_array(proto_ecat_mailbox, hf,array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("ecat_mailbox", dissect_ecat_mailbox, proto_ecat_mailbox);
+ new_register_dissector("ecat_mailbox", dissect_ecat_mailbox, proto_ecat_mailbox);
}
void proto_reg_handoff_ecat_mailbox(void)
}
/*esl*/
-static void
-dissect_esl_header(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) {
+static int
+dissect_esl_header(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_) {
proto_item *ti = NULL;
proto_tree *esl_header_tree;
proto_tree_add_item(esl_header_tree, hf_esl_timestamp, tvb, offset, 8, ENC_LITTLE_ENDIAN);
}
}
+ return tvb_captured_length(tvb);
}
typedef struct _ref_time_frame_info
First 6 bytes must be: 01 01 05 10 00 00 */
if ( is_esl_header(tvb, 0) )
{
- dissect_esl_header(tvb, pinfo, tree);
+ dissect_esl_header(tvb, pinfo, tree, data);
if ( eth_withoutfcs_handle != NULL )
{
next_tvb = tvb_new_subset_remaining(tvb, SIZEOF_ESLHEADER);
call_dissector(eth_withoutfcs_handle, next_tvb, pinfo, tree);
}
next_tvb = tvb_new_subset_length(tvb, esl_length-SIZEOF_ESLHEADER, SIZEOF_ESLHEADER);
- dissect_esl_header(next_tvb, pinfo, tree);
+ dissect_esl_header(next_tvb, pinfo, tree, data);
modify_times(tvb, esl_length-SIZEOF_ESLHEADER, pinfo);
result = TRUE;
proto_register_field_array(proto_esl,hf,array_length(hf));
proto_register_subtree_array(ett,array_length(ett));
- register_dissector("esl", dissect_esl_header, proto_esl);
+ new_register_dissector("esl", dissect_esl_header, proto_esl);
}
void
};
/* Ethercat Frame */
-static void dissect_ethercat_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_ethercat_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
tvbuff_t *next_tvb;
proto_item *ti;
data instead. */
call_dissector (ethercat_frame_data_handle, next_tvb, pinfo, tree);
}
+ return tvb_captured_length(tvb);
}
void proto_register_ethercat_frame(void)
proto_register_field_array(proto_ethercat_frame,hf,array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("ecatf", dissect_ethercat_frame, proto_ethercat_frame);
+ new_register_dissector("ecatf", dissect_ethercat_frame, proto_ethercat_frame);
/* Define a handle (ecatf.type) for sub dissectors that want to dissect
the Ethercat frame ether type (E88A4) payload. */
/*
* Dissect IrDA protocol
*/
-static void dissect_irda(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root)
+static int dissect_irda(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, void* data _U_)
{
/* load the display labels */
pinfo->current_proto = "IrDA";
if ((pinfo->pseudo_header->irda.pkttype & IRDA_CLASS_MASK) == IRDA_CLASS_LOG)
{
dissect_log(tvb, pinfo, root);
- return;
+ return tvb_captured_length(tvb);
}
dissect_irlap(tvb, pinfo, root);
+ return tvb_captured_length(tvb);
}
proto_ttp = proto_register_protocol("Tiny Transport Protocol", "TTP", "ttp");
/* Register the dissector */
- register_dissector("irda", dissect_irda, proto_irlap);
+ new_register_dissector("irda", dissect_irda, proto_irlap);
/* Required function calls to register the header fields */
proto_register_field_array(proto_irlap, hf_lap, array_length(hf_lap));
/** Dissects an SIR packet. */
-static void
-dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root)
+static int
+dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root, void* data _U_)
{
gint offset = 0;
gint bof_offset;
pinfo->desegment_offset = offset;
pinfo->desegment_len = 1;
}
- return;
+ return tvb_captured_length(tvb);
} else {
guint preamble_len = bof_offset - offset;
gint data_offset = bof_offset + 1;
}
offset = eof_offset + 1;
}
+ return tvb_captured_length(tvb);
}
proto_sir = proto_register_protocol(
"Serial Infrared", "SIR", "sir");
- register_dissector("sir", dissect_sir, proto_sir);
+ new_register_dissector("sir", dissect_sir, proto_sir);
proto_register_subtree_array(ett, array_length(ett));
proto_register_field_array(
proto_sir, hf_sir, array_length(hf_sir));
#endif
-static void dissect_mac_mgmt_msg_aas_beam_select_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static int dissect_mac_mgmt_msg_aas_beam_select_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint offset = 0;
proto_item *aas_beam_item;
/* display the reserved fields */
proto_tree_add_item(aas_beam_tree, hf_aas_beam_select_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
}
+ return tvb_captured_length(tvb);
}
#ifdef OFDM
-static void dissect_mac_mgmt_msg_aas_beam_req_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static int dissect_mac_mgmt_msg_aas_beam_req_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint offset = 0;
proto_item *aas_beam_item;
/* display the reserved fields */
proto_tree_add_item(aas_beam_tree, hf_aas_beam_select_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
}
+ return tvb_captured_length(tvb);
}
-static void dissect_mac_mgmt_msg_aas_beam_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static int dissect_mac_mgmt_msg_aas_beam_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint offset = 0;
guint tvb_len, report_type;
/* display the CINR Mean Value */
proto_tree_add_item(aas_beam_tree, hf_aas_beam_cinr_value, tvb, offset, 1, ENC_BIG_ENDIAN);
}
+ return tvb_captured_length(tvb);
}
#endif
proto_register_field_array(proto_mac_mgmt_msg_aas_beam_decoder, hf_aas_beam, array_length(hf_aas_beam));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("mac_mgmt_msg_aas_beam_select_handler", dissect_mac_mgmt_msg_aas_beam_select_decoder, -1);
+ new_register_dissector("mac_mgmt_msg_aas_beam_select_handler", dissect_mac_mgmt_msg_aas_beam_select_decoder, -1);
#ifdef OFDM
- register_dissector("mac_mgmt_msg_aas_beam_req_handler", dissect_mac_mgmt_msg_aas_beam_req_decoder, -1);
- register_dissector("mac_mgmt_msg_aas_beam_rsp_handler", dissect_mac_mgmt_msg_aas_beam_rsp_decoder, -1);
+ new_register_dissector("mac_mgmt_msg_aas_beam_req_handler", dissect_mac_mgmt_msg_aas_beam_req_decoder, -1);
+ new_register_dissector("mac_mgmt_msg_aas_beam_rsp_handler", dissect_mac_mgmt_msg_aas_beam_rsp_decoder, -1);
#endif
}
{
dissector_handle_t aas_handle;
- aas_handle = create_dissector_handle(dissect_mac_mgmt_msg_aas_beam_select_decoder, proto_mac_mgmt_msg_aas_beam_decoder);
+ aas_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_aas_beam_select_decoder, proto_mac_mgmt_msg_aas_beam_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_AAS_BEAM_SELECT, aas_handle);
}
}
}
-static void dissect_mac_mgmt_msg_dsc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_dsc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
proto_item *dsc_item;
/* process DSC RSP message TLV Encode Information */
wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, dsc_tree);
}
+ return tvb_captured_length(tvb);
}
static void dissect_mac_mgmt_msg_dsc_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_register_field_array(proto_mac_mgmt_msg_dsc_decoder, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("mac_mgmt_msg_dsc_rsp_handler", dissect_mac_mgmt_msg_dsc_rsp_decoder, -1);
+ new_register_dissector("mac_mgmt_msg_dsc_rsp_handler", dissect_mac_mgmt_msg_dsc_rsp_decoder, -1);
}
void
dsc_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsc_req_decoder, proto_mac_mgmt_msg_dsc_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSC_REQ, dsc_handle);
- dsc_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsc_rsp_decoder, proto_mac_mgmt_msg_dsc_decoder);
+ dsc_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_dsc_rsp_decoder, proto_mac_mgmt_msg_dsc_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSC_RSP, dsc_handle);
dsc_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsc_ack_decoder, proto_mac_mgmt_msg_dsc_decoder);
/* Decode REG-RSP messages. */
-static void dissect_mac_mgmt_msg_reg_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_reg_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
guint tlv_offset;
if (!hmac_found)
proto_item_append_text(reg_rsp_tree, " (HMAC Tuple is missing !)");
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax Mac Payload Protocol and Dissector */
proto_register_field_array(proto_mac_mgmt_msg_reg_rsp_decoder, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("mac_mgmt_msg_reg_rsp_handler", dissect_mac_mgmt_msg_reg_rsp_decoder, -1);
+ new_register_dissector("mac_mgmt_msg_reg_rsp_handler", dissect_mac_mgmt_msg_reg_rsp_decoder, -1);
}
void proto_reg_handoff_mac_mgmt_msg_reg_rsp(void)
dsc_rsp_handle = find_dissector("mac_mgmt_msg_dsc_rsp_handler");
- reg_rsp_handle = create_dissector_handle(dissect_mac_mgmt_msg_reg_rsp_decoder, proto_mac_mgmt_msg_reg_rsp_decoder);
+ reg_rsp_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_reg_rsp_decoder, proto_mac_mgmt_msg_reg_rsp_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_REG_RSP, reg_rsp_handle);
}
}
/* Wimax Mac SBC-RSP Message Dissector */
-static void dissect_mac_mgmt_msg_sbc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_sbc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
guint tvb_len;
offset += (tlv_len+tlv_value_offset);
} /* end of TLV process while loop */
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax Mac SBC-REQ/RSP Messages Dissectors */
proto_register_field_array(proto_mac_mgmt_msg_sbc_decoder, hf_sbc, array_length(hf_sbc));
proto_register_subtree_array(ett_sbc, array_length(ett_sbc));
- register_dissector("mac_mgmt_msg_sbc_rsp_handler", dissect_mac_mgmt_msg_sbc_rsp_decoder, -1);
+ new_register_dissector("mac_mgmt_msg_sbc_rsp_handler", dissect_mac_mgmt_msg_sbc_rsp_decoder, -1);
}
void
sbc_handle = create_dissector_handle(dissect_mac_mgmt_msg_sbc_req_decoder, proto_mac_mgmt_msg_sbc_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_SBC_REQ, sbc_handle);
- sbc_handle = create_dissector_handle(dissect_mac_mgmt_msg_sbc_rsp_decoder, proto_mac_mgmt_msg_sbc_decoder);
+ sbc_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_sbc_rsp_decoder, proto_mac_mgmt_msg_sbc_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_SBC_RSP, sbc_handle);
}
/* WiMax protocol dissector */
-static void dissect_wimax(tvbuff_t *tvb _U_, packet_info *pinfo, proto_tree *tree _U_)
+static int dissect_wimax(tvbuff_t *tvb _U_, packet_info *pinfo, proto_tree *tree _U_, void* data _U_)
{
/* display the WiMax protocol name */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "WiMax");
/* Clear out stuff in the info column */
col_clear(pinfo->cinfo, COL_INFO);
+
+ return tvb_captured_length(tvb);
}
gboolean is_down_link(packet_info *pinfo)
proto_register_subtree_array(ett_reg, array_length(ett_reg));
/* Register the WiMax dissector */
- register_dissector("wmx", dissect_wimax, proto_wimax);
+ new_register_dissector("wmx", dissect_wimax, proto_wimax);
wimax_module = prefs_register_protocol(proto_wimax, NULL);
static int hf_wimax_ranging_symbol_offset = -1;
static int hf_wimax_ranging_subchannel_offset = -1;
-static void dissect_wimax_cdma_code_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_wimax_cdma_code_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
gint offset = 0;
proto_item *cdma_item;
/* display the 3rd CDMA Code */
proto_tree_add_item(cdma_tree, hf_wimax_ranging_subchannel_offset, tvb, offset+2, 1, ENC_BIG_ENDIAN);
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax CDMA Protocol */
proto_register_field_array(proto_wimax_cdma_code_decoder, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("wimax_cdma_code_burst_handler", dissect_wimax_cdma_code_decoder, -1);
+ new_register_dissector("wimax_cdma_code_burst_handler", dissect_wimax_cdma_code_decoder, -1);
}
{ 0, NULL }
};
-static void dissect_wimax_fch_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_wimax_fch_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
gint offset = 0;
proto_item *fch_item = NULL;
proto_tree_add_item(fch_tree, hf_fch_dlmap_length, tvb, offset, FCH_BURST_LENGTH, ENC_BIG_ENDIAN);
proto_tree_add_item(fch_tree, hf_fch_reserved_2, tvb, offset, FCH_BURST_LENGTH, ENC_BIG_ENDIAN);
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax FCH Protocol */
proto_register_field_array(proto_wimax_fch_decoder, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("wimax_fch_burst_handler", dissect_wimax_fch_decoder, -1);
+ new_register_dissector("wimax_fch_burst_handler", dissect_wimax_fch_decoder, -1);
}
/*
static gint hf_ffb_value = -1;
-static void dissect_wimax_ffb_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_wimax_ffb_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
gint offset = 0;
guint length, num_of_ffbs, i;
proto_tree_add_item(ffb_tree, hf_ffb_value, tvb, offset++, 1, ENC_BIG_ENDIAN);
}
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax FFB Protocol */
proto_register_field_array(proto_wimax_ffb_decoder, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("wimax_ffb_burst_handler", dissect_wimax_ffb_decoder, -1);
+ new_register_dissector("wimax_ffb_burst_handler", dissect_wimax_ffb_decoder, -1);
}
/*
static gint hf_hack_value = -1;
-static void dissect_wimax_hack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_wimax_hack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
gint offset = 0;
guint length, num_of_hacks, i;
proto_tree_add_item(hack_tree, hf_hack_value, tvb, offset++, 1, ENC_BIG_ENDIAN);
}
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax HARQ ACK Protocol */
proto_wimax_hack_decoder = proto_wimax;
- register_dissector("wimax_hack_burst_handler", dissect_wimax_hack_decoder, -1);
+ new_register_dissector("wimax_hack_burst_handler", dissect_wimax_hack_decoder, -1);
proto_register_field_array(proto_wimax_hack_decoder, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
static int hf_wimax_value_bytes = -1;
-static void dissect_wimax_pdu_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_wimax_pdu_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset;
guint mac_ht, mac_ec;
}
offset += length;
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax PDU Burst Protocol */
proto_wimax_pdu_decoder = proto_wimax;
- register_dissector("wimax_pdu_burst_handler", dissect_wimax_pdu_decoder, -1);
+ new_register_dissector("wimax_pdu_burst_handler", dissect_wimax_pdu_decoder, -1);
proto_register_field_array(proto_wimax_pdu_decoder, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
-static void dissect_wimax_phy_attributes_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_wimax_phy_attributes_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
guint tvb_len;
proto_tree_add_item(phy_tree, hf_phy_attributes_subchannel, tvb, offset++, 1, ENC_BIG_ENDIAN);
}
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax PDU Burst Physical Attributes Protocol */
proto_wimax_phy_attributes_decoder = proto_wimax;
- register_dissector("wimax_phy_attributes_burst_handler", dissect_wimax_phy_attributes_decoder, -1);
+ new_register_dissector("wimax_phy_attributes_burst_handler", dissect_wimax_phy_attributes_decoder, -1);
proto_register_field_array(proto_wimax_phy_attributes_decoder, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));