Commit Graph

86 Commits

Author SHA1 Message Date
Bill Meier 48ce5629b0 Minor: use VALS macro (as per convention); Add editor modelines; Do whitespace changes.
Change-Id: I6007c1b2098d06e4a892474dd07f06a7538f94ef
Reviewed-on: https://code.wireshark.org/review/1843
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-05-28 15:40:39 +00:00
Michael Mann 0701d6170d Add EtherNet/IP connection conversation filters
Change-Id: Ia69cbe9fea364c735bde956d84a82404b46ec236
Reviewed-on: https://code.wireshark.org/review/1810
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-28 00:25:18 +00:00
Michael Mann b40cb1adea Apply found fix-encoding-args.pl errors in the dissector directory.
I coincidentally found a few files with errors, so I thought it might be time to run it on the whole directory again.

Change-Id: Ia32e54b3b1b94e5a418ed758ea79807c8bc7e798
Reviewed-on: https://code.wireshark.org/review/978
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-06 15:11:36 +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
Anders Broman e8b935ad6e Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54209
2013-12-18 06:51:09 +00:00
Anders Broman df30bf95ea Make local functions static.
svn path=/trunk/; revision=54137
2013-12-16 06:03:17 +00:00
Jakub Zawadzki c45475ab45 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54135
2013-12-15 23:44:12 +00:00
Jakub Zawadzki e0e86bab5a Fix const warnings.
svn path=/trunk/; revision=54092
2013-12-14 14:33:46 +00:00
Michael Mann 9b7fb8a811 Create the ability to have packet scoped "proto" data. Bug 9470 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9470)
I'm not sold on the name or module the proto_data functions live in, but I believe the function arguments are solid and gives us the most flexibility for the future.  And search/replace of a function name is easy enough to do.

The big driving force for getting this in sooner rather than later is the saved memory on ethernet packets (and IP packets soon), that used to have file_scope() proto data when all it needed was packet_scope() data (technically packet_info->pool scoped), strictly for Decode As.

All dissectors that use p_add_proto_data() only for Decode As functionality have been converted to using packet_scope().  All other dissectors were converted to using file_scope() which was the original scope for "proto" data.

svn path=/trunk/; revision=53520
2013-11-23 02:20:13 +00:00
Bill Meier de60c9c76b (Trivial) Formatting & whitespace changes ....
svn path=/trunk/; revision=53483
2013-11-21 18:37:26 +00:00
Michael Mann 8081cf1d90 Add data parameter to tcp_dissect_pdus() as well as convert it to using "new" style dissectors.
Now that "bytes consumed" can be determined, should tcp_dissect_pdus() take advantage of that?

Should tcp_dissect_pdus return length (bytes consumed)?  There are many dissectors that just call tcp_dissect_pdus() then return tvb_length(tvb).  Seems like that could all be rolled into one.

svn path=/trunk/; revision=53198
2013-11-09 17:46:28 +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
Bill Meier 2ac134b3c5 whitespace fixes; mostly: remove trailing blanks
svn path=/trunk/; revision=52591
2013-10-13 19:56:52 +00:00
Michael Mann 1e14c2dc79 Textual corrections to EtherNet/IP dissector. Bug 9213 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9213)
From Joakim Wiberg

From me: Change blurbs to NULL since they are duplicates of field name.

svn path=/trunk/; revision=52329
2013-10-02 01:43:39 +00:00
Michael Mann 376c5792a1 Minor correction to dissection of DLR frames in Ethernet/IP dissector. Bug 9186 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9186)
From Joakim Wiberg

svn path=/trunk/; revision=52215
2013-09-25 19:13:10 +00:00
Michael Mann 61c9a77cd9 Bugfix a few items:
1. Correct Interface Flag enumeration
2. Dissect ARP data without making it look like its an ARP packet by disabling column writing.

