register_dissector -> new_register_dissector for plugins.

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>
This commit is contained in:
Michael Mann 2015-11-14 15:11:44 -05:00
parent 28ea58251c
commit 159227a14b
60 changed files with 246 additions and 183 deletions

View File

@ -41,8 +41,8 @@ static int hf_docsis_bintrngreq_capflags_encrypt = -1;
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;
@ -76,6 +76,7 @@ dissect_bintrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * 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 */
@ -126,7 +127,7 @@ proto_register_docsis_bintrngreq (void)
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

View File

@ -339,8 +339,8 @@ dissect_attrs (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
} /* 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;
@ -354,6 +354,7 @@ dissect_bpkmattr (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
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 */
@ -533,7 +534,7 @@ proto_register_docsis_bpkmattr (void)
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);
}

View File

@ -60,8 +60,8 @@ static gint ett_docsis_bpkmreq = -1;
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;
@ -89,6 +89,7 @@ dissect_bpkmreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * 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 */
@ -124,7 +125,7 @@ proto_register_docsis_bpkmreq (void)
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);
}

View File

@ -60,8 +60,8 @@ static gint ett_docsis_bpkmrsp = -1;
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;
@ -90,6 +90,7 @@ dissect_bpkmrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * 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 */
@ -126,7 +127,7 @@ proto_register_docsis_bpkmrsp (void)
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);
}

View File

@ -37,8 +37,8 @@ static dissector_handle_t cmctrl_tlv_handle;
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;
@ -63,6 +63,7 @@ dissect_cmctrlreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
/* 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 */
@ -88,7 +89,7 @@ proto_register_docsis_cmctrlreq (void)
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

View File

@ -45,8 +45,8 @@ static dissector_handle_t cmctrl_tlv_handle;
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;
@ -71,6 +71,7 @@ dissect_cmctrlrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
/* 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 */
@ -96,7 +97,7 @@ proto_register_docsis_cmctrlrsp (void)
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

View File

@ -134,8 +134,8 @@ dissect_cmstatus_tlv (tvbuff_t * tvb, proto_tree * tree, guint8 start, guint16 l
} /* 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;
@ -199,6 +199,7 @@ dissect_cmstatus (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
}
/* Call Dissector TLV's */
dissect_cmstatus_tlv(tvb, cmstatus_tree, 3, len);
return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
@ -264,7 +265,7 @@ static gint *ett[] = {
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

View File

@ -37,8 +37,8 @@ static dissector_handle_t docsis_tlv_handle;
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;
@ -62,6 +62,7 @@ dissect_dbcack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
/* 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 */
@ -87,7 +88,7 @@ proto_register_docsis_dbcack (void)
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

View File

@ -39,8 +39,8 @@ static dissector_handle_t docsis_tlv_handle;
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;
@ -68,6 +68,7 @@ dissect_dbcreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
/* 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 */
@ -103,7 +104,7 @@ proto_register_docsis_dbcreq (void)
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

View File

@ -40,8 +40,8 @@ static dissector_handle_t docsis_tlv_handle;
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;
@ -70,6 +70,7 @@ dissect_dbcrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
/* 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 */
@ -100,7 +101,7 @@ proto_register_docsis_dbcrsp (void)
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);
}

View File

@ -43,8 +43,8 @@ static int hf_docsis_dccack_hmac_digest = -1;
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;
@ -97,6 +97,7 @@ dissect_dccack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
pos = pos + length;
} /* while (pos < len) */
} /* if (tree) */
return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
@ -145,7 +146,7 @@ proto_register_docsis_dccack (void)
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

View File

@ -253,8 +253,8 @@ dissect_dccreq_sf_sub (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len
}
}
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;
@ -364,6 +364,7 @@ dissect_dccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
pos = pos + length;
} /* while (pos < len) */
} /* if (tree) */
return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
@ -576,7 +577,7 @@ proto_register_docsis_dccreq (void)
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

View File

