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>
This commit is contained in:
Dave Rigby 2020-06-29 14:25:24 +01:00 committed by Anders Broman
parent 52512329c2
commit d065fe022e
1 changed files with 7 additions and 1 deletions

View File

@ -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 */