Commit Graph

85 Commits

Author SHA1 Message Date
Martin Mathieson 0cf834f909 Make some more variables and functions static. 2021-02-14 19:42:01 +00:00
Alexis La Goutte cc8ac80b54 couchbase: fix item length
reported by check_typed_proto_items.py
packet-couchbase.c:1403 proto_tree_add_item called for hf_extras_nmeta  -  item type is FT_UINT32 but call has len  2
packet-couchbase.c:1405 proto_tree_add_item called for hf_extras_nru  -  item type is FT_UINT16 but call has len  1
packet-couchbase.c:1426 proto_tree_add_item called for hf_extras_nmeta  -  item type is FT_UINT32 but call has len  2
packet-couchbase.c:1453 proto_tree_add_item called for hf_extras_nmeta  -  item type is FT_UINT32 but call has len  2
packet-couchbase.c:1471 proto_tree_add_item called for hf_extras_nmeta  -  item type is FT_UINT32 but call has len  2
packet-couchbase.c:1522 proto_tree_add_item called for hf_extras_nru  -  item type is FT_UINT16 but call has len  1
2020-11-15 10:02:44 +00:00
Martin Mathieson 08ab0e5d1f Fix some wrong filter names.
These were detected by running check_typed_item_calls.py
with --consecutive, which flags items that have different
labels but the same filter string.  Usually this is because
of copy/paste.

Quite a few similar bugs still exist, will address in a future commit.
2020-09-27 18:40:13 +00:00
Tomas Kukosa bd7d0742db couchbase: fix conflict
'couchbase.flex_frame_extras' exists multiple times with incompatible types: FT_STRING and FT_UINT8

Change-Id: Ide607ca786e19015f4aae3cfbe85675581968267
Reviewed-on: https://code.wireshark.org/review/38011
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-08-21 03:38:20 +00:00
Dave Rigby 360ae8b1c0 couchbase: Fix dissect length of status!=0 values
When dissecting response values with a non-zero status, the length
calculation was incorrectly using the entire bodylen and not the
actual value_len. This is likely due to an error in adding support for
flex_frame_extras, before which bodylen == valuelen.

Change-Id: I1d622bea582abcfafc5e97881d94fd7a7db6c80a
Reviewed-on: https://code.wireshark.org/review/37598
Reviewed-by: Ben Huddleston <ben.huddleston@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-06-30 04:21:34 +00:00
Dave Rigby bc3f3b3e09 couchbase: Decode XATTRs in payload of DCP_EXPIRATION & DCP_PREPARE
Both of these opcodes can have XATTRs present in the binary
encoding. Add them to the set of opcodes for which we decode XATTRs.

Change-Id: Iee09c720dc4306b8e9c4ebb07673b2709f079a24
Reviewed-on: https://code.wireshark.org/review/37597
Reviewed-by: Ben Huddleston <ben.huddleston@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-29 19:10:58 +00:00
Dave Rigby d065fe022e couchbase: Add doc_flag::CreateAsDeleted
Add support for decoding the CreateAsDeleted flag for subdocument
doc_flag.

Also add some Hello feature flags which were missing (VAttr and
Point-in-Time Recovery).

Change-Id: I7ae1b6e787ee038b5d0f1dbd416f3675eb3be697
Reviewed-on: https://code.wireshark.org/review/37593
Reviewed-by: Ben Huddleston <ben.huddleston@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-29 19:10:25 +00:00
Guy Harris e1d9a226a2 Fix the type of arrays of pointers to hf_ values for bitfield routines.
The static arrays are supposed to be arrays of const pointers to int,
not arrays of non-const pointers to const int.

Fixing that means some bugs (scribbling on what's *supposed* to be a
const array) will be caught (see packet-ieee80211-radiotap.c for
examples, the first of which inspired this change and the second of
which was discovered while testing compiles with this change), and
removes the need for some annoying casts.

Also make some of those arrays static while we're at it.

Update documentation and dissector-generator tools.

Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc
Reviewed-on: https://code.wireshark.org/review/37517
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-19 11:32:26 +00:00
Jaap Keuter d5fc969e57 No explicit glib.h include required
Stop including glib.h in dissectors, this will come in implicitly with
packet.h including proto.h, an essential include file for dissectors.
While at it, config.h is no longer conditional and stdio.h is usually
not needed either. Some other cleanups too.

