diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-12-13 03:18:38 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-12-13 03:18:38 +0000 |
commit | c20f75c872ff560b2d7a612c80dc1ce1d2be4331 (patch) | |
tree | 3796da836583fa87bfb67e91757c4fa47801e396 /plugins | |
parent | d64affe0a47c0a5b31687adbd3849648fc206201 (diff) |
Use "int"s, not "guint16"s, as packet offsets (using values shorter
than32 bits risks overflow problems).
Use "gint" for tvbuff lengths.
Use -1 for uses of "tvb_length_remaining()" that mean "the rest of the
tvbuff"; use "tvb_reported_length_remaining()" for "the rest of the
packet.
Clean up the handling of the DOCSIS payload.
svn path=/trunk/; revision=9267
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/docsis/packet-bpkmattr.c | 11 | ||||
-rw-r--r-- | plugins/docsis/packet-bpkmreq.c | 9 | ||||
-rw-r--r-- | plugins/docsis/packet-bpkmrsp.c | 9 | ||||
-rw-r--r-- | plugins/docsis/packet-docsis.c | 53 | ||||
-rw-r--r-- | plugins/docsis/packet-dsaack.c | 9 | ||||
-rw-r--r-- | plugins/docsis/packet-dsareq.c | 9 | ||||
-rw-r--r-- | plugins/docsis/packet-dsarsp.c | 9 | ||||
-rw-r--r-- | plugins/docsis/packet-dscack.c | 9 | ||||
-rw-r--r-- | plugins/docsis/packet-dscreq.c | 9 | ||||
-rw-r--r-- | plugins/docsis/packet-dscrsp.c | 9 | ||||
-rw-r--r-- | plugins/docsis/packet-dsdreq.c | 9 | ||||
-rw-r--r-- | plugins/docsis/packet-dsdrsp.c | 5 | ||||
-rw-r--r-- | plugins/docsis/packet-map.c | 7 | ||||
-rw-r--r-- | plugins/docsis/packet-regack.c | 9 | ||||
-rw-r--r-- | plugins/docsis/packet-regreq.c | 9 | ||||
-rw-r--r-- | plugins/docsis/packet-regrsp.c | 9 | ||||
-rw-r--r-- | plugins/docsis/packet-rngreq.c | 5 | ||||
-rw-r--r-- | plugins/docsis/packet-rngrsp.c | 10 | ||||
-rw-r--r-- | plugins/docsis/packet-tlv.c | 7 | ||||
-rw-r--r-- | plugins/docsis/packet-uccreq.c | 9 | ||||
-rw-r--r-- | plugins/docsis/packet-uccrsp.c | 5 | ||||
-rw-r--r-- | plugins/docsis/packet-ucd.c | 11 | ||||
-rw-r--r-- | plugins/docsis/packet-vendor.c | 9 |
23 files changed, 99 insertions, 141 deletions
diff --git a/plugins/docsis/packet-bpkmattr.c b/plugins/docsis/packet-bpkmattr.c index 827c6a7869..45fe592cea 100644 --- a/plugins/docsis/packet-bpkmattr.c +++ b/plugins/docsis/packet-bpkmattr.c @@ -2,7 +2,7 @@ * Routines for Baseline Privacy Key Management Attributes dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-bpkmattr.c,v 1.6 2003/09/09 07:17:00 guy Exp $ + * $Id: packet-bpkmattr.c,v 1.7 2003/12/13 03:18:37 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -153,8 +153,8 @@ dissect_attrs (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) { guint8 type; guint16 length; - guint16 pos = 0; - guint16 total_len; + int pos = 0; + gint total_len; proto_item *cmid_it, *tekp_it, *scap_it; proto_item *saqry_it, *dnld_it, *sadsc_it; proto_tree *cmid_tree, *tekp_tree, *scap_tree; @@ -162,7 +162,7 @@ dissect_attrs (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) tvbuff_t *cmid_tvb, *tekp_tvb, *scap_tvb; tvbuff_t *saqry_tvb, *dnld_tvb, *sadsc_tvb; - total_len = tvb_length_remaining (tvb, 0); + total_len = tvb_reported_length_remaining (tvb, 0); while (pos < total_len) { type = tvb_get_guint8 (tvb, pos++); @@ -376,8 +376,7 @@ dissect_bpkmattr (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (tree) { it = - proto_tree_add_protocol_format (tree, proto_docsis_bpkmattr, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_bpkmattr, tvb, 0, -1, "BPKM Attributes"); bpkmattr_tree = proto_item_add_subtree (it, ett_docsis_bpkmattr); dissect_attrs (tvb, pinfo, bpkmattr_tree); diff --git a/plugins/docsis/packet-bpkmreq.c b/plugins/docsis/packet-bpkmreq.c index 10d3d8f926..edbadc2b6e 100644 --- a/plugins/docsis/packet-bpkmreq.c +++ b/plugins/docsis/packet-bpkmreq.c @@ -2,7 +2,7 @@ * Routines for Baseline Privacy Key Management Request dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-bpkmreq.c,v 1.5 2003/05/28 14:52:51 gerald Exp $ + * $Id: packet-bpkmreq.c,v 1.6 2003/12/13 03:18:37 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -80,7 +80,6 @@ dissect_bpkmreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) proto_item *it; proto_tree *bpkmreq_tree; guint8 code; - guint16 attrs_len; tvbuff_t *attrs_tvb; code = tvb_get_guint8 (tvb, 0); @@ -95,8 +94,7 @@ dissect_bpkmreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (tree) { it = - proto_tree_add_protocol_format (tree, proto_docsis_bpkmreq, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_bpkmreq, tvb, 0, -1, "BPKM Request Message"); bpkmreq_tree = proto_item_add_subtree (it, ett_docsis_bpkmreq); proto_tree_add_item (bpkmreq_tree, hf_docsis_bpkmreq_code, tvb, 0, 1, @@ -108,8 +106,7 @@ dissect_bpkmreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) } /* Code to Call subdissector */ - attrs_len = tvb_length_remaining (tvb, 4); - attrs_tvb = tvb_new_subset (tvb, 4, attrs_len, attrs_len); + attrs_tvb = tvb_new_subset (tvb, 4, -1, -1); call_dissector (attrs_handle, attrs_tvb, pinfo, tree); diff --git a/plugins/docsis/packet-bpkmrsp.c b/plugins/docsis/packet-bpkmrsp.c index a15c366919..9056d25ef3 100644 --- a/plugins/docsis/packet-bpkmrsp.c +++ b/plugins/docsis/packet-bpkmrsp.c @@ -2,7 +2,7 @@ * Routines for Baseline Privacy Key Management Response dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-bpkmrsp.c,v 1.5 2003/05/28 14:52:51 gerald Exp $ + * $Id: packet-bpkmrsp.c,v 1.6 2003/12/13 03:18:37 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -80,7 +80,6 @@ dissect_bpkmrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) proto_item *it; proto_tree *bpkmrsp_tree; guint8 code; - guint16 attrs_len; tvbuff_t *attrs_tvb; @@ -96,8 +95,7 @@ dissect_bpkmrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (tree) { it = - proto_tree_add_protocol_format (tree, proto_docsis_bpkmrsp, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_bpkmrsp, tvb, 0, -1, "BPKM Response Message"); bpkmrsp_tree = proto_item_add_subtree (it, ett_docsis_bpkmrsp); proto_tree_add_item (bpkmrsp_tree, hf_docsis_bpkmrsp_code, tvb, 0, 1, @@ -109,8 +107,7 @@ dissect_bpkmrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) } /* Code to Call subdissector */ - attrs_len = tvb_length_remaining (tvb, 4); - attrs_tvb = tvb_new_subset (tvb, 4, attrs_len, attrs_len); + attrs_tvb = tvb_new_subset (tvb, 4, -1, -1); call_dissector (attrs_handle, attrs_tvb, pinfo, tree); diff --git a/plugins/docsis/packet-docsis.c b/plugins/docsis/packet-docsis.c index d3aa1ea757..2b3d777db9 100644 --- a/plugins/docsis/packet-docsis.c +++ b/plugins/docsis/packet-docsis.c @@ -2,7 +2,7 @@ * Routines for docsis dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-docsis.c,v 1.16 2003/11/12 23:17:37 guy Exp $ + * $Id: packet-docsis.c,v 1.17 2003/12/13 03:18:37 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -321,7 +321,8 @@ dissect_docsis (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) guint8 hdrlen; guint16 len_sid; tvbuff_t *next_tvb, *mgt_tvb; - guint16 pdulen, captured_length, framelen; + gint pdulen, captured_length; + guint16 framelen; gboolean isfrag = FALSE; /* Set up structures needed to add the protocol subtree and manage it */ @@ -497,33 +498,33 @@ dissect_docsis (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) } /* If this protocol has a sub-dissector call it here, see section 1.8 */ - if ((fctype == FCTYPE_PACKET) && (len_sid > mac_parm)) + switch (fctype) { - next_tvb = tvb_new_subset (tvb, hdrlen, captured_length, pdulen); - call_dissector (eth_handle, next_tvb, pinfo, tree); - if (concatlen > 0) + case FCTYPE_PACKET: + if (pdulen >= 0) { - concatlen = concatlen - framelen; - concatpos += framelen; + if (pdulen > 0) + { + next_tvb = tvb_new_subset (tvb, hdrlen, captured_length, pdulen); + call_dissector (eth_handle, next_tvb, pinfo, tree); + } + if (concatlen > 0) + { + concatlen = concatlen - framelen; + concatpos += framelen; + } } - } - - if ((fctype == FCTYPE_PACKET) && (pdulen == 0)) - { - if (concatlen > 0) - { - concatlen = concatlen - framelen; - concatpos += framelen; - } - } - if (fctype == FCTYPE_MACSPC) - { + break; + case FCTYPE_MACSPC: switch (fcparm) { case 0x00: case 0x01: - mgt_tvb = tvb_new_subset (tvb, hdrlen, captured_length, pdulen); - call_dissector (docsis_mgmt_handle, mgt_tvb, pinfo, tree); + if (pdulen > 0) + { + mgt_tvb = tvb_new_subset (tvb, hdrlen, captured_length, pdulen); + call_dissector (docsis_mgmt_handle, mgt_tvb, pinfo, tree); + } if (concatlen > 0) { concatlen = concatlen - framelen; @@ -537,8 +538,11 @@ dissect_docsis (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) /* For Fragmentation Frames simply dissect using the data * dissector as we don't handle them yet */ - mgt_tvb = tvb_new_subset (tvb, hdrlen, captured_length, pdulen); - call_dissector (data_handle, mgt_tvb, pinfo, tree); + if (pdulen > 0) + { + mgt_tvb = tvb_new_subset (tvb, hdrlen, captured_length, pdulen); + call_dissector (data_handle, mgt_tvb, pinfo, tree); + } if (concatlen > 0) { concatlen = concatlen - framelen; @@ -563,6 +567,7 @@ dissect_docsis (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) col_set_str (pinfo->cinfo, COL_INFO, "Concatenated Frame"); break; } + break; } } diff --git a/plugins/docsis/packet-dsaack.c b/plugins/docsis/packet-dsaack.c index e4a3f194fa..0723fedb5e 100644 --- a/plugins/docsis/packet-dsaack.c +++ b/plugins/docsis/packet-dsaack.c @@ -2,7 +2,7 @@ * Routines for Dynamic Service Addition Acknowledge dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-dsaack.c,v 1.5 2003/05/28 14:52:52 gerald Exp $ + * $Id: packet-dsaack.c,v 1.6 2003/12/13 03:18:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -60,13 +60,11 @@ dissect_dsaack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) proto_item *it; proto_tree *dsaack_tree; guint16 transid; - guint16 tlv_data_len; guint8 response; tvbuff_t *next_tvb; transid = tvb_get_ntohs (tvb, 0); response = tvb_get_guint8 (tvb, 2); - tlv_data_len = tvb_length_remaining (tvb, 3); if (check_col (pinfo->cinfo, COL_INFO)) { @@ -79,8 +77,7 @@ dissect_dsaack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (tree) { it = - proto_tree_add_protocol_format (tree, proto_docsis_dsaack, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_dsaack, tvb, 0, -1, "DSA Acknowledge"); dsaack_tree = proto_item_add_subtree (it, ett_docsis_dsaack); proto_tree_add_item (dsaack_tree, hf_docsis_dsaack_tranid, tvb, 0, 2, @@ -89,7 +86,7 @@ dissect_dsaack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) FALSE); /* Call Dissector for Appendix C TLV's */ - next_tvb = tvb_new_subset (tvb, 3, tlv_data_len, tlv_data_len); + next_tvb = tvb_new_subset (tvb, 3, -1, -1); call_dissector (docsis_tlv_handle, next_tvb, pinfo, dsaack_tree); } } diff --git a/plugins/docsis/packet-dsareq.c b/plugins/docsis/packet-dsareq.c index cf90295b93..8718d9c57c 100644 --- a/plugins/docsis/packet-dsareq.c +++ b/plugins/docsis/packet-dsareq.c @@ -2,7 +2,7 @@ * Routines for Dynamic Service Addition Request dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-dsareq.c,v 1.5 2003/05/28 14:52:52 gerald Exp $ + * $Id: packet-dsareq.c,v 1.6 2003/12/13 03:18:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -56,12 +56,10 @@ dissect_dsareq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) proto_item *it; proto_tree *dsareq_tree; - guint16 tlv_data_len; guint16 transid; tvbuff_t *next_tvb; transid = tvb_get_ntohs (tvb, 0); - tlv_data_len = tvb_length_remaining (tvb, 2); if (check_col (pinfo->cinfo, COL_INFO)) { @@ -73,15 +71,14 @@ dissect_dsareq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (tree) { it = - proto_tree_add_protocol_format (tree, proto_docsis_dsareq, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_dsareq, tvb, 0, -1, "DSA Request"); dsareq_tree = proto_item_add_subtree (it, ett_docsis_dsareq); proto_tree_add_item (dsareq_tree, hf_docsis_dsareq_tranid, tvb, 0, 2, FALSE); /* Call Dissector for Appendix C TLV's */ - next_tvb = tvb_new_subset (tvb, 2, tlv_data_len, tlv_data_len); + next_tvb = tvb_new_subset (tvb, 2, -1, -1); call_dissector (docsis_tlv_handle, next_tvb, pinfo, dsareq_tree); } diff --git a/plugins/docsis/packet-dsarsp.c b/plugins/docsis/packet-dsarsp.c index 17bb066c8b..912646f2f9 100644 --- a/plugins/docsis/packet-dsarsp.c +++ b/plugins/docsis/packet-dsarsp.c @@ -2,7 +2,7 @@ * Routines for Dynamic Service Addition Response dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-dsarsp.c,v 1.5 2003/05/28 14:52:52 gerald Exp $ + * $Id: packet-dsarsp.c,v 1.6 2003/12/13 03:18:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -60,13 +60,11 @@ dissect_dsarsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) proto_item *it; proto_tree *dsarsp_tree; guint16 transid; - guint16 tlv_data_len; guint8 response; tvbuff_t *next_tvb; transid = tvb_get_ntohs (tvb, 0); response = tvb_get_guint8 (tvb, 2); - tlv_data_len = tvb_length_remaining (tvb, 3); if (check_col (pinfo->cinfo, COL_INFO)) { @@ -79,8 +77,7 @@ dissect_dsarsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (tree) { it = - proto_tree_add_protocol_format (tree, proto_docsis_dsarsp, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_dsarsp, tvb, 0, -1, "DSA Response"); dsarsp_tree = proto_item_add_subtree (it, ett_docsis_dsarsp); proto_tree_add_item (dsarsp_tree, hf_docsis_dsarsp_tranid, tvb, 0, 2, @@ -89,7 +86,7 @@ dissect_dsarsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) FALSE); /* Call dissector for Appendix C TLV's */ - next_tvb = tvb_new_subset (tvb, 3, tlv_data_len, tlv_data_len); + next_tvb = tvb_new_subset (tvb, 3, -1, -1); call_dissector (docsis_tlv_handle, next_tvb, pinfo, dsarsp_tree); } diff --git a/plugins/docsis/packet-dscack.c b/plugins/docsis/packet-dscack.c index 21f46e69e6..0934fd32a6 100644 --- a/plugins/docsis/packet-dscack.c +++ b/plugins/docsis/packet-dscack.c @@ -2,7 +2,7 @@ * Routines for Dynamic Service Change Acknowledge dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-dscack.c,v 1.5 2003/05/28 14:52:52 gerald Exp $ + * $Id: packet-dscack.c,v 1.6 2003/12/13 03:18:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -60,13 +60,11 @@ dissect_dscack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) proto_item *it; proto_tree *dscack_tree; guint16 transid; - guint16 tlv_data_len; guint8 response; tvbuff_t *next_tvb; transid = tvb_get_ntohs (tvb, 0); response = tvb_get_guint8 (tvb, 2); - tlv_data_len = tvb_length_remaining (tvb, 3); if (check_col (pinfo->cinfo, COL_INFO)) { @@ -79,8 +77,7 @@ dissect_dscack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (tree) { it = - proto_tree_add_protocol_format (tree, proto_docsis_dscack, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_dscack, tvb, 0, -1, "DSC Acknowledge"); dscack_tree = proto_item_add_subtree (it, ett_docsis_dscack); proto_tree_add_item (dscack_tree, hf_docsis_dscack_tranid, tvb, 0, 2, @@ -88,7 +85,7 @@ dissect_dscack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) proto_tree_add_item (dscack_tree, hf_docsis_dscack_response, tvb, 2, 1, FALSE); /* Call Dissector for Appendix C TLV's */ - next_tvb = tvb_new_subset (tvb, 3, tlv_data_len, tlv_data_len); + next_tvb = tvb_new_subset (tvb, 3, -1, -1); call_dissector (docsis_tlv_handle, next_tvb, pinfo, dscack_tree); } diff --git a/plugins/docsis/packet-dscreq.c b/plugins/docsis/packet-dscreq.c index 8bae0acce1..c422a881f1 100644 --- a/plugins/docsis/packet-dscreq.c +++ b/plugins/docsis/packet-dscreq.c @@ -2,7 +2,7 @@ * Routines for Dynamic Service Change Request dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-dscreq.c,v 1.5 2003/05/28 14:52:52 gerald Exp $ + * $Id: packet-dscreq.c,v 1.6 2003/12/13 03:18:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -56,13 +56,11 @@ dissect_dscreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) proto_item *it; proto_tree *dscreq_tree; - guint16 tlv_data_len; guint16 transid; tvbuff_t *next_tvb; transid = tvb_get_ntohs (tvb, 0); - tlv_data_len = tvb_length_remaining (tvb, 2); if (check_col (pinfo->cinfo, COL_INFO)) { @@ -74,15 +72,14 @@ dissect_dscreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (tree) { it = - proto_tree_add_protocol_format (tree, proto_docsis_dscreq, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_dscreq, tvb, 0, -1, "DSC Request"); dscreq_tree = proto_item_add_subtree (it, ett_docsis_dscreq); proto_tree_add_item (dscreq_tree, hf_docsis_dscreq_tranid, tvb, 0, 2, FALSE); /* Call dissector for Appendix C TLV's */ - next_tvb = tvb_new_subset (tvb, 2, tlv_data_len, tlv_data_len); + next_tvb = tvb_new_subset (tvb, 2, -1, -1); call_dissector (docsis_tlv_handle, next_tvb, pinfo, dscreq_tree); } diff --git a/plugins/docsis/packet-dscrsp.c b/plugins/docsis/packet-dscrsp.c index d5e10c4199..8550717ddb 100644 --- a/plugins/docsis/packet-dscrsp.c +++ b/plugins/docsis/packet-dscrsp.c @@ -2,7 +2,7 @@ * Routines for Dynamic Service Change Response dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-dscrsp.c,v 1.5 2003/05/28 14:52:52 gerald Exp $ + * $Id: packet-dscrsp.c,v 1.6 2003/12/13 03:18:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -60,14 +60,12 @@ dissect_dscrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) proto_item *it; proto_tree *dscrsp_tree; guint16 transid; - guint16 tlv_data_len; guint8 response; tvbuff_t *next_tvb; transid = tvb_get_ntohs (tvb, 0); response = tvb_get_guint8 (tvb, 2); - tlv_data_len = tvb_length_remaining (tvb, 3); if (check_col (pinfo->cinfo, COL_INFO)) { @@ -80,8 +78,7 @@ dissect_dscrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (tree) { it = - proto_tree_add_protocol_format (tree, proto_docsis_dscrsp, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_dscrsp, tvb, 0, -1, "DSC Response"); dscrsp_tree = proto_item_add_subtree (it, ett_docsis_dscrsp); proto_tree_add_item (dscrsp_tree, hf_docsis_dscrsp_tranid, tvb, 0, 2, @@ -90,7 +87,7 @@ dissect_dscrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) FALSE); /* Call Dissector for Appendix C TLV's */ - next_tvb = tvb_new_subset (tvb, 3, tlv_data_len, tlv_data_len); + next_tvb = tvb_new_subset (tvb, 3, -1, -1); call_dissector (docsis_tlv_handle, next_tvb, pinfo, dscrsp_tree); } } diff --git a/plugins/docsis/packet-dsdreq.c b/plugins/docsis/packet-dsdreq.c index 2387d39a08..a4bfefca79 100644 --- a/plugins/docsis/packet-dsdreq.c +++ b/plugins/docsis/packet-dsdreq.c @@ -2,7 +2,7 @@ * Routines for Dynamic Service Delete Request dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-dsdreq.c,v 1.5 2003/05/28 14:52:52 gerald Exp $ + * $Id: packet-dsdreq.c,v 1.6 2003/12/13 03:18:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -59,12 +59,10 @@ dissect_dsdreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) proto_item *it; proto_tree *dsdreq_tree; - guint16 tlv_data_len; guint16 transid; tvbuff_t *next_tvb; transid = tvb_get_ntohs (tvb, 0); - tlv_data_len = tvb_length_remaining (tvb, 8); if (check_col (pinfo->cinfo, COL_INFO)) { @@ -75,8 +73,7 @@ dissect_dsdreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (tree) { it = - proto_tree_add_protocol_format (tree, proto_docsis_dsdreq, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_dsdreq, tvb, 0, -1, "DSD Request"); dsdreq_tree = proto_item_add_subtree (it, ett_docsis_dsdreq); proto_tree_add_item (dsdreq_tree, hf_docsis_dsdreq_tranid, tvb, 0, 2, @@ -87,7 +84,7 @@ dissect_dsdreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) FALSE); /* Call Dissector for Appendix C TLV's */ - next_tvb = tvb_new_subset (tvb, 8, tlv_data_len, tlv_data_len); + next_tvb = tvb_new_subset (tvb, 8, -1, -1); call_dissector (docsis_tlv_handle, next_tvb, pinfo, dsdreq_tree); } } diff --git a/plugins/docsis/packet-dsdrsp.c b/plugins/docsis/packet-dsdrsp.c index fea7a76e20..d910068ec9 100644 --- a/plugins/docsis/packet-dsdrsp.c +++ b/plugins/docsis/packet-dsdrsp.c @@ -2,7 +2,7 @@ * Routines for Dynamic Service Delete Response dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-dsdrsp.c,v 1.5 2003/05/28 14:52:52 gerald Exp $ + * $Id: packet-dsdrsp.c,v 1.6 2003/12/13 03:18:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -75,8 +75,7 @@ dissect_dsdrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (tree) { it = - proto_tree_add_protocol_format (tree, proto_docsis_dsdrsp, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_dsdrsp, tvb, 0, -1, "DSD Response"); dsdrsp_tree = proto_item_add_subtree (it, ett_docsis_dsdrsp); proto_tree_add_item (dsdrsp_tree, hf_docsis_dsdrsp_tranid, tvb, 0, 2, diff --git a/plugins/docsis/packet-map.c b/plugins/docsis/packet-map.c index 2825483557..57a4ae63a5 100644 --- a/plugins/docsis/packet-map.c +++ b/plugins/docsis/packet-map.c @@ -2,7 +2,7 @@ * Routines for MAP Message dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-map.c,v 1.6 2003/05/28 14:52:52 gerald Exp $ + * $Id: packet-map.c,v 1.7 2003/12/13 03:18:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -86,7 +86,7 @@ static void dissect_map (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) { guint8 i, numie; - guint16 pos; + int pos; guint16 sid; guint8 iuc; guint16 offset; @@ -116,8 +116,7 @@ dissect_map (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (tree) { it = - proto_tree_add_protocol_format (tree, proto_docsis_map, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_map, tvb, 0, -1, "MAP Message"); map_tree = proto_item_add_subtree (it, ett_docsis_map); diff --git a/plugins/docsis/packet-regack.c b/plugins/docsis/packet-regack.c index 941d838117..2219b3b921 100644 --- a/plugins/docsis/packet-regack.c +++ b/plugins/docsis/packet-regack.c @@ -2,7 +2,7 @@ * Routines for Registration Acknowledge Message dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-regack.c,v 1.5 2003/05/28 14:52:52 gerald Exp $ + * $Id: packet-regack.c,v 1.6 2003/12/13 03:18:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -60,13 +60,11 @@ dissect_regack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) proto_item *it; proto_tree *regack_tree; guint16 sid; - guint16 tlv_data_len; guint8 response; tvbuff_t *next_tvb; sid = tvb_get_ntohs (tvb, 0); response = tvb_get_guint8 (tvb, 2); - tlv_data_len = tvb_length_remaining (tvb, 3); if (check_col (pinfo->cinfo, COL_INFO)) { @@ -78,8 +76,7 @@ dissect_regack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (tree) { it = - proto_tree_add_protocol_format (tree, proto_docsis_regack, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_regack, tvb, 0, -1, "Registration Acknowledge"); regack_tree = proto_item_add_subtree (it, ett_docsis_regack); proto_tree_add_item (regack_tree, hf_docsis_regack_sid, tvb, 0, 2, @@ -88,7 +85,7 @@ dissect_regack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) FALSE); /* Call Dissector for Appendix C TLV's */ - next_tvb = tvb_new_subset (tvb, 3, tlv_data_len, tlv_data_len); + next_tvb = tvb_new_subset (tvb, 3, -1, -1); call_dissector (docsis_tlv_handle, next_tvb, pinfo, regack_tree); } diff --git a/plugins/docsis/packet-regreq.c b/plugins/docsis/packet-regreq.c index 645b2098a2..065bb97226 100644 --- a/plugins/docsis/packet-regreq.c +++ b/plugins/docsis/packet-regreq.c @@ -2,7 +2,7 @@ * Routines for Registration Request dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-regreq.c,v 1.5 2003/05/28 14:52:52 gerald Exp $ + * $Id: packet-regreq.c,v 1.6 2003/12/13 03:18:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -58,11 +58,9 @@ dissect_regreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) proto_item *it; proto_tree *regreq_tree; guint16 sid; - guint16 tlv_data_len; tvbuff_t *next_tvb; sid = tvb_get_ntohs (tvb, 0); - tlv_data_len = tvb_length_remaining (tvb, 2); if (check_col (pinfo->cinfo, COL_INFO)) { @@ -74,14 +72,13 @@ dissect_regreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (tree) { it = - proto_tree_add_protocol_format (tree, proto_docsis_regreq, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_regreq, tvb, 0, -1, "Registration Request"); regreq_tree = proto_item_add_subtree (it, ett_docsis_regreq); proto_tree_add_item (regreq_tree, hf_docsis_regreq_sid, tvb, 0, 2, FALSE); /* Call Dissector for Appendix C TlV's */ - next_tvb = tvb_new_subset (tvb, 2, tlv_data_len, tlv_data_len); + next_tvb = tvb_new_subset (tvb, 2, -1, -1); call_dissector (docsis_tlv_handle, next_tvb, pinfo, regreq_tree); } diff --git a/plugins/docsis/packet-regrsp.c b/plugins/docsis/packet-regrsp.c index 237cfb9a12..be5fc42544 100644 --- a/plugins/docsis/packet-regrsp.c +++ b/plugins/docsis/packet-regrsp.c @@ -2,7 +2,7 @@ * Routines for Registration Response Message dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-regrsp.c,v 1.6 2003/05/28 14:52:52 gerald Exp $ + * $Id: packet-regrsp.c,v 1.7 2003/12/13 03:18:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -61,13 +61,11 @@ dissect_regrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) proto_item *it; proto_tree *regrsp_tree; guint16 sid; - guint16 tlv_data_len; guint8 response; tvbuff_t *next_tvb; sid = tvb_get_ntohs (tvb, 0); response = tvb_get_guint8 (tvb, 2); - tlv_data_len = tvb_length_remaining (tvb, 3); if (check_col (pinfo->cinfo, COL_INFO)) { @@ -80,8 +78,7 @@ dissect_regrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (tree) { it = - proto_tree_add_protocol_format (tree, proto_docsis_regrsp, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_regrsp, tvb, 0, -1, "Registration Response"); regrsp_tree = proto_item_add_subtree (it, ett_docsis_regrsp); proto_tree_add_item (regrsp_tree, hf_docsis_regrsp_sid, tvb, 0, 2, @@ -89,7 +86,7 @@ dissect_regrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) proto_tree_add_item (regrsp_tree, hf_docsis_regrsp_response, tvb, 2, 1, FALSE); /* Call Dissector for Appendix C TLV's */ - next_tvb = tvb_new_subset (tvb, 3, tlv_data_len, tlv_data_len); + next_tvb = tvb_new_subset (tvb, 3, -1, -1); call_dissector (docsis_tlv_handle, next_tvb, pinfo, regrsp_tree); } diff --git a/plugins/docsis/packet-rngreq.c b/plugins/docsis/packet-rngreq.c index b1ece1811b..ed31fbba2a 100644 --- a/plugins/docsis/packet-rngreq.c +++ b/plugins/docsis/packet-rngreq.c @@ -2,7 +2,7 @@ * Routines for Ranging Request Message dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-rngreq.c,v 1.5 2003/05/28 14:52:52 gerald Exp $ + * $Id: packet-rngreq.c,v 1.6 2003/12/13 03:18:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -76,8 +76,7 @@ dissect_rngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (tree) { it = - proto_tree_add_protocol_format (tree, proto_docsis_rngreq, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_rngreq, tvb, 0, -1, "Ranging Request"); rngreq_tree = proto_item_add_subtree (it, ett_docsis_rngreq); proto_tree_add_item (rngreq_tree, hf_docsis_rngreq_sid, tvb, 0, 2, diff --git a/plugins/docsis/packet-rngrsp.c b/plugins/docsis/packet-rngrsp.c index c8d5517d29..24dbb53f67 100644 --- a/plugins/docsis/packet-rngrsp.c +++ b/plugins/docsis/packet-rngrsp.c @@ -2,7 +2,7 @@ * Routines for Ranging Response Message dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-rngrsp.c,v 1.5 2003/05/28 14:52:52 gerald Exp $ + * $Id: packet-rngrsp.c,v 1.6 2003/12/13 03:18:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -133,7 +133,8 @@ dissect_rngrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) proto_item *it; proto_tree *rngrsp_tree; guint8 tlvtype, tlvlen; - guint16 pos, length; + int pos; + gint length; guint8 upchid; guint16 sid; gint8 pwr; @@ -158,8 +159,7 @@ dissect_rngrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (tree) { it = - proto_tree_add_protocol_format (tree, proto_docsis_rngrsp, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_rngrsp, tvb, 0, -1, "Ranging Response"); rngrsp_tree = proto_item_add_subtree (it, ett_docsis_rngrsp); proto_tree_add_item (rngrsp_tree, hf_docsis_rngrsp_sid, tvb, 0, 2, @@ -167,7 +167,7 @@ dissect_rngrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) proto_tree_add_item (rngrsp_tree, hf_docsis_rngrsp_upstream_chid, tvb, 2, 1, FALSE); - length = tvb_length_remaining (tvb, 0); + length = tvb_reported_length_remaining (tvb, 0); pos = 3; while (pos < length) { diff --git a/plugins/docsis/packet-tlv.c b/plugins/docsis/packet-tlv.c index 319ba43602..ce0d8bd79d 100644 --- a/plugins/docsis/packet-tlv.c +++ b/plugins/docsis/packet-tlv.c @@ -2,7 +2,7 @@ * Routines to Dissect Appendix C TLV's * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-tlv.c,v 1.15 2003/12/13 02:38:33 guy Exp $ + * $Id: packet-tlv.c,v 1.16 2003/12/13 03:18:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1783,14 +1783,13 @@ dissect_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree) proto_item *it; proto_tree *tlv_tree; - guint16 total_len; int pos = 0; + gint total_len; guint8 type, length; guint16 x; tvbuff_t *vsif_tvb; - total_len = tvb_length_remaining (tvb, 0); - + total_len = tvb_reported_length_remaining (tvb, 0); if (tree) { diff --git a/plugins/docsis/packet-uccreq.c b/plugins/docsis/packet-uccreq.c index 353da0a9af..e19335c32b 100644 --- a/plugins/docsis/packet-uccreq.c +++ b/plugins/docsis/packet-uccreq.c @@ -2,7 +2,7 @@ * Routines for Upstream Channel Change Request dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-uccreq.c,v 1.5 2003/05/28 14:52:52 gerald Exp $ + * $Id: packet-uccreq.c,v 1.6 2003/12/13 03:18:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -56,12 +56,10 @@ dissect_uccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) proto_item *it; proto_tree *uccreq_tree; - guint16 tlv_data_len; guint8 chid; tvbuff_t *next_tvb; chid = tvb_get_guint8 (tvb, 0); - tlv_data_len = tvb_length_remaining (tvb, 1); if (check_col (pinfo->cinfo, COL_INFO)) { @@ -74,15 +72,14 @@ dissect_uccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (tree) { it = - proto_tree_add_protocol_format (tree, proto_docsis_uccreq, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_uccreq, tvb, 0, -1, "UCC Request"); uccreq_tree = proto_item_add_subtree (it, ett_docsis_uccreq); proto_tree_add_item (uccreq_tree, hf_docsis_uccreq_upchid, tvb, 0, 1, FALSE); /* call dissector for Appendix C TLV's */ - next_tvb = tvb_new_subset (tvb, 1, tlv_data_len, tlv_data_len); + next_tvb = tvb_new_subset (tvb, 1, -1, -1); call_dissector (docsis_tlv_handle, next_tvb, pinfo, uccreq_tree); } diff --git a/plugins/docsis/packet-uccrsp.c b/plugins/docsis/packet-uccrsp.c index ff03269a23..e2b54f1aea 100644 --- a/plugins/docsis/packet-uccrsp.c +++ b/plugins/docsis/packet-uccrsp.c @@ -2,7 +2,7 @@ * Routines for Upstream Channel Change Response dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-uccrsp.c,v 1.5 2003/05/28 14:52:52 gerald Exp $ + * $Id: packet-uccrsp.c,v 1.6 2003/12/13 03:18:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -70,8 +70,7 @@ dissect_uccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (tree) { it = - proto_tree_add_protocol_format (tree, proto_docsis_uccrsp, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_uccrsp, tvb, 0, -1, "UCC Response"); uccrsp_tree = proto_item_add_subtree (it, ett_docsis_uccrsp); proto_tree_add_item (uccrsp_tree, hf_docsis_uccrsp_upchid, tvb, 0, 1, diff --git a/plugins/docsis/packet-ucd.c b/plugins/docsis/packet-ucd.c index 6a6680bd36..fa3c039a81 100644 --- a/plugins/docsis/packet-ucd.c +++ b/plugins/docsis/packet-ucd.c @@ -2,7 +2,7 @@ * Routines for UCD Message dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-ucd.c,v 1.6 2003/09/09 06:59:35 guy Exp $ + * $Id: packet-ucd.c,v 1.7 2003/12/13 03:18:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -151,17 +151,17 @@ static const value_string last_cw_len_vals[] = { static void dissect_ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) { - guint16 pos, endtlvpos; + int pos, endtlvpos; guint8 type, length; guint8 tlvlen, tlvtype; proto_tree *ucd_tree; proto_item *ucd_item; proto_tree *tlv_tree; proto_item *tlv_item; - guint16 len; + gint len; guint8 upchid, symrate; - len = tvb_length_remaining (tvb, 0); + len = tvb_reported_length_remaining (tvb, 0); upchid = tvb_get_guint8 (tvb, 0); /* if the upstream Channel ID is 0 then this is for Telephony Return) */ @@ -181,8 +181,7 @@ dissect_ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (tree) { ucd_item = - proto_tree_add_protocol_format (tree, proto_docsis_ucd, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_ucd, tvb, 0, -1, "UCD Message"); ucd_tree = proto_item_add_subtree (ucd_item, ett_docsis_ucd); proto_tree_add_item (ucd_tree, hf_docsis_ucd_upstream_chid, tvb, 0, 1, diff --git a/plugins/docsis/packet-vendor.c b/plugins/docsis/packet-vendor.c index 185fd4bf25..93b5bb58d4 100644 --- a/plugins/docsis/packet-vendor.c +++ b/plugins/docsis/packet-vendor.c @@ -2,7 +2,7 @@ * Routines for Vendor Specific Encodings dissection * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org> * - * $Id: packet-vendor.c,v 1.5 2003/12/13 02:45:30 guy Exp $ + * $Id: packet-vendor.c,v 1.6 2003/12/13 03:18:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -110,8 +110,8 @@ dissect_vsif (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree) guint32 value; gint vsif_len; -/* get the total length of the VSIF TLV */ - vsif_len = tvb_length_remaining (tvb, 0); +/* get the reported length of the VSIF TLV */ + vsif_len = tvb_reported_length_remaining (tvb, 0); /* The first TLV in the VSIF encodings must be type 0x08 (Vendor ID) and * length 3. @@ -133,8 +133,7 @@ dissect_vsif (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree) if (tree) { it = - proto_tree_add_protocol_format (tree, proto_docsis_vsif, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_vsif, tvb, 0, -1, "VSIF Encodings"); vsif_tree = proto_item_add_subtree (it, ett_docsis_vsif); proto_tree_add_item (vsif_tree, hf_docsis_vsif_vendorid, tvb, 2, 3, FALSE); |