aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-enttec.c
AgeCommit message (Collapse)AuthorFilesLines
2018-02-12dissectors: use SPDX identifiers.Dario Lombardo1-13/+1
Change-Id: I92c94448e6641716d03158a5f332c8b53709423a Reviewed-on: https://code.wireshark.org/review/25756 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-13Convert most UDP dissectors to use "auto" preferences.Michael Mann1-23/+7
Similar to the "tcp.port" changes in I99604f95d426ad345f4b494598d94178b886eb67, convert dissectors that use "udp.port". More cleanup done on dissectors that use both TCP and UDP dissector tables, so that less preference callbacks exist. Change-Id: If07be9b9e850c244336a7069599cd554ce312dd3 Reviewed-on: https://code.wireshark.org/review/18120 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-08Combine Decode As and port preferences for tcp.port dissector table.Michael Mann1-11/+2
This patch introduces new APIs to allow dissectors to have a preference for a (TCP) port, but the underlying data is actually part of Decode As functionality. For now the APIs are intentionally separate from the regular APIs that register a dissector within a dissector table. It may be possible to eventually combine the two so that all dissectors that register with a dissector table have an opportunity to "automatically" have a preference to adjust the "table value" through the preferences dialog. The tcp.port dissector table was used as the guinea pig. This will eventually be expanded to other dissector tables as well (most notably UDP ports). Some dissectors that "shared" a TCP/UDP port preference were also converted. It also removed the need for some preference callback functions (mostly when the callback function was the proto_reg_handoff function) so there is cleanup around that. Dissectors that has a port preference whose default was 0 were switched to using the dissector_add_for_decode_as_with_preference API rather than dissector_add_uint_with_preference Also added comments for TCP ports used that aren't IANA registered. Change-Id: I99604f95d426ad345f4b494598d94178b886eb67 Reviewed-on: https://code.wireshark.org/review/17724 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-10enttec: CID 1355670 (same code for different branches)Martin Kaiser1-5/+2
else if and else branch do exactly the same thing - remove the else if Change-Id: If6017f2fdb960b5533d02f1f863070de95babdf5 Reviewed-on: https://code.wireshark.org/review/15339 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-10enttec: uups, I forgot some if (tree) checksMartin Kaiser1-10/+6
Change-Id: Id092b91408cdac9e490cb060a3d95e4a1d78e4e6 Reviewed-on: https://code.wireshark.org/review/15338 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2016-05-10enttec: remove some unnecessary if (tree) checksMartin Kaiser1-27/+23
Change-Id: Id108b0bacac377ad1f3fe7e999fb4d772bb69789 Reviewed-on: https://code.wireshark.org/review/15337 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-2/+2
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now. Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f Reviewed-on: https://code.wireshark.org/review/12484 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-22First batch of unincludes. Last attempt...Martin Mathieson1-1/+0
Change-Id: I3681462aeb98ca62ed3ec5eb226b2553317391a9 Reviewed-on: https://code.wireshark.org/review/5997 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-4/+0
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-11-28Make the ENTTEC dissector reject packets that don't look like ENTTEC packets.Guy Harris1-20/+80
This should avoid questions like https://ask.wireshark.org/questions/38198/what-is-enttec-in-a-pcap-file It also splits DMX-over-UDP and DMX-over-TCP into separate dissectors, as 1) DMX-over-TCP has only config packets, DMX-over-UDP has the others; 2) that would let us do reassembly, if necessary, for DMX-over-TCP. Change-Id: I2606c814693028c7ba2bbc458e45c853372baaf3 Reviewed-on: https://code.wireshark.org/review/5522 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-03Add editor modelines; Adjust whitespace as needed.Bill Meier1-0/+13
Change-Id: I391cdf80a6e4ae5b0f4068e0500a90d013588f8a Reviewed-on: https://code.wireshark.org/review/4442 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-11-09Don't include <epan/strutil.h> when not needed.Jakub Zawadzki1-1/+0
svn path=/trunk/; revision=53194
2013-09-15Convert a few more dissectors to wmem APIPascal Quantin1-10/+12
svn path=/trunk/; revision=52052
2013-07-01Define certain 'const char *...' arrays as static.Bill Meier1-2/+2
(That is: Don't create the array on the stack each time the function is called). Reduces code memory usage and execution time. (See SVN #50271) svn path=/trunk/; revision=50300
2013-06-14Remove check_col() and the occasional tree.Michael Mann1-3/+1
svn path=/trunk/; revision=49920
2013-03-17[-Wmissing-prototypes]Anders Broman1-2/+3
Use explicit casts. svn path=/trunk/; revision=48347
2012-11-29Make all enum_val_t's const.Jeff Morriss1-3/+3
svn path=/trunk/; revision=46292
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45017
2012-09-10Initial commit to support yet another method of passing data between dissectors.Jakub Zawadzki1-1/+1
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL svn path=/trunk/; revision=44860
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-05-15Remove unneeded #includes (stdlib, stdio, ctypes, time);Bill Meier1-3/+2
In a few cases: do some whitespace, indentation cleanup & reformatting. svn path=/trunk/; revision=42632
2012-04-04Avoid some potential divide by zero errors that Clang reports.Chris Maynard1-1/+1
svn path=/trunk/; revision=41923
2012-02-06Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-2/+3
svn path=/trunk/; revision=40895
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-1/+1
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-10-20Use ENC_NA as proto_tree_add_item() encoding arg for FT_ETHER hf[] field type.Bill Meier1-18/+18
(Some minor whitespace cleanup). svn path=/trunk/; revision=39488
2011-10-15Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, ↵Bill Meier1-1/+1
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-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-12/+12
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-4/+4
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-02-18Fix some dead code and zero division issues found by Clang scan-build.Gerald Combs1-1/+1
In convert_string_case() use g_utf8_strup() instead of converting each character by hand. Hopefully this won't cause any unexpected changes in behavior. svn path=/trunk/; revision=36006
2011-01-05Handling a too-long length should be handled better.Guy Harris1-0/+3
svn path=/trunk/; revision=35383
2010-12-31From FRAsse via bug 5539:Gerald Combs1-5/+5
There's a buffer overflow in ENTTEC DMX Data RLE, leading to crashes and potential code execution. From me: ep_allocate our buffers. svn path=/trunk/; revision=35318
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-4/+4
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-04-06#include <string.h> not needed.Bill Meier1-1/+0
svn path=/trunk/; revision=32410
2010-04-03Remove unneeded #include <stdio.h>Bill Meier1-1/+0
svn path=/trunk/; revision=32367
2010-01-13From Didier Gautheron:Anders Broman1-1/+0
col_clear.diff Remove calls to col_clear : - called twice. - before functions which also clear the column - by replacing col_clear + col_append_xxx with col_add_xxx https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4394 svn path=/trunk/; revision=31517
2009-08-09Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-3/+1
svn path=/trunk/; revision=29345
2009-07-07From Kovarththanan Rajaratnam:Stig Bjørlykke1-1/+1
More FT_XXX cleanup. svn path=/trunk/; revision=28971
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-21/+21
(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-04-14ep_strbuf usage: ep_strbuf_new_label("") --> ep_strbuf_new_label(NULL);Bill Meier1-2/+2
ep_strbuf_append() --> ep_strbuf_append_c() in a few cases. svn path=/trunk/; revision=28052
2009-03-30In packet-enttec.c and packet-fw1.c, replace string pointer tracking with aGerald Combs1-16/+8
string buffer. In packet-ftp.c and packet-gift.c, cast some size_t's. svn path=/trunk/; revision=27896
2009-03-17Add a comment about the way g_snprintf is used.Bill Meier1-0/+7
svn path=/trunk/; revision=27758
2009-02-22Incorporate plugin dissector into build in collection.Jaap Keuter1-0/+564
svn path=/trunk/; revision=27503