aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-opensafety.c
AgeCommit message (Collapse)AuthorFilesLines
2011-11-27Various Minor cleanup:wmeier1-256/+374
- Remove unneeded #includes; - Use val_to_str_const() in several places; - Reformat long lines; - Fix whitepace and indentation. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@40016 f5534014-38df-0310-8fa8-9805f1628bb7
2011-11-04From Roland Knall via bug 6538:stig1-164/+18
Use CRC routines from wsutil + some Code-Clang Analysis fixes. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39730 f5534014-38df-0310-8fa8-9805f1628bb7
2011-11-03From Roland Knall via bug 6538:stig1-49/+9
Remove stringToBytes and use hex_str_to_bytes instead. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39725 f5534014-38df-0310-8fa8-9805f1628bb7
2011-11-02From Roland Knall:etxrab1-6/+4
Remove the warnings for the Clang-Code-Analysis. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6538 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39717 f5534014-38df-0310-8fa8-9805f1628bb7
2011-11-01From Roland Knall:etxrab1-109/+182
- Renaming opensafety.msg.type to opensafety.msg.direction - Introducing real opensafety.msg.type as opensafety.msg.category and generated field - Adding openSAFETY Sender and Receiver field, for all types of messages - Adding openSAFETY Domain number and Node number as generated fields, which allows filtering for them - Rework PACKET_RECEIVED_BY and PACKET_SEND_FROM_TO_ALL to PACKET_RECEIVER and PACKET_SENDER - Replaced PACKET_SEND_FROM_TO with calls to PACKET_RECEIVER and PACKET_SENDER - Added functions, so that the new sender and receiver fields as well as network information are added as sub-trees - Removed DISSECTOR_ASSERT in opensafety_get_scm_udid as it is not needed here anymore - Added the connection valid bit to the dissection tree ( has been there as message type, but was never validated ) - Added calculations for Domain Network Addr, depending if a valid UDID for the SCM is present in SSDO and SPDO - Corrected error, where sub-tree for spdo dissection used global ssdo_tree instead of spdo_tree - Added "Message Type unknown" which leads to PI_MALFORMED marked entry in dissect_opensafety_message - Added check for ( length - frameOffset ) is below or equal zero, to avoid using dissector asserts - Added check for freak frame start detection, where both frame starts would be equal (could happen during fuzztest) - Removed DISSECTOR_ASSERT for both frame starts being different - Added check, that if the frame address is above 1024, the package get's marked as PI_MALFORMED (fuzztest) - Fixed CID 1215, CID 1224 and CID 1246/1247 - Corrected naming issue with openSAFETY/SercosIII dissection using UDP transport https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6528 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39701 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.wmeier1-1/+1
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-09-30Fix Coverity CID 1204: CONSTANT EXPRESSION RESULT according to feedback from ↵cmaynard1-47/+62
Roland Knall. See http://www.wireshark.org/lists/wireshark-dev/201109/msg00160.html. Also, convert the relatively few tabs to 4-spaces to match the rest of this dissector's white space choice and add modelines. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39204 f5534014-38df-0310-8fa8-9805f1628bb7
2011-09-29From Roland Knall:etxrab1-15/+17
Address Coverty issues CID 1204, CID 1215, CID 1224, CID 1246, CID 1247 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6400 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39182 f5534014-38df-0310-8fa8-9805f1628bb7
2011-08-23Removed the call to g_warning() in proto_reg_handoff_opensafety(), as I ↵cmaynard1-1/+0
didn't care to see the "openSAFETY - Profinet IO heuristic dissector cannot be registered, openSAFETY/PNIO native dissection." message when I ran, "tshark -v". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38676 f5534014-38df-0310-8fa8-9805f1628bb7
2011-08-08Remove unneeded #includes: proto.h,tvbuff.h,value_string.h,stdlib.h,...wmeier1-2/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38413 f5534014-38df-0310-8fa8-9805f1628bb7
2011-08-07If you have a loop that iterates over packet contents, you absolutelyguy1-6/+19
must not just do a "continue" if the offset into the packet has not been advanced, as you will get an infinite loop if you do. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38383 f5534014-38df-0310-8fa8-9805f1628bb7
2011-08-02Fix 45 occurrences of unused values reported under Coverity CID's 1235-1241.cmaynard1-50/+45
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38315 f5534014-38df-0310-8fa8-9805f1628bb7
2011-08-02From Roland Knall:etxrab1-418/+191
openSAFETY: Cleaning up, removing multiple implementations and cleaning up code https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6180 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38307 f5534014-38df-0310-8fa8-9805f1628bb7
2011-07-26Avoid a crash reported in bug 6138 by never allowing frame1Size < dataLength.cmaynard1-0/+1
Reference: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6138 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38213 f5534014-38df-0310-8fa8-9805f1628bb7
2011-07-15Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.wmeier1-13/+10
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38049 f5534014-38df-0310-8fa8-9805f1628bb7
2011-07-04From Roland Knall:etxrab1-1/+117
This patch will add preliminary Profinet IO transport protocol dissection to the openSAFETY protocol. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6063 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37887 f5534014-38df-0310-8fa8-9805f1628bb7
2011-07-03From Roland Knall:etxrab1-41/+17
The way heuristic dissection was handled by the openSAFETY plugin, could lead to out-of-memory problems with large files (>50.000 packets). The new version does not use ep_alloc anymore, but a static boolean instead. Also, the code registering for the SercosIII dissector got simplified, as the SercosIII dissector is no longer a plugin. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6061 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37874 f5534014-38df-0310-8fa8-9805f1628bb7
2011-06-21From Roland Knall:etxrab1-2/+5
Two changes for openSAFETY over Modbus/TCP: 1. Changing the default preference for Big Endian encoding from TRUE to FALSE 2. Changing the position in the tree for the dissection to the top-level, therefore, the openSAFETY entries no longer will show up as children of the Modbus entry. This is the same behaviour as the other variants for openSAFETY https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6038 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37739 f5534014-38df-0310-8fa8-9805f1628bb7
2011-06-17From Roland Knall:etxrab1-29/+216
openSAFETY: Making the UDP ports configurable; Modbus/TCP support https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5999 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37686 f5534014-38df-0310-8fa8-9805f1628bb7
2011-06-08Move the warning "...SercosIII heuristic dissector cannot be registered.." ↵etxrab1-8/+1
to the handoff routine as sercosIII most probably will not have registered it's name when opensafty's register routine is executed e.g the warning will always be printed. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37615 f5534014-38df-0310-8fa8-9805f1628bb7
2011-06-03From Roland Knall via bug 5977:gerald1-3/+37
Handling of SercosIII if the plugin can not be loaded. Changed the behaviour - if the SercosIII plugin is not available, the openSAFETY dissector registers itself for ETHERTYPE_SERCOS. SercosIII packages can not be dissected anyway in such a case and currently no other dissector will handle those packages. The following steps will be taken to display the situation to the user: The message "SercosIII dissector not available, openSAFETY/SercosIII native dissection." will be added to the tree. Additionally a similar warning will be presented on the console during startup of wireshark. All openSAFETY packages will be dissected, displaying the normal openSAFETY information. This will be more transparent for the customer. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37533 f5534014-38df-0310-8fa8-9805f1628bb7
2011-06-02Fix Bug #5984: Infinite loop caused by fcn call arg conversion: guint->guint8wmeier1-2/+2
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5984 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37521 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-31From Roland Knall: openSAFETY dissector.guy1-0/+1604
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37487 f5534014-38df-0310-8fa8-9805f1628bb7