aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cip.c
AgeCommit message (Collapse)AuthorFilesLines
2012-05-05Fix some more hf encodings.Jeff Morriss1-4/+4
svn path=/trunk/; revision=42434
2012-05-04value_string_ext: Reorder entries in value_string arrays to get Binary ↵Jakub Zawadzki1-1/+1
Search instead of Linear Search. svn path=/trunk/; revision=42418
2012-05-04Fix conflicting entries in CIP vendor list.Jakub Zawadzki1-1/+1
344 is registered to KEBA. (Ref: http://www.odva.org/Home/CIPSUPPLIERDIRECTORY/LicensedVendorList/tabid/86/lng/en-US/Default.aspx) svn path=/trunk/; revision=42417
2012-04-09Mark some function static.Jakub Zawadzki1-2/+2
svn path=/trunk/; revision=41999
2012-03-06Whitespace cleanup.Bill Meier1-352/+352
svn path=/trunk/; revision=41386
2012-03-06Fix incorrect packet-details display of a 1 bit FT_BOOLEAN field.Bill Meier1-1/+1
svn path=/trunk/; revision=41378
2012-03-02From Michael Mann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6893 :Jeff Morriss1-19/+21
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-02-27From Michael Mann:Anders Broman1-60/+418
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-01-04Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-1/+2
svn path=/trunk/; revision=40372
2012-01-04From Michael Mann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6697Alexis La Goutte1-5/+308
Modbus object support for CIP dissector Support for the Modbus object within the CIP dissector. Essentially wraps the Modbus protocol within a CIP object. Also included update to Modbus error code per http://www.wireshark.org/lists/wireshark-dev/201111/msg00187.html svn path=/trunk/; revision=40371
2011-12-01From Michael Mann:Anders Broman1-95/+134
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-11-15From Michael Mann:Anders Broman1-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 svn path=/trunk/; revision=39843
2011-11-02From Roland Knall:Anders Broman1-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 svn path=/trunk/; revision=39718
2011-11-01Disable the CIP dissector until we can solve the fuzz failures.Jeff Morriss1-0/+3
svn path=/trunk/; revision=39698
2011-10-29Don't set mr_mult_req_info->num_services *unless we're sureGuy Harris1-9/+9
mr_mult_req_info is non-null*! This should fix bug 6514, and possibly a bunch of other buildbot crashes. svn path=/trunk/; revision=39667
2011-10-27Correct an off-by-one error introduced in r39626.Jeff Morriss1-1/+1
svn path=/trunk/; revision=39631
2011-10-27Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6498 :Jeff Morriss1-0/+1
Initialize cip_req_info_t.ciaData, too. svn path=/trunk/; revision=39630
2011-10-27Followup to r39626: It is also necessary to initialize the number of servicesJeff Morriss1-0/+1
to 0 (in case we throw an exception decoding the first service). svn path=/trunk/; revision=39629
2011-10-27Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6491 :Jeff 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. svn path=/trunk/; revision=39626
2011-10-26Fix a [-Wunused-but-set-variable] compiler warning;Bill Meier1-60/+58
Also: Remove trailing whitespace from lines. svn path=/trunk/; revision=39623
2011-10-26Declare unused parameters as such. Don't assign them to themselves.Michael Tüxen1-7/+2
svn path=/trunk/; revision=39620
2011-10-26Try to fixAnders Broman1-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 svn path=/trunk/; revision=39599
2011-10-26From Michael Mann:Anders Broman1-2136/+3535
Improved CIP and ENIP dissectors https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6416 svn path=/trunk/; revision=39595
2011-10-23Replace use of tvb_get_ephemeral_faked_unicode() by use of ↵Bill Meier1-1/+1
tvb_get_ephemeral_unicode_string(); Fix encoding arg as needed. svn path=/trunk/; revision=39530
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-5/+5
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-10-16Do some conversions of proto_tree_add_item() 'encoding' arg.Bill Meier1-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 svn path=/trunk/; revision=39442
2011-10-15Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, ↵Bill Meier1-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). svn path=/trunk/; revision=39426
2011-10-13From Benjamin Stocks (with some work by Michael Mann): "CIP Motion" dissector;Bill Meier1-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; svn path=/trunk/; revision=39396
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-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 svn path=/trunk/; revision=39288
2011-10-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵Bill Meier1-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 svn path=/trunk/; revision=39260
2011-10-02Back out improvements - it's still getting a lot of "used uninitialized"Guy Harris1-3506/+2090
errors, so I'll reopen the bug and log all the warnings that have been produced, and mark the patch as "rejected". svn path=/trunk/; revision=39230
2011-10-02"seg_size" isn't set here, and the items don't appear to have a variableGuy Harris1-6/+6
segment size, they just appear to be 2 bytes long. svn path=/trunk/; revision=39229
2011-10-02Add comments.Anders Broman1-0/+5
svn path=/trunk/; revision=39227
2011-10-02Fix warnings.Michael Tüxen1-11/+13
svn path=/trunk/; revision=39226
2011-10-02From Michael Mann :Anders Broman1-2090/+3499
General improvements to CIP and ENIP dissectors. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6416 svn path=/trunk/; revision=39222
2011-09-26Get rid of check_col, while at it set ENC.Anders Broman1-71/+56
svn path=/trunk/; revision=39147
2011-09-21Fix ex "modeline" so it works;Bill Meier1-1/+1
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748 svn path=/trunk/; revision=39081
2011-09-19Don't assign return value of proto_tree_add_text() to rrsc_item if it's not ↵Chris Maynard1-1/+1
going to be used. Fixes Coverity CID 863. svn path=/trunk/; revision=39054
2011-05-26From Michael Mann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5749 :Jeff 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. svn path=/trunk/; revision=37404
2011-04-27Remove unneeded #include <stdlib.h>;Bill Meier1-773/+787
Use consistent indentation; Add editor modelines; Use #if 0/#endif to comment out code instead of /* */. svn path=/trunk/; revision=36913
2011-04-27From Yaniv Kaul:Bill Meier1-7/+7
Some fixes for 'set but not used' errors that GCC 4.6 emits. svn path=/trunk/; revision=36911
2011-02-17Fix some Visual C++ analysis warnings.Gerald Combs1-1/+1
svn path=/trunk/; revision=35988
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-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.) svn path=/trunk/; revision=35224
2010-10-17Removed unused entries.Stig Bjørlykke1-58/+0
svn path=/trunk/; revision=34546
2010-10-11Define some fcns & vars as static;Bill Meier1-3/+5
Minor whitespace and comments cleanup. svn path=/trunk/; revision=34477
2010-04-06#include <string.h> not needed.Bill Meier1-1/+0
svn path=/trunk/; revision=32411
2010-04-03Remove unneeded #include <stdio.h>Bill Meier1-1/+0
svn path=/trunk/; revision=32367
2010-01-25From Didier Gautheron via bug 4419:Stig Bjørlykke1-14/+8
se_alloc and ep_alloc never return NULL and se_alloc0 already initialized data with 0. svn path=/trunk/; revision=31654
2009-09-24* Prefer col_append_str instead of col_append_fstr for constant stringsKovarththanan Rajaratnam1-6/+3
* Remove check_col guards svn path=/trunk/; revision=30127
2009-09-22From Julian Fielding:Jaap Keuter1-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(). svn path=/trunk/; revision=30061