Change-Id: I60c12f16d7ef1e6398509293031ffed7460d2c61
Reviewed-on: https://code.wireshark.org/review/36969
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-05-01 21:28:27 +00:00
Jim Walker 228fc003b7 couchbase: Add new DCP commands
Add support for:

* DCP seqno advanced
* DCP oso snapshot

Change-Id: I6461ac3d1a16829e36e5c259a50943ef254b197d
Reviewed-on: https://code.wireshark.org/review/36506
Reviewed-by: Dave Rigby <daver@couchbase.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-20 17:59:03 +00:00
Jim Walker 9bde8f53f3 couchbase: Add new HELLO features and flex frame changes
Add new HELLO
* open tracing
* preserve TTL

Add some flex frame dissection
* impersonate (user name)
* preserve TTL (validate len is 0)
* open tracing has no further dissection

Change-Id: Id8ca22fbd7ba52ff04a9dcc062e8ce15f4b0ccaf
Reviewed-on: https://code.wireshark.org/review/36127
Reviewed-by: Dave Rigby <daver@couchbase.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-25 13:43:32 +00:00
Alexis La Goutte e1a876cf9d couchbase: Fix Dead Store
Fix dead store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: Icd18de17e7564b946ea177df252dffd2370ff1a0
Reviewed-on: https://code.wireshark.org/review/35408
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-12-12 04:39:02 +00:00
Jim Walker d4ca6cc550 couchbase: Update dissector for latest 6.5.0 DCP snapshot marker
Decode the v1/v2.0 formats which are relevant for the upcoming
6.5.0 release.

Change-Id: Ie726f1ebd2457f6a36b096a0cd0bed9c94f713df
Reviewed-on: https://code.wireshark.org/review/35251
Reviewed-by: Ben Huddleston <ben.huddleston@couchbase.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2019-11-30 04:21:47 +00:00
Jim Walker 4a353d40e0 couchbase: update dissector with missing collection error codes
Change-Id: I17a693ebfb09384892febb4139942fea756a50f2
Reviewed-on: https://code.wireshark.org/review/35250
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Ben Huddleston <ben.huddleston@couchbase.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-11-29 11:41:35 +00:00
Matt Carabine 9159c060bc Couchbase: Handle extras in mutation responses
Previously extras in any mutation (e.g. ADD, SET) response would
be marked as illegal, as these used to return no extras.
More recently, extras can be returned in mutations if the
connection has negotiated the MUTATION_SEQNO feature.
The extras can contain the mutation's sequence number and the
vBucket UUID.
This commit adds a new field (couchbase.extras.mutation_seqno) to
achieve this, as the existing field couchbase.extras.seqno is used
for a different purpose and is only a UINT32, whereas a UINT64 is
returned as part of the extras; the existing
couchbase.extras.vbucket_uuid is used for the vBucket UUID.

Change-Id: If8a5148f2115fce7a777b96ad22ba92d95c9ff71
Reviewed-on: https://code.wireshark.org/review/34540
Reviewed-by: Dave Rigby <daver@couchbase.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-09-16 16:20:45 +00:00
Sergey Avseyev 15a91a6d4a couchbase: update command identifiers
Change-Id: Ic6eb59a26dc0a9edd216a985bbf94d13b4bc5094
Reviewed-on: https://code.wireshark.org/review/34427
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-09-02 08:23:16 +00:00
Ben Huddleston d8385b42e2 MB-34017: Add HCS to SnapshotMarker
Add the optional HCS field to the snapshot marker (only send on
when non-zero for disk snapshots).

Also, remove the durability timeout field from DCP_PREPARE as it is
not sent and the UI warns about invalid extras length.

Change-Id: I46955e2a719d28a70377bc6addb65fa3356ea1d4
Reviewed-on: https://code.wireshark.org/review/34323
Reviewed-by: Jim Walker <jim@couchbase.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-08-19 20:36:52 +00:00
Trond Norbye d1d0f6d5d1 Couchbase: Fix dissector for dcp prepare
The timeout value was removed from the DCP PREPARE
message as it was never used (and will never occur
in a released version of Couchbase)

