aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gvcp.c
AgeCommit message (Collapse)AuthorFilesLines
2018-12-27Try to squeeze some bytes out of the frame_data structure.Guy Harris1-5/+5
Make the time stamp precision a 4-bit bitfield, so, when combined with the other bitfields, we have 32 bits. That means we put the flags at the same structure level as the time stamp precision, so they can be combined; that gets rid of an extra "flags." for references to the flags. Put the two pointers next to each other, and after a multiple of 8 bytes worth of other fields, so that there's no padding before or between them. It's still not down to 64 bytes, which is the next lower power of 2, so there's more work to do. Change-Id: I6f3e9d9f6f48137bbee8f100c152d2c42adb8fbe Reviewed-on: https://code.wireshark.org/review/31213 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-01Use common indenting space in headingStig Bjørlykke1-14/+14
Change-Id: I47022f9c7d568ca6d9705ba63c669a980822818a Reviewed-on: https://code.wireshark.org/review/27229 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-21GVRP: fix typoAlexis La Goutte1-4/+4
I: libwireshark0: spelling-error-in-binary usr/lib/x86_64-linux-gnu/libwireshark.so.11.0.0 Endianess Endianness Change-Id: I294979b36e389ab3d893aa7f0a6dcc4084a9c858 Reviewed-on: https://code.wireshark.org/review/27053 Reviewed-by: Anders Broman <a.broman58@gmail.com>
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>
2017-11-09gvcp:bat1-79/+226
- Added support for new registers: - GVCP_IEEE_1588_EXTENDED_CAPABILITY (0x00000974) - GVCP_IEEE_1588_SUPPORTED_PROFILES (0x00000978) - GVCP_IEEE_1588_SELECTED_PROFILE (0x0000097C) - Added support for missing/new error codes (0x8013 - 0x8017) - Added dissector code for 'current link configuration' part of device mode register - Added support for proper event dissection with the length field in event commands is used as recommended by the GEV 2.1 specification - Added dissector code for new capability/configuration bits (iee1588 profile, multi-part, large leader/trailer, ieee extended capabilities) - BUGFIX: In multi-zone mode, zone directions where decoded as 'Receiver' and 'Transmitter' instead of 'Bottom Up' and 'Top-Down' - BUGFIX: Commands that received at least one 'PENDING_ACK' before the final acknowledge where always reported with '(Failed)' in the Wireshark main window - Fixed some typos gvsp: - Added full multi-part dissection support - Replaced some hard-coded numbers by numerical constants - Added support for missing/new error codes (0x8013 - 0x8017) - BUGFIX: In multi-zone mode, zone directions where decoded as 'Receiver' and 'Transmitter' instead of 'Bottom Up' and 'Top-Down' - Combined 'AddressOffsetHigh/Low' for multi-zone/part into a single more readable 64-bit value Change-Id: I55862204ef71f69bc88c79fe2259f7cb8365699a Reviewed-on: https://code.wireshark.org/review/24299 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-10[gvcp] fix extendedblockids check and resend cmd parsingFelix Ruess1-3/+3
Change-Id: I9e0314ae2e975a1c50cfaf2b00e469ad7f640357 Reviewed-on: https://code.wireshark.org/review/23866 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>
2017-04-03Use col_append_str() for fixed stringsStig Bjørlykke1-4/+4
Change from col_append_fstr() to col_append_str() when appending strings without formatting. Change-Id: I8975704c246f2b9a1301ed5f96273aa9d61c6f44 Reviewed-on: https://code.wireshark.org/review/20857 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-12-31Dissectors don't need a journey of self discovery.Michael Mann1-8/+4
They already know who they are when they register themselves. Saving the handle then to avoid finding it later. Not sure if this will increase unnecessary register_dissector functions (instead of using create_dissector_handle in proto_reg_handoff function) when other dissectors copy/paste, but it should make startup time a few microseconds better. Change-Id: I3839be791b32b84887ac51a6a65fb5733e9f1f43 Reviewed-on: https://code.wireshark.org/review/19481 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-12-16Remove proto_item_append_text calls in favor of BASE_UNIT_STRING.Michael Mann1-4/+2
Many proto_item_append_text calls were just adding a unit string to a field. There's a better way to do that now. Change-Id: Id18d5ac1ea4d8ecdc4cbe7ebaec07fbd2eab6e78 Reviewed-on: https://code.wireshark.org/review/19289 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-4/+4
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-13Use result of register_dissectorPeter Wu1-11/+6
Assign result of `register_dissector(..., func, proto)` to FOO_handle and remove `FOO_handle = create_dissector_handle(func, proto)`. Found by looking for files named packet-FOO.c having the above create_dissector_handle pattern. Some files (with different dissect routines for the two functions) remain unchanged. Change-Id: Ifbed8202c6dbc63a1dae9acc03313980ffbbbb90 Reviewed-on: https://code.wireshark.org/review/13247 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-1/+1
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c Reviewed-on: https://code.wireshark.org/review/12485 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-1/+1
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>
2015-11-20More spelling fixes found by lintianBalint Reczey1-1/+1
Change-Id: Id218dec9e5a721d6c63fd34962ffe50b6ab8dd56 Reviewed-on: https://code.wireshark.org/review/11946 Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Diederik de Groot <dkgroot@talon.nl> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-10-27GVCP: do not try to append register value to info column when READREG_ACK ↵Pascal Quantin1-1/+8
has an error status Bug: 11639 Change-Id: I1389b74092138e3b28cf4f0dd2d2c8967ec8ba12 Reviewed-on: https://code.wireshark.org/review/11310 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-10-01Treat IPv4 subnet masks as distinct from addressesJeffrey Smith1-3/+3
While IPv4 subnet masks are obviously related and similar to IPv4 addresses, they are distinct enough that they need to be treated seperately in some aspects. For instance, there is no value in attempting to resolve a subnet mask. This change creates a new display type: BASE_NETMASK, which allows distinction from FT_IPv4 (and possible name resolution) where appropriate. Change-Id: I99e19c9a58eb613f8e58d481af84c30e2e5e14d7 Reviewed-on: https://code.wireshark.org/review/10438 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> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-13GVCP: fix dissection of Stream Channel Packet Size registerPascal Quantin1-4/+4
Bug: 11442 Change-Id: I1c187bdf7ffd14b2a4f66d29883a4b112486bd35 Reviewed-on: https://code.wireshark.org/review/10014 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-1/+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-02Eliminate proto_tree_add_text from several dissectors.Michael Mann1-14/+30
Change-Id: I6d3125f15d268edd47ef74dd655eb86cb25ee52d Reviewed-on: https://code.wireshark.org/review/5047 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>
2014-08-16Fix warning: no previous prototype for ... [-Wmissing-prototypes]Alexis La Goutte1-0/+1
Change-Id: I9dfff8032e8aa4634466fb4cb3b136ff6df1c4b7 Reviewed-on: https://code.wireshark.org/review/3635 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-29convert to proto_tree_add_subtree[_format]Michael Mann1-30/+23
Change-Id: If110de1e0555637264f86f1508858d569871a9c7 Reviewed-on: https://code.wireshark.org/review/2675 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-16Try to fix stack-buffer-overflow caught by ASANEvan Huus1-7/+3
Use wmem_array_append rather than wmem_array_append_one to make sure the pointer types match up. _append_one automatically takes the address of its argument, which causes problems if that argument is already a pointer. Thanks to Alexis for catching this. Change-Id: Ie702bb2c776f9fcf31bd64073c756edd75d888e8 Reviewed-on: https://code.wireshark.org/review/1657 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-29Convert a few dissectors with simple request/response tracking from ↵Pascal Quantin1-6/+6
red/black tree to hash map Update the readme file accordingly Change-Id: I056d1ab1f77df641b83fa9b3618b6c25d66e1a83 Reviewed-on: https://code.wireshark.org/review/1420 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-27Fix Dereference of null pointer found by Clang analyzerAlexis La Goutte1-1/+1
packet-gvcp.c:2101:7: warning: Access to field 'req_frame' results in a dereference of a null pointer (loaded from variable 'gvcp_trans') Change-Id: If39453f9f2ade551fd8c7e369fd60325c16df24b Reviewed-on: https://code.wireshark.org/review/1393 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-27Add Modelines infoAlexis La Goutte1-0/+13
Change-Id: I978198266523a0b1f0ba9d4ed6848664a6fa3637 Reviewed-on: https://code.wireshark.org/review/1394 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-27Fix warning found by -Wunused-const-variable (Clang 3.5)Alexis La Goutte1-0/+2
packet-gvcp.c:493:27: error: unused variable 'linkconfiguration_class' [-Werror,-Wunused-const-variable] Change-Id: Id31ced029af9700f47230df4afa5c0a4aaecf6d3 Reviewed-on: https://code.wireshark.org/review/1392 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-26Fix FSF address.Guy Harris1-2/+1
Change-Id: Ic79fcf7e1bebb9821d9d9db43c2a4f4291beb706 Reviewed-on: https://code.wireshark.org/review/1374 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-26Updated gvcp dissectorwarren1-442/+3793
Change-Id: I49f6acecdbcdf171ba28af171f8067322cc5ecf1 Reviewed-on: https://code.wireshark.org/review/1220 Reviewed-by: Michael Mann <mmann78@netscape.net>
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-12-19Rename a couple of to_str functions to have ep_ in the name. This makes itEvan Huus1-1/+1
obvious that the returned string is ephemeral, and opens up the original names in the API for versions that take a wmem pool (and thus can work in any scope). svn path=/trunk/; revision=54249
2013-12-15Fix [-Wmissing-prototypes]Jakub Zawadzki1-0/+3
svn path=/trunk/; revision=54135
2013-10-23#if 0 numerous "unused const variables" (mostly value-string-arrays);Bill Meier1-0/+2
Also; fix a few "set but not used" warnings. svn path=/trunk/; revision=52780
2013-09-15Convert a few more dissectors to wmem APIPascal Quantin1-43/+44
svn path=/trunk/; revision=52053
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
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-1/+1
(Some minor whitespace cleanup). svn path=/trunk/; revision=39488
2011-10-10 Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-2/+2
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_BOOLEAN FT_IPv4 FT_EUI64 FT_GUID FT_UINT_STRING Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260) svn path=/trunk/; revision=39328
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-18/+18
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-5/+5
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-08-16Based on patch from Denis Ovsienko viaJeff Morriss1-13/+13
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6244 : Fix typo: s/unkown/unknown/ svn path=/trunk/; revision=38561
2011-04-18Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang Alexis La Goutte1-2/+1
svn path=/trunk/; revision=36705
2011-01-21Adress => Address corrections (also in comments).Sake Blok1-3/+3
(see bug 5600) svn path=/trunk/; revision=35600
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-1/+1
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-03-16A few minor changes:Bill Meier1-14/+15
- Move proto_reg_handoff... to the end of the file; - Remove unneeded forward declaration; - Fix a typo; - Use #if 0/#endif rather than /*...*/to comment-out code. svn path=/trunk/; revision=32200
2010-03-15tvb_length() is *not* the length of the packet; it's the amount ofGuy Harris1-6/+6
captured data for the packet, which could well be less then the length of the packet if a slice/snapshot length was used. tvb_reported_length() is the length as the packet appeared on the {wire,air}. If a > b, and you want to report how much a was greater than b, subtract b from a, don't take the negative of b-a, especially if a and b are unsigned.... svn path=/trunk/; revision=32199
2010-03-15From Adrian Daerr:Jaap Keuter1-0/+464
I have written a crude dissector of GigE-vision Control Protocol packets. The dissector was written as part of the opengigevision project: http://gitorious.org/opengigevision svn path=/trunk/; revision=32198