Commit Graph

36 Commits

Author SHA1 Message Date
Michael Mann cff098e3eb guid_to_ep_str -> guid_to_str
guid_to_str now uses wmem allocation.

Change-Id: I8e48d1a720942fbefbaa6227ae0929cb9f856359
Reviewed-on: https://code.wireshark.org/review/6391
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-08 07:18:09 +00:00
Martin Mathieson 48db2548a9 Deleting unneccessary #includes from dissectors.
Second batch (packet-eth.c -> packet-icmpv6.d).

Will look at cleaning up and committing script afterwards.

Change-Id: I14295758b81a59115d8c88899f166cc3d5d17594
Reviewed-on: https://code.wireshark.org/review/6013
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-23 12:22:54 +00:00
Bill Meier b5d7b7ab6e Cleanup use of #includes in non-generated epan/dissector/*.c
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-12-21 05:46:22 +00:00
Pascal Quantin 38c9ac870a GlusterFS: fix OSX compilation failure
ged0b19b introduced support for 64 bits bitmask. Make use of it and add an explicit cast to fix a compilation error

Change-Id: I9f2202d851aedc0dc78655c505b5a0b26b224c0e
Reviewed-on: https://code.wireshark.org/review/4630
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-10-12 21:44:36 +00:00
Bill Meier 9b181b97c6 Add editor modelines; Adjust whitespace; Remove boilerplate comments
Change-Id: I1f5f83ed441f6009125cf2cbe5023af04986898a
Reviewed-on: https://code.wireshark.org/review/4392
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-30 21:06:37 +00:00
Michael Mann fe4b7ee625 convert to proto_tree_add_subtree[_format]
Change-Id: If110de1e0555637264f86f1508858d569871a9c7
Reviewed-on: https://code.wireshark.org/review/2675
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-29 13:10:02 +00:00
Dario Lombardo 971ffd683e Fixup: tvb_get_string(z) -> tvb_get_string(z)_enc
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe
Reviewed-on: https://code.wireshark.org/review/2376
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:13:58 +00:00
Niels de Vos 9ac8052fb1 glusterfs: correctly decode GFIDs that are passed in a dict
When a dict structure is passed by GlusterFS, the values are not encoded
normally. We now assume that the GFID in the dict is in network-order,
but this will be incorrect for Big Endian systems. The majority of
Gluster deployments are on Little Endian, and the GFID is displayed
correctly for this case. I am sorry for the few users on Big Endian
Gluster environments, they will see some GFIDs in Wireshark that don't
exist on the Gluster volume.

With this change, it is also made possible to filter on the GFID that is
contained inside of the dict.

Change-Id: I62a265eca34df23a507403397012cf652d43ca54
Reported-by: Vikhyat Umrao <vumrao@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: https://code.wireshark.org/review/1856
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-16 15:48:44 +00:00
Vikhyat Umrao 2fa5996984 glusterfs: if filename itself will become <EMPTY>
This patch will solve the issue in LOOKUP procedure if filename itself will become <EMPTY>.

Change-Id: Ib983ac4f9325db040a6b4eb3fc63179b36103bf4
Reported-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
Reviewed-on: https://code.wireshark.org/review/1854
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-29 11:21:03 +00:00
Vikhyat Umrao 9cd3c5c5fc glusterfs: show filenames in the summary for common procedures
With this patch we will have filename on the summary for procedures MKDIR, CREATE and LOOKUP.

Example output:

173  18.309307 192.168.100.3 -> 192.168.100.4 GlusterFS 224 MKDIR V330 MKDIR Call, Filename: testdir
2606  36.767766 192.168.100.3 -> 192.168.100.4 GlusterFS 376 LOOKUP V330 LOOKUP Call, Filename: 1.txt
2612  36.768242 192.168.100.3 -> 192.168.100.4 GlusterFS 228 CREATE V330 CREATE Call, Filename: 1.txt

Change-Id: I1995c309028f1472a61719d6d7d6ae2c68412a95
Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
Reviewed-on: https://code.wireshark.org/review/1833
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-28 08:51:16 +00:00
Niels de Vos 2f960b7098 gluster: add support for GlusterD v3 procedures
The GlusterD Management protocol has been updated to version 3. All procedures are implemented with this change.

This change also takes care of converting values passed in a dictionary
to real and displayable GUIDs.

Change-Id: I93808eda393745aa9ab3b986a6b7997f6f80df50
Reported-by: Vikhyat Umrao <vumrao@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: https://code.wireshark.org/review/1411
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-05-01 11:52:19 +00:00
Niels de Vos 48c05a4f8e GlusterFS: correctly dissect flags passed with OPEN, CREATE, etc.
RPC/XDR is in big-endian, just like dissect_rpc_uint64() and friends.