svn path=/trunk/; revision=52157
2013-09-20 18:35:10 +00:00
Chris Maynard ac7ecb10d2 More dissector table name related changes (a continuation of r51904).
svn path=/trunk/; revision=51982
2013-09-12 20:34:19 +00:00
Evan Huus 14e6dddcdc Replace some emem with wmem.
svn path=/trunk/; revision=51512
2013-08-25 14:23:13 +00:00
Michael Mann 6229ab6266 Batch of filterable expert infos.
svn path=/trunk/; revision=49845
2013-06-08 02:06:24 +00:00
Michael Mann 45658e1cbd first batch of dissectors to use the new expert info API.
svn path=/trunk/; revision=49560
2013-05-24 18:02:54 +00:00
Anders Broman 85a8e304dd Add the posibillity to use a key for per-packet-data.
svn path=/trunk/; revision=49259
2013-05-12 18:11:02 +00:00
Michael Mann f39b47420b Fix checkAPI.pl complaints
svn path=/trunk/; revision=48730
2013-04-04 15:00:27 +00:00
Michael Mann 719dca4797 Enhancements to Ethernet/IP DLR dissector, bug 8560 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8560)
From Joakim Wiberg

svn path=/trunk/; revision=48729
2013-04-04 14:34:26 +00:00
Evan Huus 37600a157b Rename value string (and similar) functions to use a consistent pattern. This
was done using textual search+replace, not anything syntax-aware, so presumably
it got most comments as well (except where there were typos).

Use a consistent coding style, and make proper use of the WS_DLL_* defines.

Group the functions appropriately in the header.

I ended up getting rid of most of the explanatory comments since many of them
duplicated what was in the value_string.c file (and were out of sync with the
recent updates I made to those in r48633). Presumably most of the comments
should be in the .h file not the .c file, but there's enough churn ahead that
it's not worth fixing yet.

Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467

svn path=/trunk/; revision=48634
2013-03-29 00:26:23 +00:00
Anders Broman 96e7b183fb From beroset:
patch to remove C++ incompatibilities from packet-lmp.c
renamed class to lmp_class

remove C++ incompatibilities from packet-rcpap.c
renamed class to inst_class (instruction class).

remove C++ incompatibilities from emem.c and oids.c

remove C++ incompatibilities from packet-radius.c

remove C++ incompatibilities from packet-enip.c


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

svn path=/trunk/; revision=48299
2013-03-14 18:58:42 +00:00
Michael Mann 158574f1d6 follow/clean up to rev 47389. The causes of some of the unused hf_ was typos and refactoring. hf_cip_reserved16 was a "placeholder", so it can remain commented out.
svn path=/trunk/; revision=47419
2013-02-01 16:16:05 +00:00
Bill Meier c439b805e2 Comment out unused hf[] entries & etc.
(found by checkhf)

svn path=/trunk/; revision=47389
2013-01-31 17:55:31 +00:00
Jeff Morriss 0266cceef3 Make all enum_val_t's const.
svn path=/trunk/; revision=46292
2012-11-29 20:15:37 +00:00
Michael Mann 3a830bfe20 ENIP/CIP
Added the start of IPv6 support for I/O conversations (waiting for spec definitions to complete).
Added support for multiple messages in a single frame to be separated in the COL_INFO column.

ENIP
Added ListIdentity delay dissection
remove check_col()

CIP
Added TimeSync object dissection

svn path=/trunk/; revision=46020
2012-11-13 13:14:48 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Jakub Zawadzki 5a8783f5b1 Initial commit to support yet another method of passing data between dissectors.
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL

svn path=/trunk/; revision=44860
2012-09-10 21:40:21 +00:00
Bill Meier 8fde467588 General cleanup:
- remove 'if (tree)' around calls to col_...() fcns and to sub-dissectors;
- call proto_get_id_by_filter_name() in proto_reg-handoff...() (not init routine);
- do some whitespace and formatting changes.

