aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
AgeCommit message (Collapse)AuthorFilesLines
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>
2016-06-22Add address_to_bytes API.Michael Mann1-1/+1
This will copy an address's "byte format" into a buffer. The original intended design is for export_pdu functionality, which tries to do this "manually" for many address types (and creates undesired dependencies) The default functionality if a "byte format function" isn't provided (currently the case for all address types) is a memcpy of the address data. Providing "address to byte" functions to aid export PDU functionality will be provided later. Change-Id: I3703f9e617a8cef09165ad53a0f98c6372676b9b Reviewed-on: https://code.wireshark.org/review/16070 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-06-19Revert "tap: change glib functions to wmem."Pascal Quantin1-3/+3
This reverts commit 2e9f3c5d366eaa7139fc877b5301392166b3f985. It breaks the registration of codec, dissector and libwiretap plugins. Change-Id: I4ef91dd192f765adf87ea9fe9f3693e25dbd24de Reviewed-on: https://code.wireshark.org/review/16012 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-17tap: change glib functions to wmem.Dario Lombardo1-3/+3
Change-Id: I878ae6b121a669f9b7f4e1e57bc079f0cb44c0bf Reviewed-on: https://code.wireshark.org/review/15270 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-15Remove Nmake build systemPascal Quantin51-1873/+2
Change-Id: I3bd474f3cda9667dec66426b5729449953df3e61 Reviewed-on: https://code.wireshark.org/review/15777 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jörg Mayer <jmayer@loplof.de> Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2016-06-15Allow control of individual columns to be (un)writable.Michael Mann1-3/+3
Most protocols just want to limit COL_INFO or COL_PROTOCOL so give that level of granularity. Bug: 12144 Bug: 5117 Bug: 11144 Change-Id: I8de9b7d2c69e90d3fbfc0a52c2bd78c3de58e2f8 Reviewed-on: https://code.wireshark.org/review/15894 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-15Change how dissectors do late-field-registration to avoid a double-registrationJeff Morriss1-5/+2
assertion. If a dissector forces registration of fields during dissection it needs to do so in a way that clears the prefix registration. Otherwise epan will call the registration routine a 2nd time (which will cause us to assert out) if a user types a display filter (with the dissector's prefix) that doesn't exist. Update the proto_register_prefix() comments to reflect this. Change-Id: I3ce29243395fb55192bb5dfd950baa88410ac136 Reviewed-on: https://code.wireshark.org/review/15881 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2016-06-12Store the tree item to add to later (CID-1159152)Jaap Keuter1-1/+1
The tree item needed to test and append to isn't being stored, so the items are never amended with notes, resulting in dead code. Change-Id: Ib1a9b7994ad12a9a9013d1bc1e1e4c165f34f20f Reviewed-on: https://code.wireshark.org/review/15826 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-06-02profinet: set ioDataObject structure to 0Pascal Quantin1-1/+1
Bug: 12486 Change-Id: I9e8be44325e0bdd5174bd01e4e1ea4922f7090cc Reviewed-on: https://code.wireshark.org/review/15696 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-01[docsis->type35ucd] Fix TLV 15 & 16 bugsAdrian Simionov1-5/+9
+ TLV 15 has value decoded as on off + TLV 16 shows text parameters instead of decimal value Change-Id: I6f0baa410f12e20825379a3ff0cd6174aa2bc576 Reviewed-on: https://code.wireshark.org/review/15678 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-31[docsis->rngrsp] Packet decoded in greater detailAdrian Simionov1-101/+107
Next steps would be to add expert and add missing TLVs. Change-Id: Ia05d81c380d412ab02e55bbfc08363d9153ff1c3 Reviewed-on: https://code.wireshark.org/review/15617 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>
2016-05-29[docsis->type35ucd] TLV 7 ON OFFAdrian Simionov1-1/+4
Change-Id: I5083346cb03de522d76632eba5ec9cbbf17666ea Reviewed-on: https://code.wireshark.org/review/15603 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-05-27Don't use "== {TRUE,FALSE}" when testing whether a Boolean is true or false.Guy Harris1-28/+30
"if (boolean)" suffices to test for true, and "if (!boolean)" suffices to test for false. Most of the time, explicitly comparing against TRUE or FALSE is harmless, although possibly slightly less efficient, as you're explicitly testing against 1 rather than testing for "not zero". *However*, if you want to test whether a given bit is set in a flags field, "if ((flags & flagbit) == TRUE)" *DOES NOT WORK* unless "flagbit" is equal to 1, because TRUE is equal to 1, and if "flagbit" is not equal to 1, "flags & flagbit" will *NEVER* be equal to 1. So comparing "== TRUE" is a bad habit to get into, as it might lead to its use when doing bit testing. While we're at it, clean up some other tests: "if (!(x == FALSE))" really means "x is true", so write it as such, i.e. "if (x)"; if (a && b) do this; if (a && !b) do that; reads better as if (a) { if (b) do this else do that } when doing bit testing, there's no need to shift the bit, just test it (and, no, that doesn't conflict with the bit about TRUE being 1 - *just test the bit*, it's the standard C idiom). Fixes CID 1362119. Change-Id: I011154caae45307796ffd270d265c05a2533b1db Reviewed-on: https://code.wireshark.org/review/15585 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-05-26Cyclic PROFINET PROFIsafe RTC1 data dissectionT. Scholz8-113/+2042
New implemented functions for profinet plug-in to read cyclic RTC1 data frames more detailed and further to dissect PROFIsafe on PROFINET frames. New functions include: - Reading the PROFINET "Ident OK" Frame for detailed module information, as ModuleIdentNr., SubModuleIdentNr., etc. total dynamically - Improved the existing dissection of fParameter with usage of GSDML-files, as the indexnumber for those parameters can change - Reading a GSDML-file for further module-information, such as PROFIsafe Module, etc. - Aded new pnio protocol preferences, in which the user can define its own network path to his GSDML-files, so that Wireshark is able to read those files for detailed information output. - Added new filter functions for PROFINET and PROFIsafe - All gained and saved information will be used to dissect the cyclic PROFINET frames Bug: 12216 Change-Id: I379da1d349fa099047953042f1aa30450bee5b30 Reviewed-on: https://code.wireshark.org/review/14119 Petri-Dish: Jim Young <jim.young.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Birol Capa <birol.capa@siemens.com> Reviewed-by: Michael Mann <mmann78@netscape.net>