Commit Graph

66 Commits

Author SHA1 Message Date
Seth Alexander 3e1828e351 Added Path Value and CRC to DOCSIS Plugin
DOCSIS update with basic defragmentation

Bug: 13106
Change-Id: Idbb42c80b87c0c3189da087b523733cf0b19967c
Reviewed-on: https://code.wireshark.org/review/18676
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-11-22 14:18:22 +00:00
Guy Harris a4c8ebc18b Don't do any Decode As stuff for dissector tables not used with Decode As.
Have all dissector tables have a "supports Decode As" flag, which
defaults to FALSE, and which is set to TRUE if a register_decode_as()
refers to it.

When adding a dissector to a dissector table with a given key, only add
it for Decode As if the dissector table supports it.

For non-FT_STRING dissector tables, always check for multiple entries
for the same protocol with different dissectors, and report an error if
we found them.

This means there's no need for the creator of a dissector table to
specify whether duplicates of that sort should be allowed - we always do
the check when registering something for "Decode As" (in a non-FT_STRING
dissector table), and just don't bother registering anything for "Decode
As" if the dissector table doesn't support "Decode As", so there's no
check done for those dissector tables.

Change-Id: I4a1fdea3bddc2af27a65cfbca23edc99b26c0eed
Reviewed-on: https://code.wireshark.org/review/17402
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-08-31 00:08:01 +00:00
Michael Mann 1e60d63c8c Create call_data_dissector() to call data dissector.
This saves many dissectors the need to find the data dissector and store a handle to it.

There were also some that were finding it, but not using it.
For others this was the only reason for their handoff function, so it could be eliminated.

Change-Id: I5d3f951ee1daa3d30c060d21bd12bbc881a8027b
Reviewed-on: https://code.wireshark.org/review/14530
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20 17:38:03 +00:00
Michael Mann 9bcac48403 Manually add protocol dependencies derived from find_dissector.
Started by grepping call_dissector_with_data, call_dissector_only and call_dissector and traced the handles passed into them to a find_dissector within the dissector.  Then replaced find_dissector with find_dissector_add_dependency and added the protocol id from the dissector.
"data" dissector was not considered to be a dependency.

Change-Id: I15d0d77301306587ef8e7af5876e74231816890d
Reviewed-on: https://code.wireshark.org/review/14509
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20 12:48:48 +00:00
Michael Mann e37275bfde Associate dissector tables and heuristic subdissector lists with a protocol.
This will make it easier to determine protocol dependencies.

Some LLC OUI dissector tables didn't have an associated protocol, so they were left without one (-1 used)

Change-Id: I6339f16476510ef3f393d6fb5d8946419bfb4b7d
Reviewed-on: https://code.wireshark.org/review/14446
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-17 00:05:17 +00:00
Michael Mann 1474f49f19 new_register_dissector -> register_dissector for remaining uses.
Mostly plugins, but also LUA and generated skinny dissector.

Change-Id: Ifeb4205442f9a60875266b4e82841ff38b4fdb63
Reviewed-on: https://code.wireshark.org/review/12515
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-11 03:42:37 +00:00
Michael Mann 159227a14b 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>
2015-11-14 21:54:39 +00:00
AdrianSimionov 91290f7b6c [docsis] Support for Queue Depth-based Request Frame
Change-Id: Ieeb79e4e248bdd8ee239c003e41ede0955e1cf86
Reviewed-on: https://code.wireshark.org/review/11766
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-13 07:40:09 +00:00
Michael Mann 74541a9596 Don't allow multiple registrations of a protocol in dissector tables.
The target here is the Decode As dialog where protocols have multiple registrations into a dissector table and that shows up as multiple entries in the Decode As dialog list with the same name so users are unsure which "dissector" they are choosing.

The "default" behavior (done in this commit) is to not allow duplicates for a dissector table, whether its part of Decode As or not.  It's just ENFORCED for Decode As.

Bug: 3949
Change-Id: Ibe14fa61aaeca0881f9cc39b78799e314b5e8127
Reviewed-on: https://code.wireshark.org/review/11405
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04 12:39:40 +00:00
Guy Harris 504f5b3478 Clean up some fields.
The "LEN" field is the "length of the MAC frame", in bytes; confusingly,
it includes the extended header length, but not the fixed-length part of
the header (including the FCS), so it's not the "length after HCS".

Rename it to "docsis.len", as it's always LEN, not SID; there's a
separate field for the SID.

Rename the Extended Header Length field to docsis.ehdrlen, and the
Number of Concatenated Frames to docsis.concat_cnt, so that different
uses of the "MACPARM" part of the header are flagged differently.

Update some comments while we're at it.