svn path=/trunk/; revision=44385
2012-08-09 16:47:15 +00:00
Michael Mann e298722f5b svn path=/trunk/; revision=43789 2012-07-18 19:40:56 +00:00
Chris Maynard a099ae38f5 tvb_length_remaining() can return -1, so be sure to deal with it if it does.
svn path=/trunk/; revision=43704
2012-07-13 21:46:27 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Bill Meier 557ed5e971 Minor: reformatting, unneeded #includes, whitespace cleanup;
Also: use val_to_str_const(0 instead of val_to_str() in a few cases.

svn path=/trunk/; revision=42271
2012-04-26 16:47:37 +00:00
Bill Meier 198c9ba55f FT_BOOLEAN hf[] entries with a 0 'bitmask' should have 'display' = BASE_NONE;
In some cases:
 Use val_to_str_const() instead of val_to_str();
 Reformat long lines;
 Do some general whitespace changes.


svn path=/trunk/; revision=41587
2012-03-16 02:00:29 +00:00
Bill Meier 66bb2deb3f Fix incorrect packet-details display of certain 1 bit FT_BOOLEAN fields.
(Use a valid 'parent field width' in the hf[] 'display' field.

svn path=/trunk/; revision=41398
2012-03-07 16:02:48 +00:00
Jeff Morriss 033ad2a5ee Don't use FT_*INT with true_false strings: the code to generate
representations of former is expecting value_strings--which are quite
different than the latter.

svn path=/trunk/; revision=41361
2012-03-06 01:55:21 +00:00
Jeff Morriss bb9b8880af From Michael Mann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6893 :
The attached patches fix the following issues:

1. CIP-Motion shouldn't be a heuristic dissector.  CIP-Motion packets are
determined by specific fields in a CIP ForwardOpen.  I ran into situations
where CIP-Motion's "vague" heuristics incorrectly dissected packets meant for
CIP-Safety.  Of course this requires the ForwardOpen to be in the trace, but it
is the most deterministic way to have CIP-Motion packets.

2. Minor bugfix to the CIP-Safety dissector.  A couple of fields were
"missing", causing errant malformed packets.

svn path=/trunk/; revision=41283
2012-03-02 03:39:16 +00:00
Anders Broman 6b2b82d213 From Michael Mann:
a dissector for the ODVA protocol: CIP Safety. More information
about the protocol can be found here: 

http://www.odva.org/Home/ODVATECHNOLOGIES/CIP/CIPTechnologyOverview/CIPSafety/CIPSafetyOverview/tabid/131/lng/en-US/Default.aspx

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

svn path=/trunk/; revision=41201
2012-02-27 09:30:26 +00:00
Alexis La Goutte b30eadd6ef Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40374
2012-01-04 17:42:10 +00:00
Anders Broman e8111a59aa From Michael Mann:
ENIP dissector - improved I/O connection dissection through "better conversation"

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

svn path=/trunk/; revision=40059
2011-12-01 06:05:39 +00:00
Stig Bjørlykke 60bb13e25f Removed duplicate enip.connection_transport_data entry.
This fixes bug 6490.

svn path=/trunk/; revision=39603
2011-10-26 12:15:07 +00:00
Anders Broman 4cfaa22784 From Michael Mann:
Improved CIP and ENIP dissectors

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

svn path=/trunk/; revision=39595
2011-10-26 04:55:21 +00:00
Bill Meier d65261d344 Use ENC_NA as proto_tree_add_item() encoding arg for FT_ETHER hf[] field type.
(Some minor whitespace cleanup).

svn path=/trunk/; revision=39488
2011-10-20 14:07:54 +00:00
Bill Meier 126aa85393 Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
    then use ENC_ASCII.
 2. For all but FT_UINT_STRING, always use ENC_NA
    (replacing any existing True/1/FALSE/0
    /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).



svn path=/trunk/; revision=39426
2011-10-15 18:46:26 +00:00
Bill Meier a2e8e1cdcd From Benjamin Stocks (with some work by Michael Mann): "CIP Motion" dissector;
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5929

From me:
packet-cipmotion.c:
  FT_BOOLEAN fields with bitmasks need a bit-fieldwidth in the hf[] entry 'display' field;
  Define attribute_size as guint32 since it has to store guint8*guint16;
  Use ENC_NA as encoding arg in proto_tree_add_item() for FT_BYTES field types;
  Remove trailing whitespace from lines;
  Other minor cleanup and reformatting.

packet-enip.c:
  Use ENC_NA as encoding arg in proto_tree_add_item() for FT_BYTES field types;

svn path=/trunk/; revision=39396
2011-10-13 00:00:52 +00:00
Bill Meier 94f36ca4ff 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|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN

svn path=/trunk/; revision=39260
2011-10-04 22:44:31 +00:00
Guy Harris b7bdb4a985 OK, those seem to depend on at least some of the CIP changes, so back
the ENIP changes out as well.

svn path=/trunk/; revision=39232
2011-10-02 19:05:20 +00:00