aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cip.c
AgeCommit message (Collapse)AuthorFilesLines
2011-12-01From Michael Mann:etxrab1-95/+134
ENIP dissector - improved I/O connection dissection through "better conversation" https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6617 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@40059 f5534014-38df-0310-8fa8-9805f1628bb7
2011-11-15From Michael Mann:etxrab1-45/+43
Bugfixes for both Buildbot issues: 1. seg-fault with multiple_service_packet 2. infinite loop https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6519 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39843 f5534014-38df-0310-8fa8-9805f1628bb7
2011-11-02From Roland Knall:etxrab1-3/+4
Avoiding the fuzz-test crash, but still allowing for large parts of CIP to be dissected. ref https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6519 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39718 f5534014-38df-0310-8fa8-9805f1628bb7
2011-11-01Disable the CIP dissector until we can solve the fuzz failures.morriss1-0/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39698 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-29Don't set mr_mult_req_info->num_services *unless we're sureguy1-9/+9
mr_mult_req_info is non-null*! This should fix bug 6514, and possibly a bunch of other buildbot crashes. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39667 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-27Correct an off-by-one error introduced in r39626.morriss1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39631 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-27Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6498 :morriss1-0/+1
Initialize cip_req_info_t.ciaData, too. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39630 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-27Followup to r39626: It is also necessary to initialize the number of servicesmorriss1-0/+1
to 0 (in case we throw an exception decoding the first service). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39629 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-27Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6491 :morriss1-1/+9
Don't set mr_mult_req_info->num_services until we're sure we've initialized the full structure for that service. Otherwise if we happen to throw an exception before initializing the whole structure, we'll core someplace (like dissect_cip_generic_service_rsp()) which expects all num_services entries to be fully initialized. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39626 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-26Fix a [-Wunused-but-set-variable] compiler warning;wmeier1-60/+58
Also: Remove trailing whitespace from lines. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39623 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-26Declare unused parameters as such. Don't assign them to themselves.tuexen1-7/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39620 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-26Try to fixetxrab1-3/+3
cc1: warnings being treated as errors packet-cip.c: In function 'dissect_cip_generic_service_req': packet-cip.c:3281: warning: format not a string literal and no format arguments packet-cip.c: In function 'dissect_cip_generic_service_rsp': packet-cip.c:3631: warning: format not a string literal and no format arguments packet-cip.c: In function 'dissect_cip_data': packet-cip.c:4881: warning: comparison between signed and unsigned git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39599 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-26From Michael Mann:etxrab1-2136/+3535
Improved CIP and ENIP dissectors https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6416 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39595 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-23Replace use of tvb_get_ephemeral_faked_unicode() by use of ↵wmeier1-1/+1
tvb_get_ephemeral_unicode_string(); Fix encoding arg as needed. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39530 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.wmeier1-5/+5
Also: remove trailing whitespace for a number of files. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39503 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-16Do some conversions of proto_tree_add_item() 'encoding' arg.wmeier1-2/+2
(previously missed). 57 FT_BOOLEAN: FALSE-->ENC_BIG_ENDIAN 31 FT_BOOLEAN: TRUE-->ENC_LITTLE_ENDIAN 10 FT_BYTES: ENC_BIG_ENDIAN-->ENC_NA 1 FT_BYTES: ENC_LITTLE_ENDIAN-->ENC_NA 21 FT_BYTES: FALSE-->ENC_NA 2 FT_BYTES: TRUE-->ENC_NA 2 FT_IPXNET: ENC_BIG_ENDIAN-->ENC_NA 6 FT_IPv6: ENC_BIG_ENDIAN-->ENC_NA 1 FT_IPv6: FALSE-->ENC_NA 6 FT_NONE: ENC_BIG_ENDIAN-->ENC_NA 19 FT_NONE: FALSE-->ENC_NA 3 FT_NONE: TRUE-->ENC_NA 1 FT_STRING: ENC_BIG_ENDIAN-->ENC_ASCII|ENC_NA 1 FT_STRING: ENC_LITTLE_ENDIAN-->ENC_ASCII|ENC_NA 5 FT_STRING: FALSE-->ENC_ASCII|ENC_NA 1 FT_STRING: TRUE-->ENC_ASCII|ENC_NA 4 FT_STRINGZ: ENC_NA-->ENC_ASCII|ENC_NA 8 FT_STRINGZ: FALSE-->ENC_ASCII|ENC_NA 1 FT_INT32: FALSE-->ENC_BIG_ENDIAN 1 FT_INT32: TRUE-->ENC_LITTLE_ENDIAN 11 FT_UINT8: 0-->ENC_BIG_ENDIAN 111 FT_UINT8: FALSE-->ENC_BIG_ENDIAN 17 FT_UINT8: TRUE-->ENC_LITTLE_ENDIAN 1 FT_UINT16: 0-->ENC_BIG_ENDIAN 68 FT_UINT16: FALSE-->ENC_BIG_ENDIAN 18 FT_UINT16: TRUE-->ENC_LITTLE_ENDIAN 4 FT_UINT24: FALSE-->ENC_BIG_ENDIAN 70 FT_UINT32: FALSE-->ENC_BIG_ENDIAN 1 FT_UINT32: TRUE-->ENC_LITTLE_ENDIAN 4 FT_UINT64: FALSE-->ENC_BIG_ENDIAN 1 FT_UINT64: TRUE-->ENC_LITTLE_ENDIAN 1 FT_UINT_STRING: FALSE-->ENC_ASCII|ENC_BIG_ENDIAN git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39442 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-15Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, ↵wmeier1-2/+2
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). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39426 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-13From Benjamin Stocks (with some work by Michael Mann): "CIP Motion" dissector;wmeier1-1/+1
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; git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39396 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵wmeier1-89/+89
non-autogenerated epan/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 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39288 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵wmeier1-1/+1
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 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39260 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-02Back out improvements - it's still getting a lot of "used uninitialized"guy1-3506/+2090
errors, so I'll reopen the bug and log all the warnings that have been produced, and mark the patch as "rejected". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39230 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-02"seg_size" isn't set here, and the items don't appear to have a variableguy1-6/+6
segment size, they just appear to be 2 bytes long. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39229 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-02Add comments.etxrab1-0/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39227 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-02Fix warnings.tuexen1-11/+13
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39226 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-02From Michael Mann :etxrab1-2090/+3499
General improvements to CIP and ENIP dissectors. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6416 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39222 f5534014-38df-0310-8fa8-9805f1628bb7
2011-09-26Get rid of check_col, while at it set ENC.etxrab1-71/+56
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39147 f5534014-38df-0310-8fa8-9805f1628bb7
2011-09-21Fix ex "modeline" so it works;wmeier1-1/+1
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39081 f5534014-38df-0310-8fa8-9805f1628bb7
2011-09-19Don't assign return value of proto_tree_add_text() to rrsc_item if it's not ↵cmaynard1-1/+1
going to be used. Fixes Coverity CID 863. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39054 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-26From Michael Mann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5749 :morriss1-326/+1213
Added support for the following services of the Connection Manager object: LargeForwardOpen GetConnectionOwner Added support for the following services of the Connection Configuration Object: GetAttributeAll SetAttributeAll From me: Replace tabs with spaces; adjust modelines for 8-space tabs instead of 3. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37404 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-27Remove unneeded #include <stdlib.h>;wmeier1-773/+787
Use consistent indentation; Add editor modelines; Use #if 0/#endif to comment out code instead of /* */. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36913 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-27From Yaniv Kaul:wmeier1-7/+7
Some fixes for 'set but not used' errors that GCC 4.6 emits. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36911 f5534014-38df-0310-8fa8-9805f1628bb7
2011-02-17Fix some Visual C++ analysis warnings.gerald1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35988 f5534014-38df-0310-8fa8-9805f1628bb7
2010-12-20Rename the routines that handle dissector tables with unsigned integerguy1-8/+8
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.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35224 f5534014-38df-0310-8fa8-9805f1628bb7
2010-10-17Removed unused entries.stig1-58/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34546 f5534014-38df-0310-8fa8-9805f1628bb7
2010-10-11Define some fcns & vars as static;wmeier1-3/+5
Minor whitespace and comments cleanup. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34477 f5534014-38df-0310-8fa8-9805f1628bb7
2010-04-06#include <string.h> not needed.wmeier1-1/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32411 f5534014-38df-0310-8fa8-9805f1628bb7
2010-04-03Remove unneeded #include <stdio.h>wmeier1-1/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32367 f5534014-38df-0310-8fa8-9805f1628bb7
2010-01-25From Didier Gautheron via bug 4419:stig1-14/+8
se_alloc and ep_alloc never return NULL and se_alloc0 already initialized data with 0. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31654 f5534014-38df-0310-8fa8-9805f1628bb7
2009-09-24* Prefer col_append_str instead of col_append_fstr for constant stringskrj1-6/+3
* Remove check_col guards git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30127 f5534014-38df-0310-8fa8-9805f1628bb7
2009-09-22From Julian Fielding:jake1-7/+7
Function dissect_epath() expects path_length in bytes, but the value from the packet is in words, so there's lots of *2 and /2 in those parts of the code. In this invocation dissect_epath( tvbIOI, pi, 0, preq_info->IOILen, TRUE ); preq_info->IOILen is in words. In six places proto_tree_add_item is used with tvb NULL and size 0 to add an FT_UINT8/16/32 item. I think it should be replaced with proto_tree_add_uint(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30061 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-09Don't guard col_clear with col_checkkrj1-2/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29344 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-09Don't guard col_set_str (COL_PROTOCOL) with col_checkkrj1-8/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29341 f5534014-38df-0310-8fa8-9805f1628bb7
2009-07-06From Joakim Wiberg via bug 3670:stig1-45/+39
This patch correctes serveral minor things. 1. Adds decoding of generic services to classes that have a separate dissect function. 2. Adds new error codes. 3. Adds new CIP objects. 4. Extends the VendorID list. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28951 f5534014-38df-0310-8fa8-9805f1628bb7
2009-06-26From Joakim Wiberg via bug 3103:stig1-760/+2027
Various improvements to the CIP and ENIP dissectors. From me: Updated to latest trunk changes. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28844 f5534014-38df-0310-8fa8-9805f1628bb7
2009-06-24More hf_register_info related cleanup.stig1-20/+20
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28834 f5534014-38df-0310-8fa8-9805f1628bb7
2009-06-19Revert changes committed by an accident.stig1-2027/+760
Will be committed again later. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28779 f5534014-38df-0310-8fa8-9805f1628bb7
2009-06-19Moved setting of length2 to make it always set.stig1-760/+2027
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28777 f5534014-38df-0310-8fa8-9805f1628bb7
2009-06-18From Kovarththanan Rajaratnam via bug 3548:stig1-20/+20
(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 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28770 f5534014-38df-0310-8fa8-9805f1628bb7
2008-12-18Fix various typos and spelling errors (mostly in text strings)wmeier1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27050 f5534014-38df-0310-8fa8-9805f1628bb7
2008-12-17Fix some typos and spelling (mostly in text strings)wmeier1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27037 f5534014-38df-0310-8fa8-9805f1628bb7