@ -99,8 +99,8 @@ dissect_dccrsp_cm_jump_time (tvbuff_t * tvb, proto_tree * tree, int start, guint
}
}
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;
@ -158,6 +158,7 @@ dissect_dccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
} /* while (pos < len) */
} /* if (tree) */
return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
@ -234,7 +235,7 @@ proto_register_docsis_dccrsp (void)
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

View File

@ -509,8 +509,8 @@ dissect_dcd_down_classifier (tvbuff_t * tvb, proto_tree * tree, int start, guint
}
}
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;
@ -554,6 +554,7 @@ dissect_dcd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
} /* while (pos < len) */
} /* if (tree) */
return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
@ -842,7 +843,7 @@ proto_register_docsis_dcd (void)
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

View File

@ -336,8 +336,8 @@ dissect_ehdr (tvbuff_t * tvb, proto_tree * tree, gboolean isfrag)
}
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;
@ -616,6 +616,7 @@ dissect_docsis (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
}
break;
}
return tvb_captured_length(tvb);
}
@ -828,7 +829,7 @@ proto_register_docsis (void)
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

View File

@ -44,8 +44,8 @@ static int hf_docsis_dpvreq_ts_end = -1;
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;
@ -84,6 +84,7 @@ dissect_dpvreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
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 */
@ -149,7 +150,7 @@ proto_register_docsis_dpvreq (void)
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

View File

@ -44,8 +44,8 @@ static int hf_docsis_dpvrsp_ts_end = -1;
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;
@ -84,6 +84,7 @@ dissect_dpvrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
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 */
@ -149,7 +150,7 @@ proto_register_docsis_dpvrsp (void)
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

View File

@ -40,8 +40,8 @@ static gint ett_docsis_dsaack = -1;
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;
@ -71,6 +71,7 @@ dissect_dsaack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
/* 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 */
@ -101,7 +102,7 @@ proto_register_docsis_dsaack (void)
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

View File

@ -37,8 +37,8 @@ static dissector_handle_t docsis_tlv_handle;
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;
@ -63,6 +63,7 @@ dissect_dsareq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
/* 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 */
@ -88,7 +89,7 @@ proto_register_docsis_dsareq (void)
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

View File

@ -40,8 +40,8 @@ static gint ett_docsis_dsarsp = -1;
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;
@ -71,6 +71,7 @@ dissect_dsarsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
/* 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 */
@ -101,7 +102,7 @@ proto_register_docsis_dsarsp (void)
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

View File

@ -40,8 +40,8 @@ static gint ett_docsis_dscack = -1;
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;
@ -70,6 +70,7 @@ dissect_dscack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
/* 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 */
@ -100,7 +101,7 @@ proto_register_docsis_dscack (void)
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

View File

@ -37,8 +37,8 @@ static dissector_handle_t docsis_tlv_handle;
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;
@ -63,6 +63,7 @@ dissect_dscreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
/* 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 */
@ -88,7 +89,7 @@ proto_register_docsis_dscreq (void)
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

View File

@ -40,8 +40,8 @@ static gint ett_docsis_dscrsp = -1;
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;
@ -71,6 +71,7 @@ dissect_dscrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
/* 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 */
@ -101,7 +102,7 @@ proto_register_docsis_dscrsp (void)
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

View File

@ -40,8 +40,8 @@ static dissector_handle_t docsis_tlv_handle;
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;
@ -69,6 +69,7 @@ dissect_dsdreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
/* 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 */
@ -104,7 +105,7 @@ proto_register_docsis_dsdreq (void)
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

View File

@ -40,8 +40,8 @@ extern value_string docsis_conf_code[];
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;
@ -69,6 +69,7 @@ dissect_dsdrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
ENC_BIG_ENDIAN);
}
return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
@ -104,7 +105,7 @@ proto_register_docsis_dsdrsp (void)
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

View File