Change-Id: I0843e280bd2ffc2c4bd9a5273a7343a17d81ad6a
Reported-by: Xavier Hernandez <xhernandez@datalab.es>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: https://code.wireshark.org/review/1066
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-11 13:08:33 +00:00
Ronnie Sahlberg 51f26ab49a NFS: We need to pass data through to the dissect_rpc_list() callback
Change-Id: Iace7c6dfb81f0a98bbae304346906a5e82c82812
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Reviewed-on: https://code.wireshark.org/review/679
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-16 18:01:19 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(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>
2014-03-04 14:27:33 +00:00
Niels de Vos 0cb4b4e44d GlusterFS: add support for ZEROFILL fop
Implementation details in http://review.gluster.org/5327

BUG: 9812
Change-Id: Ib1650fb7ca8221def4e9c6a323008847dc7b5f62
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: https://code.wireshark.org/review/429
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-01 15:16:56 +00:00
Evan Huus 2ae8edccea Rename more to_str functions to have ep_ in the name if they return ephemeral
buffers. Remove two unused functions.

svn path=/trunk/; revision=54250
2013-12-19 16:28:39 +00:00
Jakub Zawadzki c45475ab45 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54135
2013-12-15 23:44:12 +00:00
Michael Mann af0819f942 Add data parameter to dissect_function_t in vsff structure. The intention here is to use it to replace some pinfo->private_data.
I didn't realize how expansive this change would be, so committing it now before replacing the pinfo->private_data, so if something needs to be reverted, all of this is not lost.

svn path=/trunk/; revision=53213
2013-11-10 03:20:04 +00:00
Jakub Zawadzki 1899903f69 Include <epan/to_str.h> only when needed.
svn path=/trunk/; revision=53189
2013-11-09 13:41:10 +00:00
Pascal Quantin 102c452bcb More emem -> wmem conversion:
- tvb_get_g_stringz()/tvb_get_ephemeral_stringz()/tvb_get_seasonal_stringz() -> tvb_get_stringz()
- tvb_get_g_stringz_enc()/tvb_get_ephemeral_stringz_enc() -> tvb_get_stringz_enc()
- tvb_get_ephemeral_unicode_stringz() -> tvb_get_unicode_stringz()
- tvb_bcd_dig_to_ep_str() -> tvb_bcd_dig_to_wmem_packet_str()
- update docs accordingly

svn path=/trunk/; revision=52180
2013-09-22 20:04:35 +00:00
Pascal Quantin a0c53ffaa1 emem -> wmem conversion:
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits()
- tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup()
- tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode()
- tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string()
- tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string()
- tvb_get_ephemeral_string_enc() -> tvb_get_string_enc()
- update docs accordingly

svn path=/trunk/; revision=52172
2013-09-22 15:50:55 +00:00
Evan Huus 27c4a47c29 Enum was used after all. Restore it and namespace it with GLUSTER_ to avoid the
collision.

svn path=/trunk/; revision=52144
2013-09-19 13:04:37 +00:00
Jeff Morriss c29fb44886 From Niels de Vos via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8861 :
Recent versions of GlusterFS have extended the RPC protocol with new
procedures. The RPC-program-version has not been updated (yet?).

The attached adds support dissecting the FREMOVEXATTR, FALLOCATE and
DISCARD procedures.

svn path=/trunk/; revision=50207
2013-06-28 12:42:41 +00:00
Michael Mann 78ebc850ba Convert 'Old GFID' and 'New GFID' to FT_GUID type.
From Niels de Vos, Bug 8612 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8612)

svn path=/trunk/; revision=49093
2013-04-30 00:55:18 +00:00
Pascal Quantin 722b981c9f From Niels de Vos via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7310 :
glusterfs: improve endianness handling and displaying of dict contents

svn path=/trunk/; revision=48461
2013-03-21 19:49:21 +00:00
Stig Bjørlykke 8dfa2eac7e Set correct item lengths. They cannot all be until end of buffer.
svn path=/trunk/; revision=48296
2013-03-14 12:23:05 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Evan Huus 3c57a48598 From Niels de Vos via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7807
Fix dissection of some GlusterFS procedures.

From me:

Use TRUE/FALSE instead of 1/0 for boolean literals.

svn path=/trunk/; revision=45401
2012-10-08 19:23:50 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Bill Meier 638d74d43f Use val_to_str_const() where appropriate;
Also (for a few files):
- create/use some extended value strings;
- remove unneeded #include files;
- remove unneeded variable initialization;
- re-order fcns slightly so prefs_reg_handoff...() at end, etc

svn path=/trunk/; revision=44438
2012-08-10 22:55:02 +00:00
Michael Mann 1d9c472cae convert some simple uses to use ephemeral memory
svn path=/trunk/; revision=44413
2012-08-10 02:05:19 +00:00
Bill Meier b1eb22bd51 Minor cleanup;
- Remove unneeded #includes;
 - Create/use value_string_ext for some value_string arrays;
 - Do some whitespace changes and reformat some lines.

svn path=/trunk/; revision=43706
2012-07-13 21:59:25 +00:00
Pascal Quantin 698337ee9a Prettify display of O_RDONLY and O_ACCMODE flags
svn path=/trunk/; revision=43510
2012-06-27 14:57:58 +00:00
Anders Broman 059d407e19 From Niels de Vos: GlusterFS: Display SETATTR attribute valid as a list of flags https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7341
svn path=/trunk/; revision=43144
2012-06-06 20:44:21 +00:00
Guy Harris 6a43200ee9 Squelch warning about uninitialized variable (the dataflow analysis
isn't sophisticated enough to know that can't happen).

svn path=/trunk/; revision=42983
2012-06-01 18:01:42 +00:00
Pascal Quantin b9917a1248 From Niels de Vos via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7310 :
Initial support for the GlusterFS RPC-protocol

svn path=/trunk/; revision=42979
2012-06-01 17:10:03 +00:00