Commit Graph

68 Commits

Author SHA1 Message Date
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
Michael Tüxen dab27a2d3d Fix warnings.
svn path=/trunk/; revision=39228
2011-10-02 17:59:00 +00:00
Anders Broman 8bb88d9efc From Michael Mann :
General improvements to CIP and ENIP dissectors. 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6416

svn path=/trunk/; revision=39222
2011-10-02 16:35:10 +00:00
Jeff Morriss d469d8df38 From Joakim Wiberg via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5801 :
The attached patch replaces most of the proto_tree_add_text() with
proto_tree_add_item(). That resulted in several new display filters.

It also uses the correct defines (ENC_NA, ENC_BIG_ENDIAN and ENC_LITTLE_ENDIAN)
instead of TRUE/FALSE in all proto_tree_add_item() calls.

Also it prints all out all connected transport data, since this is used by 
"IENetP Test Tool" as a part of the XML export.

svn path=/trunk/; revision=36844
2011-04-25 01:37:19 +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
Jeff Morriss 729de1a635 As suggested in http://www.wireshark.org/lists/wireshark-dev/200809/msg00075.html
(as referenced in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2907 ) and
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3411 :

Write a new convenience routine for finding a conversation and, if it is not
found, create it.  The frame number and addresses are taken from pinfo (as is
the common case).

Use this function in a bunch of dissectors.

svn path=/trunk/; revision=32790
2010-05-13 18:28:34 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Anders Broman 88bb44a51e From Jakub Zawadzki:
Cleanup dissector code - use proper memory functions.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4164

svn path=/trunk/; revision=30691
2009-10-25 11:43:30 +00:00
Kovarththanan Rajaratnam 0a5b014cec Don't guard col_clear with col_check
svn path=/trunk/; revision=29344
2009-08-09 07:36:13 +00:00
Kovarththanan Rajaratnam 24ca3c44c9 Don't guard col_set_str (COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29341
2009-08-09 06:47:24 +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 d41065097e Indent some comments.
svn path=/trunk/; revision=29103
2009-07-15 19:33:48 +00:00
Stig Bjørlykke a69f313e68 Header field cleanup.
svn path=/trunk/; revision=29049
2009-07-10 08:03:19 +00:00
Anders Broman 298feb719f From Joakim Wiberg:
Device Level Ring protocol addition.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3685

With some minor changes (blurb NULL whem text equal).

svn path=/trunk/; revision=29044
2009-07-09 20:44:28 +00:00
Stig Bjørlykke 0437f102c3 From Kovarththanan Rajaratnam:
More FT_XXX cleanup.

svn path=/trunk/; revision=28971
2009-07-07 09:02:59 +00:00
Stig Bjørlykke 7f1f48a8b2 From Joakim Wiberg via bug 3103:
Various improvements to the CIP and ENIP dissectors.

From me:
Updated to latest trunk changes.

svn path=/trunk/; revision=28844
2009-06-26 02:38:23 +00:00
Stig Bjørlykke ff7ff86249 More hf_register_info related cleanup.
svn path=/trunk/; revision=28834
2009-06-24 03:03:25 +00:00
Stig Bjørlykke 1733596a6f Revert changes committed by an accident.
Will be committed again later.

svn path=/trunk/; revision=28779
2009-06-19 06:15:52 +00:00
Stig Bjørlykke b3e10e559a Moved setting of length2 to make it always set.
svn path=/trunk/; revision=28777
2009-06-19 05:45:40 +00:00