@ -38,8 +38,8 @@ void proto_reg_handoff_docsis_intrngreq(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;
@ -63,6 +63,7 @@ dissect_intrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * 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 */
@ -99,7 +100,7 @@ proto_register_docsis_intrngreq (void)
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

View File

@ -143,8 +143,8 @@ static const value_string mgmt_type_vals[] = {
};
/* 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;
@ -192,11 +192,10 @@ dissect_macmgmt (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
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 */
@ -268,7 +267,7 @@ proto_register_docsis_mgmt (void)
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

View File

@ -67,8 +67,8 @@ static gint ett_docsis_map = -1;
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;
@ -153,6 +153,7 @@ dissect_map (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
pos = pos + 4;
} /* for... */
} /* if(tree) */
return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
@ -244,7 +245,7 @@ proto_register_docsis_map (void)
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

View File

@ -298,8 +298,8 @@ static gint ett_tlv = -1;
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;
@ -522,6 +522,7 @@ dissect_mdd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
pos += length + 2;
}
} /* if(tree) */
return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
@ -734,7 +735,7 @@ void proto_register_docsis_mdd (void)
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

View File

@ -41,8 +41,8 @@ extern value_string docsis_conf_code[];
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;
@ -71,6 +71,7 @@ dissect_regack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
/* 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 */
@ -101,7 +102,7 @@ proto_register_docsis_regack (void)
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

View File

@ -39,8 +39,8 @@ static gint ett_docsis_regreq = -1;
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;
@ -64,6 +64,7 @@ dissect_regreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
/* 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 */
@ -89,7 +90,7 @@ proto_register_docsis_regreq (void)
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

View File

@ -44,8 +44,8 @@ static dissector_handle_t docsis_tlv_handle;
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;
@ -66,6 +66,7 @@ dissect_regreqmp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
/* 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 */
@ -101,7 +102,7 @@ proto_register_docsis_regreqmp (void)
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

View File

@ -41,8 +41,8 @@ extern value_string docsis_conf_code[];
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;
@ -71,6 +71,7 @@ dissect_regrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
/* 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 */
@ -101,7 +102,7 @@ proto_register_docsis_regrsp (void)
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

View File

@ -46,8 +46,8 @@ static dissector_handle_t docsis_tlv_handle;
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;
@ -69,6 +69,7 @@ dissect_regrspmp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
/* 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 */
@ -109,7 +110,7 @@ proto_register_docsis_regrspmp (void)
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

View File

@ -38,8 +38,8 @@ static int hf_docsis_rngreq_pend_compl = -1;
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;
@ -66,6 +66,7 @@ dissect_rngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * 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 */
@ -102,7 +103,7 @@ proto_register_docsis_rngreq (void)
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

View File

@ -60,8 +60,8 @@ static const value_string rng_stat_vals[] = {
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;
@ -179,6 +179,7 @@ dissect_rngrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
pos = pos + tlvlen;
} /* while (pos < length) */
} /* if (tree) */
return tvb_captured_length(tvb);
}
@ -259,7 +260,7 @@ proto_register_docsis_rngrsp (void)
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);
}

View File

@ -37,8 +37,8 @@ static int hf_docsis_sync_cmts_timestamp = -1;
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;
@ -53,6 +53,7 @@ dissect_sync (tvbuff_t * tvb, packet_info * pinfo, proto_tree * 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 */
@ -79,7 +80,7 @@ proto_register_docsis_sync (void)
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

View File

@ -153,8 +153,8 @@ dissect_us_event(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
} /* 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;
@ -248,6 +248,7 @@ dissect_cmctrl_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
} /* switch */
pos = pos + length;
} /* while */
return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
@ -326,7 +327,7 @@ proto_register_cmctrl_tlv (void)
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

View File

@ -3822,8 +3822,8 @@ dissect_cmts_mc_sess_enc(tvbuff_t * tvb, proto_tree *tree, int start, guint16 le
}
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;
@ -4262,6 +4262,7 @@ dissect_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
} /* while (pos < total_len) */
} /*if (tree) */
return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
@ -5945,7 +5946,7 @@ proto_register_docsis_tlv (void)
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

View File

@ -190,8 +190,8 @@ static const value_string last_cw_len_vals[] = {
};
/* 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;
@ -805,6 +805,8 @@ dissect_type29ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
} /* switch(type) */
} /* while (pos < len) */
} /* if (tree) */
return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
@ -1032,7 +1034,7 @@ proto_register_docsis_type29ucd (void)
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