Change-Id: Ib7c4a0cda65cef25dcaf0051b3de89758ef4c29c
Reviewed-on: https://code.wireshark.org/review/9881
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-05 20:01:19 +00:00
Evan Huus 4c5b53f044 docsis: remove tvb_length calls
Change-Id: Ib35c6436876aa7f933dcec0a97a70ccbbc823905
Reviewed-on: https://code.wireshark.org/review/7913
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-04-05 12:27:40 +00:00
Alexis La Goutte c670adc677 DOCSIS: missing break in switch (CID 280485 & 280486)
Change-Id: I5b756b96ca6c3c48a43948d456bfcb07aab527fd
Reviewed-on: https://code.wireshark.org/review/5994
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-23 13:58:37 +00:00
Michael Mann 62fd2acc96 Eliminate proto_tree_add_text from some plugin dissector files.
Change-Id: Ib2d900833a8763307be6b1cfc8df20d7019d2706
Reviewed-on: https://code.wireshark.org/review/5313
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-15 00:41:10 +00:00
Bill Meier ad6134bb4b docsis: Add editor modelines; Adjust whitespace; Remove boilerplate comments.
Change-Id: I78f9815616f4fc3c14204339c5826f0ca7d0680e
Reviewed-on: https://code.wireshark.org/review/4485
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-05 20:19:53 +00:00
Michael Mann e6c87fe6b1 convert to proto_tree_add_subtree[_format] for plugin dissectors
Change-Id: I13924c5a2f056688a42cdee25654d82c056b5f97
Reviewed-on: https://code.wireshark.org/review/2974
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-10 01:51:21 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Jakub Zawadzki 82e2675f45 Avoid including <wiretap/wtap.h> in dissectors.
svn path=/trunk/; revision=53655
2013-11-29 20:53:00 +00:00
Anders Broman 202a03b398 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=53404
2013-11-18 06:22:09 +00:00
Jakub Zawadzki ae59b09443 Add missing includes in order to remove exceptions.h from proto.h (next commit).
svn path=/trunk/; revision=53230
2013-11-10 15:59:37 +00:00
Bill Meier 0ad98563a2 From didier gautheron: remove redundant or use faster col_xxx functions
- when the text parameter is constant col_add_str() and col_set_str() are equivalent but col_set_str() is faster.
- same for  replace col_append_fstr and col_append_str
- remove col_clear() when it's redundant:
    + before a col_set/col_add if the dissector can't throw an exception.
- replace col_append() after a col_clear() with faster col_add... or col_set

   https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9344


svn path=/trunk/; revision=52948
2013-10-29 14:09:20 +00:00
Michael Mann a92dd77e6e Enhance DOCSIS dissector with new fields. Bug 9149 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9149)
From Jerry Negele

svn path=/trunk/; revision=52158
2013-09-20 19:02:15 +00:00
Jeff Morriss 3551a86c36 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45015
2012-09-20 01:29:52 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Anders Broman 2311c797b2 From Gabor Somlai:
Decoding DOCSIS 3.0 Isolation DATA frames (FC_TYPE=10).

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7214

svn path=/trunk/; revision=42382
2012-05-02 10:49:03 +00:00
Bill Meier cca6984ab9 Do some more conversions of proto_tree_add_item() 'encoding' arg
(previously missed).