Change-Id: I95f5bb3a0878237bf0339da48476fda437740c25
Reviewed-on: https://code.wireshark.org/review/33984
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Jim Walker <jim@couchbase.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2019-07-17 10:19:09 +00:00
Ben Huddleston 592322ac1c couchbase: Add prepare seqno to DCP_COMMIT
Given that we send the prepare seqno for DCP_ABORT and we have
ensured it is sent as non-zero, we may as well send it in the DCP_COMMIT
to allow replica nodes to do some additional error checking.

Change-Id: I67fb7d3e98a6518ec80c1a713e8d1d5637425a75
Reviewed-on: https://code.wireshark.org/review/33724
Reviewed-by: Jim Walker <jim@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-24 11:48:17 +00:00
Dave Rigby 46ebd2411d couchbase: Format seqnos as decimal
Couchbase DCP sequence numbers start from zero, incrementing by one
for each message; and are generally displayed inside Couchbase as
decimal.

For ease of use with Wireshark dumps, print them as decimal instead of
hex.

Change-Id: I590fe137b96263d589e0ccc3161b57ffee40854b
Reviewed-on: https://code.wireshark.org/review/33660
Reviewed-by: Ben Huddleston <ben.huddleston@couchbase.com>
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Reviewed-by: Jim Walker <jim@couchbase.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-19 15:06:06 +00:00
Ben Huddleston 6d539de542 couchbase: Add prepare seqno to DCP_ABORT
DCP_ABORT now needs the prepare seqno for MB-34474.

Change-Id: Idf36f85f593735e31c7be96b0c9253d90fdb825f
Reviewed-on: https://code.wireshark.org/review/33597
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-16 02:17:39 +00:00
Dave Rigby d5cdd9515f couchbase: Remove 2nd seqno from DCP_{COMMIT,ABORT,SEQNO_ACK}
DCP_COMMIT, DCP_ABORT and DCP_SEQNO_ACK no longer include two seqnos,
just a single one.

Add missing status codes for durability-related statuses.

Change-Id: I97b847dd43c59405d69410ef28b0b362111c0fbd
Reviewed-on: https://code.wireshark.org/review/33339
Reviewed-by: Ben Huddleston <ben.huddleston@couchbase.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-05-24 14:55:38 +00:00
Gerald Combs 8d3ac3af86 epan: Convert our PROTO_ITEM_ macros to inline functions.
Convert our various PROTO_ITEM_ macros to inline functions and document
them.

Change-Id: I070b15d4f70d2189217a177ee8ba2740be36327c
Reviewed-on: https://code.wireshark.org/review/32706
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-04 04:03:38 +00:00
Dario Lombardo 52203676cc couchbase: check shift value before use.
Bug: 15439
Change-Id: I5bd702333795f2ed705eadb665516cb27b6e0371
Reviewed-on: https://code.wireshark.org/review/32311
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-03-06 15:16:33 +00:00
Ben Huddleston 871d16a4de couchbase: Add Collections Get ID opcode
Change-Id: If3f318dbaa98df4d991bd447341d1a27048cae50
Reviewed-on: https://code.wireshark.org/review/32031
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-14 18:28:14 +00:00
Sergey Avseyev 7a06a66eb8 couchbase: update list of HELLO features
Change-Id: I323c54faaeaf951e284fa3b64c19e9e6671d36ec
Reviewed-on: https://code.wireshark.org/review/31767
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-28 14:12:55 +00:00
Christopher Farman 2352fe66e8 Update couchbase set/del_with_meta option flags
Update the flag descriptors for options inside a set_with_meta and
del_with_meta message, whilst also adding a new flag, IS_EXPIRATION,
for only del_with_meta.

Change-Id: I2f97c5aecb618e90783a39ce026ae0feba110dfd
Reviewed-on: https://code.wireshark.org/review/31675
Reviewed-by: Jim Walker <jim@couchbase.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-23 08:01:03 +00:00
Gerald Combs 6ee0dabbdc Couchbase: Fix another shadow variable.
Change-Id: Id66535f9e21a9e311cb69af2b46fa896186e8b10
Reviewed-on: https://code.wireshark.org/review/31561
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-16 04:29:11 +00:00
Gerald Combs e4c53ec28c Couchbase: Fixup a shadow variable.
Rename index to byte_idx.

