Commit Graph

40 Commits

Author SHA1 Message Date
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
Stig Bjørlykke b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
    for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
    FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Bill Meier c544c20956 Fix various typos and spelling errors (mostly in text strings)
svn path=/trunk/; revision=27050
2008-12-18 19:08:49 +00:00
Bill Meier 41c04a5599 Fix some indentation ....
svn path=/trunk/; revision=26651
2008-10-31 16:38:02 +00:00
Jaap Keuter ddce920fd8 Let the dissectors fill the Protocol and Info columns by calling the even when tree == NULL.
svn path=/trunk/; revision=26531
2008-10-23 21:01:04 +00:00
Bill Meier b52d95d591 #include <emem.h> not req'd
svn path=/trunk/; revision=26091
2008-08-26 01:28:50 +00:00
Jaap Keuter f9792481d2 Replace custom data presentation with native one.
svn path=/trunk/; revision=25965
2008-08-08 21:39:25 +00:00
Stephen Fisher 1479f03673 Make the EtherNet/IP (Industrial Protocol) I/O dissection a new type
of dissector that rejects packets it doesn't recognize (on udp port
2222).


svn path=/trunk/; revision=23836
2007-12-11 04:33:08 +00:00
Anders Broman 90753a169e Apply yet another set of the optimization patches:
When offset parameter is 0 replace tvb_bytes_exist() with the faster tvb_length().
non heuristic dissectors

svn path=/trunk/; revision=23405
2007-11-08 22:40:20 +00:00
Anders Broman 1950ffc214 Apply the small performance enhancment patches for:
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster.
Replace 
- col_append_fstr() with faster  col_append_str() 
- col_add_str() with col_set_str()
when it's safe

svn path=/trunk/; revision=23252
2007-10-23 05:50:00 +00:00
Guy Harris 1bc049906a Add some GCC warnings to the standard set, and add some others to the
--enable-extra-gcc-checks set.

If we turn on -pedantic, try turning on -Wno-long-long as well, so that
it's not *so* pedantic that it rejects the 64-bit integral data types
that we explicitly require.

Constify a bunch of stuff, and make some other changes, to get rid of
warnings.

Clean up some indentation.

svn path=/trunk/; revision=21526
2007-04-23 10:59:26 +00:00
Ronnie Sahlberg 2d1bb39121 change the signature for the get_pdu_len() function pointer passed to tcp_dissect_pdus() to also include a packet_info pointer.
there are many reasons why some protocols actually need to be able to access the pinfo structure while determining the pdu size



svn path=/trunk/; revision=19751
2006-10-31 09:29:07 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Anders Broman 5a0d95fa76 From jaap Keuter:
Taking a random dissector from the list on the Wiki I picked packet-enip.c. Nothing wrong with this one, I still ememified it.

From Bart Braem:
packet-mip.c does not have support for all registration denials by the foreign agent, code 77 was left out. The attached patch fixes that.

svn path=/trunk/; revision=16868
2005-12-20 18:38:13 +00:00
Ronnie Sahlberg 4dd264cc65 remove some redundant strcpy()
fix a compiler warning


svn path=/trunk/; revision=16195
2005-10-11 23:38:57 +00:00
Ulf Lamping 0dc9fb3d4a various code cleanup:
-use g_snprintf instead of sprintf and snprintf
-use g_strdup_printf where appropriate
-remove #include "snprintf.h" (as only g_snprintf should be used)
-replace some more alloc/realloc/calloc/free with their glib pendants

svn path=/trunk/; revision=15264
2005-08-08 18:50:39 +00:00
Guy Harris 12d310a458 From Magnus Hansson:
move CIP protocol to own dissector
	clean up code and fix variable names
	add more info to info column
	fixed decoding of embedded messages in Unconnected send and
	    Multiple Service packets
	add more info to path decoding
	add more filter options/clean up
	complete CIP vendor codes

svn path=/trunk/; revision=12070
2004-09-23 17:34:35 +00:00
Ulf Lamping d530bd4e14 Prevent the word "desegmentation" at the GUI, but use reassembling at that places, as we also use "defragmentation" and "reassembling". Use reassembling as the general term for such actions.
I (hopefully) didn't changed any protocol fields or preference file names, but only the GUI labels appearing in the protocol display and the protocol preferences.

Also added a note to the protocol preferences (where appropriate), that you have to enable "Allow subdissectors to reassemble TCP streams" at the corresponding protocol settings for TCP reassembling to take effect.

If you encounter any mistakes I've made here, please let me know...

svn path=/trunk/; revision=11784
2004-08-21 09:02:52 +00:00
Gilbert Ramirez 669db206cb Move dissectors to epan/dissectors directory.
Also move ncp222.py, x11-fields, process-x11-fields.pl,
make-reg-dotc, and make-reg-dotc.py.

Adjust #include lines in files that include packet-*.h
files.

svn path=/trunk/; revision=11410
2004-07-18 18:06:47 +00:00