View File

@ -37,8 +37,8 @@ static dissector_handle_t docsis_tlv_handle;
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;
@ -64,6 +64,7 @@ dissect_uccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
/* 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 */
@ -89,7 +90,7 @@ proto_register_docsis_uccreq (void)
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

View File

@ -36,8 +36,8 @@ static int hf_docsis_uccrsp_upchid = -1;
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;
@ -58,6 +58,8 @@ dissect_uccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * 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 */
@ -83,7 +85,7 @@ proto_register_docsis_uccrsp (void)
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

View File

@ -155,8 +155,8 @@ static const value_string last_cw_len_vals[] = {
};
/* 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;
@ -633,6 +633,8 @@ dissect_ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
} /* switch(type) */
} /* while (pos < len) */
} /* if (tree) */
return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
@ -794,7 +796,7 @@ proto_register_docsis_ucd (void)
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

View File

@ -74,8 +74,8 @@ static void dissect_cisco (tvbuff_t * tvb, proto_tree * tree,
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;
@ -128,7 +128,7 @@ dissect_vsif (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
} /* if(tree) */
return tvb_captured_length(tvb);
}
/* Dissector for Cisco Vendor Specific TLV's */
@ -254,7 +254,7 @@ proto_register_docsis_vsif (void)
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

View File

@ -1168,7 +1168,7 @@ static void dissect_ecat_foe(tvbuff_t *tvb, gint offset, packet_info *pinfo, pro
}
}
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;
@ -1249,6 +1249,7 @@ static void dissect_ecat_mailbox(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
col_append_str(pinfo->cinfo, COL_INFO, ")");
}
}
return tvb_captured_length(tvb);
}
void proto_register_ecat_mailbox(void)
@ -1941,7 +1942,7 @@ 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)

View File

@ -171,8 +171,8 @@ static guint16 flags_to_port(guint16 flagsValue) {
}
/*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;
@ -199,6 +199,7 @@ dissect_esl_header(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *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
@ -277,7 +278,7 @@ dissect_esl_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
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);
@ -294,7 +295,7 @@ dissect_esl_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
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;
@ -353,7 +354,7 @@ proto_register_esl(void) {
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

View File

@ -63,7 +63,7 @@ static const value_string ethercat_frame_reserved_vals[] =
};
/* 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;
@ -99,6 +99,7 @@ static void dissect_ethercat_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree
data instead. */
call_dissector (ethercat_frame_data_handle, next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
void proto_register_ethercat_frame(void)
@ -134,7 +135,7 @@ 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. */

View File

@ -1853,7 +1853,7 @@ static void dissect_irlap(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root)
/*
* 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";
@ -1862,11 +1862,12 @@ static void dissect_irda(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root)
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);
}
@ -2203,7 +2204,7 @@ void proto_register_irda(void)
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));

View File

@ -123,8 +123,8 @@ checksum_data(tvbuff_t *tvb, proto_tree *tree)
/** 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;
@ -140,7 +140,7 @@ dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root)
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;
@ -171,6 +171,7 @@ dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root)
}
offset = eof_offset + 1;
}
return tvb_captured_length(tvb);
}
@ -228,7 +229,7 @@ proto_register_irsir(void)
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));

View File

@ -87,7 +87,7 @@ static int hf_aas_beam_cinr_value = -1;
#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;
@ -106,10 +106,11 @@ static void dissect_mac_mgmt_msg_aas_beam_select_decoder(tvbuff_t *tvb, packet_i
/* 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;
@ -140,9 +141,10 @@ static void dissect_mac_mgmt_msg_aas_beam_req_decoder(tvbuff_t *tvb, packet_info
/* 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;
@ -204,6 +206,7 @@ static void dissect_mac_mgmt_msg_aas_beam_rsp_decoder(tvbuff_t *tvb, packet_info
/* 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
@ -320,10 +323,10 @@ void proto_register_mac_mgmt_msg_aas_beam(void)
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
}
@ -332,7 +335,7 @@ proto_reg_handoff_mac_mgmt_msg_aas_beam(void)
{
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);
}

View File

@ -72,7 +72,7 @@ static void dissect_mac_mgmt_msg_dsc_req_decoder(tvbuff_t *tvb, packet_info *pin
}
}
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;
@ -96,6 +96,7 @@ static void dissect_mac_mgmt_msg_dsc_rsp_decoder(tvbuff_t *tvb, packet_info *pin
/* 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)
@ -163,7 +164,7 @@ void proto_register_mac_mgmt_msg_dsc(void)
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
@ -174,7 +175,7 @@ proto_reg_handoff_mac_mgmt_msg_dsc(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);

View File

@ -72,7 +72,7 @@ static const value_string vals_reg_rsp_status [] = {
/* 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;
@ -260,6 +260,7 @@ static void dissect_mac_mgmt_msg_reg_rsp_decoder(tvbuff_t *tvb, packet_info *pin
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 */
@ -351,7 +352,7 @@ void proto_register_mac_mgmt_msg_reg_rsp(void)
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)
@ -360,7 +361,7 @@ 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);
}