Change-Id: I49d09d6db71d5db9e1c65f2abadc1413b3ccb7ec
Reviewed-on: https://code.wireshark.org/review/31313
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-03 04:01:03 +00:00
Jim Walker 781e371a7d couchbase: Add durable DCP commands
Adding DCP prepare, seqno-ack, commit and abort

Change-Id: Ife7726c91962ab7fc41bc981ee98418474d33385
Reviewed-on: https://code.wireshark.org/review/30989
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-10 14:45:56 +00:00
Jim Walker e914a5a377 couchbase: Improve key decoder
Using the recent updates occasional 'trailing' byte warnings
occur if the key encodes a collection-ID, with these changes
we now get much better key decoding, without the warnings
with and without collections.

Change-Id: I9fc1e0d807c8054065a7346a09b0ce99d05f1e63
Reviewed-on: https://code.wireshark.org/review/30956
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-12-07 20:24:15 +00:00
Jim Walker 9cba325fc8 couchbase: Update for recent collection changes
Add support for decoding a collection-ID from the
key-bytes.

Update DCP as collection_len is no longer in the
protocol and the system events have changed.

Change-Id: Ib910083d929a906729e2bba2b0f07ba23e093cf5
Reviewed-on: https://code.wireshark.org/review/30895
Reviewed-by: Dave Rigby <daver@couchbase.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-04 07:48:01 +00:00
Jim Walker 13e3063848 couchbase: Update FlexFrame dissector to include requests
Update the couchbase packet dissector with some re-factoring of the
FlexFrame dissector and then extra functionality for:

* FlexFrame on requests (magic 0x08)
* Durability
* Out-Of-Order requests
* DCP Stream ID

Additional checks are added to warn/error for invalid frame lengths and
for the case where the FlexFrame byte0 is 0xff, which is not defined by
the protocol.

Change-Id: I5f1fec8293284dadbdef717d02fa1eef27da7a0c
Reviewed-on: https://code.wireshark.org/review/30894
Reviewed-by: Dave Rigby <daver@couchbase.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-04 06:05:03 +00:00
Christopher Farman 8f496ad4de Update couchbase dissector for new expiration format
Adding delete time to the expirtation packet

Change-Id: I1881892122182a7656bde5b93e2de969f6f1b615
Reviewed-on: https://code.wireshark.org/review/30404
Reviewed-by: Jim Walker <jim@couchbase.com>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-30 12:26:30 +00:00
Gerald Combs 4b9a4bcb74 Add obsolete ssl[._]port preferences.
gcd95e197ca renamed a bunch of "<proto>.ssl.port" preferences to
"<proto>.tls.port" but neglected to add obsolete entries for the old
preferences. Do so here.

Rename couchbase.tls_port to couchbase.tls.port to be in line with the
other TLS port preferences.

Change-Id: Ie23d6be0a5cb3616f37e41dbfbf13ad1b7206473
Reviewed-on: https://code.wireshark.org/review/29829
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-09-25 20:55:47 +00:00
Gerald Combs 50dbe4df7f Rename packet-ssl* to packet-tls*
Rename packet-ssl{,-utils}.[ch] to packet-tls{,-utils}.[ch].

Change-Id: I4732162ec131ddf0734b3dd191ccc9e48a76ce06
Reviewed-on: https://code.wireshark.org/review/29659
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-25 13:24:17 +00:00
Alexis La Goutte 9fa48899c8 couchbase: fix Unused href entry: epan/dissectors/packet-couchbase.c: hf_flex_frame
Change-Id: I3d0422f0e433ec9f3056b327b5e3da5e0510437d
Reviewed-on: https://code.wireshark.org/review/29665
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-15 15:29:26 +00:00
Gerald Combs cd95e197ca Start renaming SSL to TLS.
Rename the "ssl" protocol to "tls" and add an "ssl" alias. Prefer "TLS"
over "SSL" in user interface text and in the documentation.

Fix the test_tls_master_secret test while we're here.

Bug: 14922
Change-Id: Iab6ba2c7c4c0f8f6dd0f6d5d90fac5e9486612f8
Reviewed-on: https://code.wireshark.org/review/29649
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-09-13 22:37:52 +00:00
Sergey Avseyev 98b46985dd Couchbase: update opcodes and decode AUDIT_PUT as JSON
Change-Id: I6b9e3455abbf0cbd4eb6513fc652cf2902c9eb79
Reviewed-on: https://code.wireshark.org/review/26570
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-24 07:05:02 +00:00
Jim Walker bd8df9eb88 Update to couchbase dissector for 'flexible framing extras' on errors
The flexible framing extras can be on success and error packets, so
move the call to dissect out of the success path.

