aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorDave Rigby <daver@couchbase.com>2020-06-29 14:25:24 +0100
committerAnders Broman <a.broman58@gmail.com>2020-06-29 19:10:25 +0000
commitd065fe022eda07775093b6f910631bebae04a31f (patch)
tree0673df0abb53513f582a95ef8cf4980104ef758c /epan
parent52512329c2046190251eecfd5270029f6c0c15ee (diff)
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>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-couchbase.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/epan/dissectors/packet-couchbase.c b/epan/dissectors/packet-couchbase.c
index b42b9a7527..9511587e76 100644
--- a/epan/dissectors/packet-couchbase.c
+++ b/epan/dissectors/packet-couchbase.c
@@ -381,6 +381,7 @@ static int hf_subdoc_doc_flags = -1;
static int hf_subdoc_doc_flags_mkdoc = -1;
static int hf_subdoc_doc_flags_add = -1;
static int hf_subdoc_doc_flags_accessdeleted = -1;
+static int hf_subdoc_doc_flags_createasdeleted = -1;
static int hf_subdoc_doc_flags_reserved = -1;
static int hf_subdoc_flags = -1;
static int hf_subdoc_flags_mkdirp = -1;
@@ -891,6 +892,7 @@ static int * const subdoc_doc_flags[] = {
&hf_subdoc_doc_flags_mkdoc,
&hf_subdoc_doc_flags_add,
&hf_subdoc_doc_flags_accessdeleted,
+ &hf_subdoc_doc_flags_createasdeleted,
&hf_subdoc_doc_flags_reserved,
NULL
};
@@ -933,6 +935,9 @@ static const value_string feature_vals[] = {
{0x12, "Collections"},
{0x13, "OpenTracing"},
{0x14, "PreserveTtl"},
+ {0x15, "VAttr"},
+ {0x16, "Point in Time Recovery"},
+ {0x17, "SubdocCreateAsDeleted"},
{0, NULL}
};
@@ -2983,7 +2988,8 @@ proto_register_couchbase(void)
{ &hf_subdoc_doc_flags_mkdoc, { "MKDOC", "couchbase.extras.subdoc.doc_flags.mkdoc", FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x01, "Create document if it does not exist, implies mkdir_p", HFILL} },
{ &hf_subdoc_doc_flags_add, { "ADD", "couchbase.extras.subdoc.doc_flags.add", FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x02, "Fail if doc already exists", HFILL} },
{ &hf_subdoc_doc_flags_accessdeleted, { "ACCESS_DELETED", "couchbase.extras.subdoc.doc_flags.access_deleted", FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x04, "Allow access to XATTRs for deleted documents", HFILL} },
- { &hf_subdoc_doc_flags_reserved, {"Reserved fields", "couchbase.extras.subdoc.doc_flags.reserved", FT_UINT8, BASE_HEX, NULL, 0xF8, "A reserved field", HFILL} },
+ { &hf_subdoc_doc_flags_createasdeleted, { "CREATE_AS_DELETED", "couchbase.extras.subdoc.doc_flags.create_as_deleted", FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x08, "If the document does not exist then create it in the Deleted state, instead of the normal Alive state", HFILL} },
+ { &hf_subdoc_doc_flags_reserved, {"Reserved fields", "couchbase.extras.subdoc.doc_flags.reserved", FT_UINT8, BASE_HEX, NULL, 0xF0, "A reserved field", HFILL} },
{ &hf_extras_pathlen, { "Path Length", "couchbase.extras.pathlen", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
/* DCP flags */