The existing code parsed the callback program number from
a packet and then registered the callback program number.
But since the RPC dissector checks for valid and known
program numbers, it never parses it out.
Anyway, NFS4_CALLBACK is a well known number - use it!
Change-Id: Ia812359102bf6620e3b83109eb918032155cd8d3
Signed-off-by: Tom Haynes <loghyr@primarydata.com>
Reviewed-on: https://code.wireshark.org/review/10558
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Not in C, but in C++, and we check to make sure our C code can be
compiled by a C++ compiler.
Change-Id: Ib77fac1abf1c583ebbf4465e4bd681b9db71123c
Reviewed-on: https://code.wireshark.org/review/10495
Reviewed-by: Guy Harris <guy@alum.mit.edu>
tvb_get_string_enc() treats the FH as an an ASCII string and thus stops
reading at the first zero (0) it encounters.
Replace 'tvb_get_string_enc()' with 'tvb_memdup()' in dissect_fhandle_data().
Change-Id: Ifc30ec41590e9cab5666d0988fab1f66040ce0c7
Reviewed-on: https://code.wireshark.org/review/10493
Reviewed-by: Cal Turney <cturney@charter.net>
Reviewed-by: ronnie sahlberg <ronniesahlberg@gmail.com>
Hand it a table of version/procedure table/hf-for-program-number
triplets.
Change-Id: I2acc03c2da83353165bd422d8537362201c814e2
Reviewed-on: https://code.wireshark.org/review/9740
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Either there's a known body for the call or reply, in which case we
already have a dissector for it, or the body is empty, in which case we
now have dissect_rpc_void() to dissect it, or the body is unknown or
nobody's bothered writing it, in which case we use dissect_rpc_unknown()
for now.
This means that an attempt to look up the dissector for a known
procedure will always succeed, so we can label it with the name rather
than with "proc-N".
It also means that we distinguish between "it's void" and "it's
unknown", so that unknown values will get flagged as such.
Change-Id: I748580c1dca61d1f0972396db1a3b0885fc0a541
Reviewed-on: https://code.wireshark.org/review/9699
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This patch converts some dissectors using g_hash_table_foreach_remove.
- 9p: drop no-op free func.
- nfs: use g_hash_table_new_full such that a destructor function can
be used. Drop NULL check since g_free can handle these just fine.
- nlm: use g_hash_table_new_full such that a destructor function can
be used. Simplify "matched" destruction by replacing the wrapper by
a direct g_free call.
Change-Id: I455e7f0ad4e47e70dae05af7233fdcdebf583f9f
Reviewed-on: https://code.wireshark.org/review/9224
Reviewed-by: Michael Mann <mmann78@netscape.net>
Change-Id: I8509b9290a7255a91fa5f10a8312ca80eb94ead6
Reviewed-on: https://code.wireshark.org/review/7900
Reviewed-by: Cal Turney <cturney@charter.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Change-Id: I06d7d4e9747ed8593cf40506cae3a09ae237846b
Reviewed-on: https://code.wireshark.org/review/9456
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This paves the way for using dissector tables.
Change-Id: I88ac165ef9aa5bf5c05e1115f7321e18e734d683
Reviewed-on: https://code.wireshark.org/review/9453
Reviewed-by: Anders Broman <a.broman58@gmail.com>
And no longer uses opaque_auth
Change-Id: I272e1c5c1391dac977ad850b899505a28c42b6fd
Reviewed-on: https://code.wireshark.org/review/8939
Reviewed-by: Anders Broman <a.broman58@gmail.com>
We can only parse file layout ds addrs, treat all other layouts as having
opaque data.
Change-Id: I50892dbdbd6785d8216e2d8725da7bec0c554ee2
Reviewed-on: https://code.wireshark.org/review/8933
Reviewed-by: Anders Broman <a.broman58@gmail.com>
'type' = FATTR4_BITMAP_ONLY
This patch updates the code accordingly.
Vars 'num_bitmaps', and 'count' are declared as guint8 but being passed to
32-bit fields of proto_tree_add_uint() and tvb_ensure_bytes_exist(). In
glibconfig.h 'guint8' is defined as 'typedef unsigned char guint8;' and in
'limits.h', ‘char’ is defined as 8 bits: #define CHAR_BIT 8 /* number of
bits in a char */. These vars have been changed to 32-bits.
There are 22 other dissectors that call "tvb_ensure_bytes_exist()". In
addition, there are an 215 CHECK_BYTE_COUNT_SUBR macro calls in
packet-smb.c which essentially do the same thing. README.developer does
state "you can check whether the data is present by using
"tvb_ensure_bytes_exist()" although this frequently is not needed." This
call has been removed in accordance with that statement.
Bug: 10483
Change-Id: Ib06ab14254882e9110af265d2d67a66dcce694f2
Reviewed-on: https://code.wireshark.org/review/8847
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
This reverts commit da1766e987.
I should have set CR-2 because I was working on the following update: According to RFC 5661, a zero attribute mask is acceptable if type FATTR4_BITMAP_ONLY is passed to dissect_nfs4_fattrs(). In addition I found guint8 vars 'num_bitmaps', and 'count' are declared as guint8 but being passed into 32-bit fields of proto_tree_add_uint() and tvb_ensure_bytes_exist().I will push a new patch for review.
Change-Id: I95e55af7fef17d0554f9741aa426feeeb95e2c21
Reviewed-on: https://code.wireshark.org/review/8843
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Otherwise it could throw an exception if captured length < reported length
Change-Id: Ia9eb2778dbfebc1865a0040020a62ba20882b482
Reviewed-on: https://code.wireshark.org/review/8804
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
NFSv4 attributes are transferred as a bitmask, followed by each of the
attributes in the bitmask. The offset and length of the dissected attribute
values should point at where the attribute values are; instead, they were
pointing at the bitmap. Fix that.
Change-Id: I4f93b7fffd7497306ae828a2fbd3c0e9b0accd1c
Reviewed-on: https://code.wireshark.org/review/8536
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
The NFSv4.1 dacl and sacl attributes consist of a 32-bit acl flags field,
followed by an access control list in the same format as the acl attribute.
Bug: 11208
Change-Id: I5fb08f9764c21cd6abb4ee02265e4e6b4ed54f01
Reviewed-on: https://code.wireshark.org/review/8526
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
The next commit will use some of these definitions before their (previous)
point of definition.
Change-Id: Ic7c96bc48d338bb7b44bf295af3fadc3e7bec370
Reviewed-on: https://code.wireshark.org/review/8525
Reviewed-by: Michael Mann <mmann78@netscape.net>
Various other cleanup while in the neighborhood.
Change-Id: I9d8322fd8fb867ad5569db9f781a33825ca34d1b
Reviewed-on: https://code.wireshark.org/review/7834
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>
Change-Id: I79c613cbdd8dc939dd4c29ebc477fb6eefd5bfc4
Reviewed-on: https://code.wireshark.org/review/6371
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Fourth batch (packet-mac-lte.c -> packet-rtp.c).
Will look at cleaning up and committing script afterwards.
Change-Id: Id921f07f4b274f0cfb77ce81abe4a285fdb8b644
Reviewed-on: https://code.wireshark.org/review/6023
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
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>
add support for dCache NFS/pNFS
project page: http://www.dcache.org
Bug: 10765
Change-Id: I24a88419ec070305e609d1b49b44994a464eb098
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Reviewed-on: https://code.wireshark.org/review/5236
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Bill Meier <wmeier@newsguy.com>