git.samba.org
/
obnox
/
wireshark
/
wip.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From Didier Gautheron:
[obnox/wireshark/wip.git]
/
plugins
/
docsis
/
packet-uccreq.c
diff --git
a/plugins/docsis/packet-uccreq.c
b/plugins/docsis/packet-uccreq.c
index 353da0a9af01733f44678405efbb535f73bdecb6..ba5aa253841a00caef586900a825bb242cfc327b 100644
(file)
--- a/
plugins/docsis/packet-uccreq.c
+++ b/
plugins/docsis/packet-uccreq.c
@@
-2,10
+2,10
@@
* Routines for Upstream Channel Change Request dissection
* Copyright 2002, Anand V. Narwani <anand[AT]narwani.org>
*
* 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$
*
*
- *
Ethereal
- Network traffic analyzer
- * By Gerald Combs <gerald@
ethereal.com
>
+ *
Wireshark
- Network traffic analyzer
+ * By Gerald Combs <gerald@
wireshark.org
>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
@@
-27,16
+27,6
@@
# include "config.h"
#endif
# include "config.h"
#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
-#include "moduleinfo.h"
-
-#include <gmodule.h>
-
#include <epan/packet.h>
/* Initialize the protocol and registered fields */
#include <epan/packet.h>
/* Initialize the protocol and registered fields */
@@
-55,13
+45,11
@@
dissect_uccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
proto_item *it;
{
proto_item *it;
- proto_tree *uccreq_tree;
- guint16 tlv_data_len;
+ proto_tree *uccreq_tree = NULL;
guint8 chid;
tvbuff_t *next_tvb;
chid = tvb_get_guint8 (tvb, 0);
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))
{
if (check_col (pinfo->cinfo, COL_INFO))
{
@@
-74,17
+62,16
@@
dissect_uccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
if (tree)
{
it =
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);
"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);
- call_dissector (docsis_tlv_handle, next_tvb, pinfo, uccreq_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);
}
}
@@
-92,7
+79,7
@@
dissect_uccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
-/* Register the protocol with
Ethereal
*/
+/* Register the protocol with
Wireshark
*/
/* this format is require because a script is used to build the C function
that calls all the protocol registration.
/* this format is require because a script is used to build the C function
that calls all the protocol registration.
@@
-106,14
+93,14
@@
proto_register_docsis_uccreq (void)
/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_uccreq,
/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_uccreq,
- {"Upstream Channel Change Request", "docsis
.
uccreq",
- FT_BYTES, BASE_
HEX
, NULL, 0x0,
-
"Upstream Channel Change Request"
, HFILL}
+ {"Upstream Channel Change Request", "docsis
_
uccreq",
+ FT_BYTES, BASE_
NONE
, NULL, 0x0,
+
NULL
, HFILL}
},
{&hf_docsis_uccreq_upchid,
},
{&hf_docsis_uccreq_upchid,
- {"Upstream Channel Id", "docsis
.
uccreq.upchid",
+ {"Upstream Channel Id", "docsis
_
uccreq.upchid",
FT_UINT8, BASE_DEC, NULL, 0x0,
FT_UINT8, BASE_DEC, NULL, 0x0,
-
"Upstream Channel Id"
, HFILL}
+
NULL
, HFILL}
},
};
},
};