View File

@ -1083,7 +1083,7 @@ static void dissect_mac_mgmt_msg_sbc_req_decoder(tvbuff_t *tvb, packet_info *pin
}
/* 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;
@ -1134,6 +1134,7 @@ static void dissect_mac_mgmt_msg_sbc_rsp_decoder(tvbuff_t *tvb, packet_info *pin
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 */
@ -2817,7 +2818,7 @@ void proto_register_mac_mgmt_msg_sbc(void)
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
@ -2828,7 +2829,7 @@ proto_reg_handoff_mac_mgmt_msg_sbc(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);
}

View File

@ -254,12 +254,14 @@ proto_tree *add_protocol_subtree(tlv_info_t *self, gint idx, proto_tree *tree, i
/* 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)
@ -306,7 +308,7 @@ void proto_register_wimax(void)
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);

View File

@ -39,7 +39,7 @@ static int hf_wimax_ranging_code = -1;
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;
@ -60,6 +60,7 @@ static void dissect_wimax_cdma_code_decoder(tvbuff_t *tvb, packet_info *pinfo, p
/* 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 */
@ -110,7 +111,7 @@ void proto_register_wimax_cdma(void)
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);
}

View File

@ -98,7 +98,7 @@ static const value_string coding_indications[] =
{ 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;
@ -131,6 +131,7 @@ static void dissect_wimax_fch_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t
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 */
@ -241,7 +242,7 @@ void proto_register_wimax_fch(void)
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);
}
/*

View File

@ -45,7 +45,7 @@ static gint hf_ffb_symboloffset = -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;
@ -76,6 +76,7 @@ static void dissect_wimax_ffb_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t
proto_tree_add_item(ffb_tree, hf_ffb_value, tvb, offset++, 1, ENC_BIG_ENDIAN);
}
}
return tvb_captured_length(tvb);
}
/* Register Wimax FFB Protocol */
@ -124,7 +125,7 @@ void proto_register_wimax_ffb(void)
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);
}
/*

View File

@ -59,7 +59,7 @@ static gint hf_hack_symboloffset = -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;
@ -89,6 +89,7 @@ static void dissect_wimax_hack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_
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 */
@ -133,7 +134,7 @@ void proto_register_wimax_hack(void)
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));

View File

@ -64,7 +64,7 @@ static gint ett_wimax_pdu_decoder = -1;
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;
@ -212,6 +212,7 @@ static void dissect_wimax_pdu_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t
}
offset += length;
}
return tvb_captured_length(tvb);
}
/* Register Wimax PDU Burst Protocol */
@ -238,7 +239,7 @@ void proto_register_wimax_pdu(void)
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));
}

View File

@ -77,7 +77,7 @@ static gint hf_phy_attributes_subchannel = -1;
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;
@ -120,6 +120,7 @@ static void dissect_wimax_phy_attributes_decoder(tvbuff_t *tvb, packet_info *pin
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 */
@ -170,7 +171,7 @@ void proto_register_wimax_phy_attributes(void)
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));