summaryrefslogtreecommitdiff
path: root/plugins
AgeCommit message (Collapse)AuthorFilesLines
2016-12-02Include config.h at the very beginning of all Flex scanners.Guy Harris2-2/+10
That way, if we #define anything for large file support, that's done before we include any system header files that either depend on that definition or that define it themselves if it's not already defined. Change-Id: I9b07344151103be337899dead44d6960715d6813 Reviewed-on: https://code.wireshark.org/review/19035 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-11-26DOCSIS: fix an infinite recursion introduced in g3e1828ePascal Quantin1-1/+4
Bug: 13179 Change-Id: I4c510dab463f7c223bcaabd3157ca791dd86d690 Reviewed-on: https://code.wireshark.org/review/18958 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Seth Alexander <pxsdaemon@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-11-25PROFINET: Update LineDelay DissectionBirol Capa1-8/+67
When LineDelay is decoded, the FormatIndicator is not evaluted. Sample LineDelay: 2147483658 (0x80 00 00 0a) This value should be 10, since FormatIndicator (Bit 31) = 0x01 states that this is a CableDelay. Change-Id: I08ae8e6de8b6f8c493122109e29e91dc47096734 Reviewed-on: https://code.wireshark.org/review/18950 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-11-24Removed Manipulation of Visited FlagSeth Alexander1-3/+5
Change-Id: Ic77afa3fd0b9cabb3f2681be099e11be79d271be Reviewed-on: https://code.wireshark.org/review/18938 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-11-22Added Path Value and CRC to DOCSIS PluginSeth Alexander1-421/+747
DOCSIS update with basic defragmentation Bug: 13106 Change-Id: Idbb42c80b87c0c3189da087b523733cf0b19967c Reviewed-on: https://code.wireshark.org/review/18676 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-11-14profinet (dcerpc pn io): Fix Dead Store (Dead assignement/Dead increment) ↵Alexis La Goutte1-1/+1
Warning found by Clang Change-Id: I5b7d97b6238c26dd8fa748aaa59a84eb4a03274c Reviewed-on: https://code.wireshark.org/review/18814 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-11-13PROFINET: Add Asset Management Record DissectionBirol Capa1-2/+608
Identification and Maintenance (I&M) and AssetManagement (AM) functions are to collect information about the assets of an automation plant to cover the use cases such as identification, configuration, commissioning, diagnosis etc.. PROFINET plugin should support the Asset Management Record (AMR). Bug: 13112 Change-Id: I9c557b5f7f4f633fdd475c2c9e8900a8e6c2ba47 Reviewed-on: https://code.wireshark.org/review/18719 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-11-13DOCSIS: Added dissector for type51 UCDBruno Verstuyft3-0/+1649
Change-Id: Ifb46b2bd0a6eeae3e641ebcb3ecc89fc4f74b3f9 Reviewed-on: https://code.wireshark.org/review/18673 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-11-10PROFINET: Update MRP dissection according to IEC62439-2 Ed.2.Birol Capa1-55/+189
The MRP PDU dissection is updated with respect to MRP standard IEC62439-2 Ed.2. 0x88e3 is added for MRP Ether Type String definions of MRP block and sub block types are updated. dissect_pn_ManuData function is removed since it is not used anymore. Change-Id: Iec6666abc75bcba4189f2c38851407abc23267f9 Reviewed-on: https://code.wireshark.org/review/18730 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-11-07PROFINET: Update preliminary version of the Reporting System (RS) dissection.Birol Capa1-17/+72
Timestamp decoding is added. Name of "Stop Observer" is changed as "Observer Status Observer". TimeStatusObserver padding bytes location is changed. Text of RS_ReasonCode for value "0" is changed from "Reserved" to "No Detail". Change-Id: I2c231d75001a89a1e41f2518f5c6ca1fdf49a2f0 Reviewed-on: https://code.wireshark.org/review/18662 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-10-27gryphon (plugins): fix spelling typo found by lintianAlexis La Goutte1-2/+2
Change-Id: I82f87f809ff0a261dacf38a2fb52aa4788403490 Reviewed-on: https://code.wireshark.org/review/18500 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-27docsis (plugins): fix spelling typo found by lintianAlexis La Goutte1-2/+2
Change-Id: I730c8df46165d4778174d6931785765d2434d14d Reviewed-on: https://code.wireshark.org/review/18502 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-27ethercat (plugins): fix spelling typo found by lintianAlexis La Goutte1-1/+1
Change-Id: I85a86953c89979e975e178fed1ae13dddab304d0 Reviewed-on: https://code.wireshark.org/review/18501 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-21Clean up file handle management.Guy Harris1-9/+5
The main reason fclose() could fail is if the file is open for writing, not all the buffered data has been written out at the time fclose() was called, and the attempt to write it out fails. In any case, the file handle is no longer valid after fclose() completes, whether the close succeeds or not, so there's no reason to keep it around. There's no reason to check whether it's null in a loop called in code where it's not null to start with and where it's not set to null in the loop. This should fix CID 1374111. Change-Id: Ib8067a17731b41d6b184a5a415addc2ecaa7c00c Reviewed-on: https://code.wireshark.org/review/18359 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-10-19Drop redundant SIZEOF() macroBalint Reczey2-12/+10
Change-Id: I6db2033746f5f22dd0229c96727bb352bdb1e866 Reviewed-on: https://code.wireshark.org/review/18298 Reviewed-by: Balint Reczey <balint@balintreczey.hu> Petri-Dish: Balint Reczey <balint@balintreczey.hu> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-13Convert most UDP dissectors to use "auto" preferences.Michael Mann5-110/+17
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-12PROFINET: Don't display expert information when implicit AR is used.Birol Capa1-21/+19
According to specification: Value(UUID): 00000000-0000-0000-0000-000000000000 Meaning: Reserved Use: The value NIL indicates the usage of the implicit AR. Change-Id: Iea807f14bf6da36700b778a1383ebd970aa105a5 Reviewed-on: https://code.wireshark.org/review/17951 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-10Profinet I/O: Sanity check number of I/O objectsMichael Mann1-5/+22
Can prevent really long loops from fuzz testing. Bug: 12851 Change-Id: I85e00af2c4753ce4c5bcb650a7df188d7f679c9a Reviewed-on: https://code.wireshark.org/review/18136 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 Mann6-64/+14
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-10-03PROFINET: Add preliminary version of the Reporting System (RS) dissection.Birol Capa2-9/+964
The Reporting System (RS) ASE is composed of Observers and Event buffer queues. Bug: 12959 Change-Id: Ibce2d607bffe9c04b24e8ccd5ef502307fbba7c6 Reviewed-on: https://code.wireshark.org/review/17965 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-09-30cmake: make WERROR_COMMON_FLAGS a normal stringPeter Wu14-98/+252
Instead of checking for the boolean "FALSE", just set an empty string. This avoids the need to check for WERROR_COMMON_FLAGS before using it. The transformation is the same for all files, remove "if (WERROR_COMMON_FLAGS)" and "endif()", reindent and add quotes (since we have a string here and not a list). Modelines have been added where missing. Change-Id: I0ab05ae507c51fa77336d49a99a226399cc81b92 Reviewed-on: https://code.wireshark.org/review/17997 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Dario Lombardo <lomato@gmail.com> Tested-by: Dario Lombardo <lomato@gmail.com>
2016-09-29PROFINET: Fix variable may not have been initialized warningBirol Capa2-5/+5
The variable may not have been initialized. To make code more readable and to avoid possible future mistakes initialize the variables. Change-Id: I0c5e78b6d625c87252a4c47e263a3d5c701f2674 Reviewed-on: https://code.wireshark.org/review/17962 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-09-29PROFINET: Fix switch statement has no defaultBirol Capa1-0/+4
A switch statement has no section labeled default. To make the code more readable add the default statement with a good comment. Change-Id: Iacd9b1520628e229baedc89277d07ffac2caf1b6 Reviewed-on: https://code.wireshark.org/review/17960 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-09-29PROFINET: Fix pointer variable 'fp' previously deallocated warningBirol Capa1-1/+4
'fp' pointer variable was freed or deleted in an earlier statement. To make code more readable and to avoid possible future mistakes make sure that developer sees this situation. Change-Id: Ib5b9c4c32000adf05a30e094ebc98fe4bc4cfa52 Reviewed-on: https://code.wireshark.org/review/17961 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-09-28PROFINET: Fix possibly passing a null pointer to functionBirol Capa1-6/+6
A NULL pointer is possibly being passed to a function identified. Change-Id: I87afb4fcd669451d94fecbcb827e7ff82d3e6740 Reviewed-on: https://code.wireshark.org/review/17950 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2016-09-23mate: fix Match edge cases, improve documentationPeter Wu3-280/+184
Use strcmp to sort AVPs in an AVPL and for matching instead of comparing pointer addresses. Pointers can only be used for (in)equality, there is no ordering in them. Matching of attributes however requires a better ordering to know whether the operator (condition) or whether the operand (data) can be skipped. Otherwise it is possible that condition (b) randomly fails to match data (a,b). User-visible changes (mainly edge cases): - Loose (a=1, a?) on data (a=0, a=1) would previously fail to return (a=0,a=1) because the a? condition is not tried for data a=0. Now it tries all compatible conditions for a data AVP. - Any Match condition like (a=1, a^1) would previously be treated the same as (a=1) while (a^1, a=1) would still be seen as (a^1, a=1). The first case is now fixed to match (a=1, a^1). (Via a fix in insert_avp to ensure that (a=1) is not considered the same as (a^1).) - Every (a=1, a=2) on data (a=1, b=1) previously failed, but the comment "it will not create a list if there is not a match for every attribute in op" suggests that it should return (a=1). - Every (a=1) on data (a=2) previously succeeded (bug) while it would fail on (a=2, b=1). This is fixed now by checking whether any of the conditions really have matching data for the attribute. Other changes: optimize merge_avpl and new_avpl_*_match to insert in linear time instead of quadratic, rewrite and add comments in an attempt to make it easier to understand. Merge the new_avpl_every_match and new_avpl_exact_match functions and rename it to new_avpl_pairs_match to reflects its actual implemented functionality. Not addressed in this patch is the quasi-randomness of the returned data AVPL. AVPLs are unordered, so the condition Strict (a?) on data (a=1, a=2) could in theory return either (a=1) or (a=2). In practice this returns (a=1) because of alphabetical ordering, but this cannot really be relied on. It gets worse for conditions like Strict (a?, a>1), these are considered undefined behavior (without warnings for now). Ping-Bug: 12184 Change-Id: I0008448ffcb96183f106cb937c4f488e26a82f92 Reviewed-on: https://code.wireshark.org/review/17777 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-09-22Fix Profinet RPCInterfaceUUID decodingBirol Capa1-4/+6
The translation of all RPCInterfaceUUID for PNIO evaluates to "PNIO". However, UUID allows distinction of - UUID_IO_DeviceInterface (IOD-IF) - UUID_IO_ControllerInterface (IOC-IF) - UUID_IO_SupervisorInterface (IOS-IF) - UUID_IO_ParameterServerInterface (PServ-IF) Bug: 12938 Change-Id: I97c27808f61abd96728421488bb0ee5fdbace566 Reviewed-on: https://code.wireshark.org/review/17865 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-09-19Improve support for single-character fields and filter expressions.Guy Harris1-2/+2
Add an FT_CHAR type, which is like FT_UINT8 except that the value is displayed as a C-style character constant. Allow use of C-style character constants in filter expressions; they can be used in comparisons with all integral types, and in "contains" operators. Use that type for some fields that appear (based on the way they're displayed, or on the use of C-style character constants in their value_string tables) to be 1-byte characters rather than 8-bit numbers. Change-Id: I39a9f0dda0bd7f4fa02a9ca8373216206f4d7135 Reviewed-on: https://code.wireshark.org/review/17787 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-04irda: restore a line removed by mistake in ge4c059fPascal Quantin1-1/+1
Bug: 12821 Change-Id: If6423c7f8443eccd6ddb4b699bbc327a965d0d74 Reviewed-on: https://code.wireshark.org/review/17477 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-08-31Use "ecatf" as the protocol name, to parallel everything else.Guy Harris1-1/+1
The fields have names beginning with "ecatf.", the dissector is called "ecatf", and it's only the frame layer of EtherCAT anyway, so just call it "ecatf". Change-Id: I2f127363fd115c307f0525f612fe184a30d46c55 Reviewed-on: https://code.wireshark.org/review/17406 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-08-31Don't do any Decode As stuff for dissector tables not used with Decode As.Guy Harris4-4/+4
Have all dissector tables have a "supports Decode As" flag, which defaults to FALSE, and which is set to TRUE if a register_decode_as() refers to it. When adding a dissector to a dissector table with a given key, only add it for Decode As if the dissector table supports it. For non-FT_STRING dissector tables, always check for multiple entries for the same protocol with different dissectors, and report an error if we found them. This means there's no need for the creator of a dissector table to specify whether duplicates of that sort should be allowed - we always do the check when registering something for "Decode As" (in a non-FT_STRING dissector table), and just don't bother registering anything for "Decode As" if the dissector table doesn't support "Decode As", so there's no check done for those dissector tables. Change-Id: I4a1fdea3bddc2af27a65cfbca23edc99b26c0eed Reviewed-on: https://code.wireshark.org/review/17402 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-08-10ethercat: fix check for SdoControl (CID 1256520).Dario Lombardo1-1/+1
Change-Id: I6a24974b41f9abee32e3a170b607062bf80f3368 Reviewed-on: https://code.wireshark.org/review/16990 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-31Cleanup the final checkAPI g_warning complaints.Michael Mann1-5/+9
Change-Id: I7606ee55be4428909e255496c0344fffe5847f02 Reviewed-on: https://code.wireshark.org/review/16804 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-07-27Follow up for proto_tree_add_checksum.Michael Mann5-48/+144
Fill in the "gaps" so that all dissectors that verify checksums have both a status and expert info field. Also address comments from original proto_tree_add_checksum patch that didn't make it. Ping-Bug: 8859 Change-Id: I2e6640108fd6bb218cb959fe9e4ba98a13e43a2f Reviewed-on: https://code.wireshark.org/review/16590 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-26Fix some of the checkAPIs.pl warnings for g_warning.Michael Mann3-9/+12
1. Create ws_g_warning for legitimate uses of g_warning 2. Use proto_tree_add_debug_text 3. Comment some out Change-Id: Ida044bf40286b955fdd529c4f9907c8e09b3d7c5 Reviewed-on: https://code.wireshark.org/review/16678 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-25Fix checkAPI.pl warnings about printfMichael Mann1-1/+2
Many of the complaints from checkAPI.pl for use of printf are when its embedded in an #ifdef and checkAPI isn't smart enough to figure that out. The other (non-ifdef) use is dumping internal structures (which is a type of debug functionality) Add a "ws_debug_printf" macro for printf to pacify the warnings. Change-Id: I63610e1adbbaf2feffb4ec9d4f817247d833f7fd Reviewed-on: https://code.wireshark.org/review/16623 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-24Fix shadow variable warnings.Michael Mann1-8/+8
Change-Id: I1e6bd722b3f04f171b462fc680ca080bb7ec03c7 Reviewed-on: https://code.wireshark.org/review/16625 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-07-22Convert more glib memory to wmem pinfo poolPascal Quantin1-2/+1
Change-Id: I4cc23bc19a6bd8c6a8e0389eaf939dbb60fe0ca3 Reviewed-on: https://code.wireshark.org/review/16562 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-21Add proto_tree_add_checksum.Michael Mann6-212/+110
This is an attempt to standardize display/handling of checksum fields for all dissectors. The main target is for dissectors that do validation, but dissectors that just report the checksum were also included just to make them easier to find in the future. Bug: 10620 Bug: 12058 Ping-Bug: 8859 Change-Id: Ia8abd86e42eaf8ed50de6b173409e914b17993bf Reviewed-on: https://code.wireshark.org/review/16380 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-17Fix sscanf VS Code Analysis warnings.Michael Mann1-57/+62
Some needed to check return value, others were converted to use strtoul. Change-Id: I55aae216f95362b67e006f6e682abbd5ae2c8dcc Reviewed-on: https://code.wireshark.org/review/16502 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-07-15Widen some variables.Guy Harris1-7/+7
Perhaps they cannot ever have values > 65535, but there's really no benefit to restricting them to 16 bits on the 32-bit and 64-bit platforms on which we run, and this might address what CID 1364088 is *really* complaining about. Change-Id: I5238261d04783401873de89469f8e2906554add4 Reviewed-on: https://code.wireshark.org/review/16454 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-10Remove a compiler warning some platforms give.Guy Harris1-5/+5
Some UN*Xes declare an index() function, that being the name strchr() originally had in V7 UNIX. This causes warnings from compilers if you have a variable named "index", so rename the variable. Change-Id: Ibb046005d1ef911ce0739ce70a0a55c13310cdf0 Reviewed-on: https://code.wireshark.org/review/16372 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-10DOCSIS: Added dissector for Downstream Profile Descriptor (DPD)Bruno Verstuyft3-0/+393
Change-Id: I97e6e07be45a5c4de6c8c467e0c782b35036bd98 Reviewed-on: https://code.wireshark.org/review/16202 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Adrian Simionov <daniel.simionov@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-03profinet, CID 1362120: check the return value of ftell()Martin Kaiser1-11/+14
change filePosRecord's data type to long, this is what ftell() and fseek() expect limit filePosRecord's scope to the block where it's actually used if ftell() returns < 0, don't move the file pointer and don't call fseek() with the negative offset Change-Id: If5a43099c32e476a691f4d6cd26ed7fb73490fcf Reviewed-on: https://code.wireshark.org/review/16258 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-03profinet: add a space to make checkhf happyMartin Kaiser1-1/+1
without the space, checkhf complains about an ei entry martin@reykholt:~/src/wireshark.git$ ./tools/checkhf.pl plugins/profinet/packet-dcerpc-pn-io.c ERROR: NO ARRAY: plugins/profinet/packet-dcerpc-pn-io.c, ei_pn_io_unsupported Change-Id: Ie72efcec644225bc4f554117ae10672694823cad Reviewed-on: https://code.wireshark.org/review/16257 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2016-07-03DOCSIS: Update to Type 35 UCDAdrian Simionov1-19/+25
Change-Id: Ie0dda94894cfaec9bccbd69d52367034e1c629da Reviewed-on: https://code.wireshark.org/review/16242 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-30Remove Makefile.common filesJoão Valverde32-966/+546
Now that nmake build system has been removed they are not needed anymore. Change-Id: I88075f955bb4349185859c1af4be22e53de5850f Reviewed-on: https://code.wireshark.org/review/16050 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-06-28DOCSIS: Added dissector for OFDM Channel DescriptorBruno Verstuyft4-0/+419
Change-Id: Idbbc1ad126e0b01952957a914bd9c16a990a9b9e Reviewed-on: https://code.wireshark.org/review/16036 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-27tvb_get_string_enc + proto_tree_add_item = proto_tree_add_item_ret_stringMichael Mann2-18/+17
Also some other tricks to remove unnecessary tvb_get_string_enc calls. Change-Id: I2f40d9175b6c0bb0b1364b4089bfaa287edf0914 Reviewed-on: https://code.wireshark.org/review/16158 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-27DOCSIS: Fix unknown TLVs in UCD type29 caused parsing errors + bugfixesBruno Verstuyft1-271/+272
Change-Id: I9ab56ded7ebf9f087afceed979e451e369eaf1d6 Reviewed-on: https://code.wireshark.org/review/15967 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>