svn path=/trunk/; revision=39450
2011-10-18 00:17:48 +00:00
Bill Meier 9eb54292d3 Convert 'encoding' parameter of certain proto_tree_add_item() calls in plugins/*:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
  the encoding parameter for proto_tree_add_item() calls which directly reference
  an item in hf[] which has a type of:
     FT_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

Also: For type FT_ITv6 use ENC_NA. (This was missed in an earlier SVN)

svn path=/trunk/; revision=39329
2011-10-10 00:53:55 +00:00
Bill Meier 02065b0981 Convert 'encoding' parameter of certain proto_tree_add_item() calls in plugin dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39292
2011-10-06 14:46:34 +00:00
Bill Meier ef8009abe3 Use ENC_NA as encoding for proto_tree_add_item() calls which directly reference an hf item (in hf[] with types:
FT_NONE
    FT_BYTES
    FT_IPV6
    FT_IPXNET
    FT_OID

Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|1|0|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN

svn path=/trunk/; revision=39262
2011-10-05 01:00:06 +00:00
Bill Meier 7eb1530061 #if 0 code related to unused "docsis" dissector table;
Use consistent indentation & other whitespace cleanup.

svn path=/trunk/; revision=35869
2011-02-08 00:24:10 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Anders Broman 7cfa27b04b Get rid of a bunch of check_col().
svn path=/trunk/; revision=32388
2010-04-05 20:04:52 +00:00
Jaap Keuter ee9ef9f5cb Remove unneeded #includes.
svn path=/trunk/; revision=29496
2009-08-21 18:56:15 +00:00
Bill Meier 6f87844d0a (Minor) Remove unneeded #includes.
svn path=/trunk/; revision=29492
2009-08-21 14:36:27 +00:00
Kovarththanan Rajaratnam 4b6090e576 Don't guard col_set_str (COL_INFO) with col_check
svn path=/trunk/; revision=29342
2009-08-09 07:01:26 +00:00
Kovarththanan Rajaratnam e971354a54 Don't guard col_set_str (COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29340
2009-08-09 06:26:46 +00:00
Stig Bjørlykke 2bba6be84f From Kovarththanan Rajaratnam via bug 3548:
Cleanup header_field_info in plugins.

svn path=/trunk/; revision=28771
2009-06-18 23:22:10 +00:00
Anders Broman 57ebbbbb2c Dount use proto_tree_add_item_hidden().
svn path=/trunk/; revision=25233
2008-05-05 17:19:51 +00:00
Anders Broman db57e7b724 Ethereal->Wireshark
svn path=/trunk/; revision=18231
2006-05-28 16:32:49 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Guy Harris acb0e6d237 Pull the plugin-specific code into "plugin.c", and generate a
"register.c" with "make-reg-dotc"/"make-reg-dotc.py".

Pull the lists of dissector .c and .h files into Makefile.common and
have Makefile.am and Makefile.nmake use it.

svn path=/trunk/; revision=17883
2006-04-17 05:44:00 +00:00
Anders Broman e5e25269c9 From Eric Hultin:
This patch adds support for dissection of the DCC packet as defined in 
CableLab's (http://www.cablelabs.com/) DOCSIS Radio Frequency Interface 
(RFI) specification. The latest version of this specification is currently 
available at 
http://www.cablemodem.com/specifications/specifications20.html . Packet 
formats for DCC are defined in sections 8.3.20 (DCC-REQ), 8.3.21 
(DCC-RSP), and 8.3.22 (DCC-ACK) of the RFI specifications (referencing 
version CM-SP-RFIv2.0-I10-051209). In addition, this patch adds support 
for the DCD packet as defined in the DOCSIS Set-Top Gateway (DSG) 
Specification. The latest version of this specification is currently 
available at http://www.cablemodem.com/specifications/gateway.html . The 
format of the DCD packet is defined in section 5.3.1 of the DSG 
specification (referencing version CM-SP-DSG-I06-051209).

svn path=/trunk/; revision=17138
2006-02-01 05:44:20 +00:00
Jörg Mayer f9a57f08d1 Bill Meier:
Spelling fixes.

svn path=/trunk/; revision=16956
2006-01-05 13:01:08 +00:00
Gerald Combs f6d48e45c8 Make sure we don't loop when we dissect concatenated PDUs. Make some int
values larger in order to keep them from overflowing.

svn path=/trunk/; revision=14422
2005-05-23 21:18:14 +00:00
Guy Harris 802859d3fd Call the "new-style init" routine for plugins a "register" routine, as
it serves the same purpose as the register routine in a built-in
dissector, and don't require all dissectors to have one, as they might
just be taps.

Get rid of the stats tree's init routine, as it's just a tap, and as it
doesn't do anything.

Update the idl2eth Python script to generate plugins with register routines.

svn path=/trunk/; revision=13644
2005-03-07 02:44:41 +00:00
Lars Roland 00273300e7 Preparations for dropping the old plugin api.
Introduce a new init routine for plugins, 
which does not take the plugin api table as an 
argument and allows etheral to distinguish 
between plugins using the old and the new api.

Update README.plugins accordingly

Change all g_warnings() in epan/plugins.c to report_failue().
On windows we do not have a log console open while
loading the plugins, because a log console cannot be opened before the prefs have been read. Thus g_warnings()
does not work for reporting problems with plugins.

svn path=/trunk/; revision=13596
2005-03-05 06:28:10 +00:00
Guy Harris 7c3027c5e9 Export two versions of the Ethereal dissector, for use with encapsulated
Ethernet frames, one for encapsulated frames that include an FCS and one
for encapsulated frames that don't include an FCS.  Use the appropriate
versions.

In the ISL dissector, do the same sort of processing we do in the
Ethernet dissector to figure out whether the frame has a trailer or not
and whether it has an FCS or not.

svn path=/trunk/; revision=12593
2004-11-24 09:13:52 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
they have LF at the end of the line on UN*X and CR/LF on Windows;
hopefully this means that if a CR/LF version is checked in on Windows,
the CRs will be stripped so that they show up only when checked out on
Windows, not on UN*X.

svn path=/trunk/; revision=11400
2004-07-18 00:24:25 +00:00
Guy Harris 2b9ad9ec25 From Brian Wheeler: DOCSIS 2.0 support.
svn path=/trunk/; revision=10387
2004-03-17 06:55:03 +00:00
Guy Harris dbdea1617e Update a comment.
svn path=/trunk/; revision=9981
2004-02-05 08:16:01 +00:00
Guy Harris c20f75c872 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
2003-12-13 03:18:38 +00:00