See:
https://github.com/couchbase/kv_engine/blob/master/docs/BinaryProtocol.md#response-header-with-flexible-framing-extras

Change-Id: I6fdadf4a90bd1e9c2b1e6e37793cc7a105fad3a6
Reviewed-on: https://code.wireshark.org/review/26566
Reviewed-by: Dave Rigby <daver@couchbase.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-03-20 12:14:52 +00:00
Guy Harris 647e5b449a Use units for the server recv->send duration.
We *do* support units for FT_FLOAT and FT_DOUBLE, so use them.

Change-Id: I94dbce89c785109b2c6ef89243f5611963e63dc8
Reviewed-on: https://code.wireshark.org/review/25917
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-20 06:29:54 +00:00
Guy Harris 8a173c9812 Clean up the way we handle the server recv->send duration.
There's no guarantee that it'll be integral, and the spec doesn't seem
to imply that it's necessarily integral, so don't convert it to an
integer.

Given that it's a floating-point number, we might as well represent it
as an FT_DOUBLE.  (XXX - we should support units for FT_FLOAT and
FT_DOUBLE.)

Change-Id: Ica43510ac147231f5530359cc78bb467f8d3be24
Reviewed-on: https://code.wireshark.org/review/25915
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-20 05:59:06 +00:00
Jim Walker 0b1e354458 Update couchbase dissector with 'flexible framing extras'
Add support to decode the new response message and then decode the
array of flexible frames, currently only the "tracing" durations
ID is fully decoded.

See:
https://github.com/couchbase/kv_engine/blob/master/docs/BinaryProtocol.md#response-header-with-flexible-framing-extras

Change-Id: I9ea1e3bb898d9c4dd3b30cd1109b7b70fc17b19e
Reviewed-on: https://code.wireshark.org/review/25613
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-13 06:20:30 +00:00
Dario Lombardo fe219637a6 dissectors: use SPDX identifiers.
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>
2018-02-12 16:49:58 +00:00
Jim Walker 0420088e9f Update couchbase dissector with collections and delete_time DCP
Add support for collection commands
* SET/GET manifest
* DCP changes (mutation/deletion/system_event)

Add support for DCP delete_time, a new format for DCP deletion

Change-Id: Iec2000a40da37dcb1edf665a157dc7ab30d4c9d0
Reviewed-on: https://code.wireshark.org/review/25612
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-02-05 19:07:56 +00:00
Jim Walker 80150df416 Update couchbase dissector with new HELLO feature values
Simply add missing feature values to the existing table

Change-Id: Ie4b0876df1d736af1cd1171a6645df75e2eb8cf2
Reviewed-on: https://code.wireshark.org/review/25611
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-05 16:19:20 +00:00
Sergey Avseyev 2b0a1ec2cb couchbase: uncompress snappy payloads
Change-Id: I70de47512dfe8ff1a390a243688ef13f012561fa
Reviewed-on: https://code.wireshark.org/review/24921
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-21 05:05:56 +00:00
Sergey Avseyev c52a702ae8 couchbase: detect XERROR responses and dissect them as JSON
Change-Id: Ia2565090f8dc30e17cd6a16614136d237577d282
Reviewed-on: https://code.wireshark.org/review/23535
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-09-14 20:38:18 +00:00
João Valverde 299bd4628a Fix unitialized variable warnings that popped up with -Og
Using GCC version 7.1.1.

Change-Id: I7447a48fc97efb1eb15a016a29165f69d37f40a6
Reviewed-on: https://code.wireshark.org/review/23399
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>
2017-09-05 22:31:01 +00:00
Sergey Avseyev 2330ba1b3d couchbase: fix full-doc commands of subdoc
They do not have path, so the min_spec_size should be smaller

Change-Id: I5a77bcf742be5f8a00f0cf7a215f386a845673fa
Reviewed-on: https://code.wireshark.org/review/23349
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-09-02 14:08:29 +00:00