diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-07-12 22:52:43 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-07-12 22:52:43 +0000 |
commit | 8a9b35cb5e016f8e5936d0dd48d9edc6fb64d57a (patch) | |
tree | eadbf839094b44e673f74473d5ba252222011f2e /packet-frame.c | |
parent | 8f7a0ba2e1353235de78266c82789187b488d3d1 (diff) |
From Anand V. Narwani:
DOCSIS support, including support for "Ethernet" captures where
the raw frame is a DOCSIS frame rather than an Ethernet
frame (some Cisco cable-modem head-end gear can send out a
trace of all traffic on an Ethernet, but what it sends are
the raw bytes of DOCSIS frames, not Ethernet frames)
Get rid of second AUTHORS entry for Devin Heitmueller, merging its item
into the older entry.
Clean up the order of some lists of plugin items.
svn path=/trunk/; revision=5861
Diffstat (limited to 'packet-frame.c')
-rw-r--r-- | packet-frame.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/packet-frame.c b/packet-frame.c index c8f7ed68ce..40c2d458aa 100644 --- a/packet-frame.c +++ b/packet-frame.c @@ -2,7 +2,7 @@ * * Top-most dissector. Decides dissector based on Wiretap Encapsulation Type. * - * $Id: packet-frame.c,v 1.26 2002/05/04 20:57:18 guy Exp $ + * $Id: packet-frame.c,v 1.27 2002/07/12 22:52:33 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -52,9 +52,11 @@ static int proto_unreassembled = -1; static gint ett_frame = -1; static dissector_handle_t data_handle; +static dissector_handle_t docsis_handle; /* Preferences */ static gboolean show_file_off = FALSE; +static gboolean force_docsis_encap; static const value_string p2p_dirs[] = { { P2P_DIR_SENT, "Sent" }, @@ -93,6 +95,10 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } + if ((force_docsis_encap) && (docsis_handle)) { + pinfo->fd->lnk_t = WTAP_ENCAP_DOCSIS; + } + /* Put in frame header information. */ if (tree) { @@ -278,10 +284,13 @@ proto_register_frame(void) frame_module = prefs_register_protocol(proto_frame, NULL); prefs_register_bool_preference(frame_module, "show_file_off", "Show File Offset", "Show File Offset", &show_file_off); + prefs_register_bool_preference(frame_module, "force_docsis_encap", + "Treat all frames as DOCSIS frames", "Treat all frames as DOCSIS Frames", &force_docsis_encap); } void proto_reg_handoff_frame(void) { data_handle = find_dissector("data"); + docsis_handle = find_dissector("docsis"); } |