diff options
author | olivermd <oliver.downard@couchbase.com> | 2017-08-10 11:00:20 +0100 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2017-08-10 15:50:06 +0000 |
commit | de2a738cbd4df919b8bdb3e6c824d55670869f36 (patch) | |
tree | f52c2206ed9ec24421a8b33d8208373bcb830910 /epan/dissectors/packet-couchbase.c | |
parent | 8c72e01a318ae9946ea42211e16af5ce4772ffa9 (diff) |
Couchbase: Add get error map cmd
Change-Id: I9ca47fa0f77edd0ce94d2fe4cb098b5ff2786749
Reviewed-on: https://code.wireshark.org/review/23030
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: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-couchbase.c')
-rw-r--r-- | epan/dissectors/packet-couchbase.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/epan/dissectors/packet-couchbase.c b/epan/dissectors/packet-couchbase.c index 941618cbc0..b80fe33e9a 100644 --- a/epan/dissectors/packet-couchbase.c +++ b/epan/dissectors/packet-couchbase.c @@ -264,6 +264,7 @@ #define PROTOCOL_BINARY_CMD_GET_CMD_TIMER 0xf3 #define PROTOCOL_BINARY_CMD_SET_CTRL_TOKEN 0xf4 #define PROTOCOL_BINARY_CMD_GET_CTRL_TOKEN 0xf5 +#define PROTOCOL_BINARY_CMD_GET_ERROR_MAP 0xfe /* vBucket states */ #define VBUCKET_ACTIVE 0x01 @@ -359,6 +360,8 @@ static int hf_observe_current_seqno = -1; static int hf_observe_old_vbucket_uuid = -1; static int hf_observe_last_received_seqno = -1; +static int hf_get_errmap_version = -1; + static int hf_failover_log = -1; static int hf_failover_log_size = -1; static int hf_failover_log_vbucket_uuid = -1; @@ -637,6 +640,7 @@ static const value_string opcode_vals[] = { { PROTOCOL_BINARY_CMD_GET_CMD_TIMER, "Internal Timer Control" }, { PROTOCOL_BINARY_CMD_SET_CTRL_TOKEN, "Set Control Token" }, { PROTOCOL_BINARY_CMD_GET_CTRL_TOKEN, "Get Control Token" }, + { PROTOCOL_BINARY_CMD_GET_ERROR_MAP, "Get Error Map" }, /* Internally defined values not valid here */ { 0, NULL } @@ -1731,6 +1735,13 @@ dissect_value(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, opcode == PROTOCOL_BINARY_CMD_ADDQ_WITH_META )) { dissect_dcp_xattrs(tvb, tree, value_len, offset, pinfo); + } else if (request && opcode == PROTOCOL_BINARY_CMD_GET_ERROR_MAP) { + if (value_len != 2) { + expert_add_info_format(pinfo, ti, &ef_warn_illegal_value_length, "Illegal Value length, should be 2"); + ti = proto_tree_add_item(tree, hf_value, tvb, offset, value_len, ENC_ASCII | ENC_NA); + } else { + ti = proto_tree_add_item(tree, hf_get_errmap_version, tvb, offset, value_len, ENC_BIG_ENDIAN); + } } else { ti = proto_tree_add_item(tree, hf_value, tvb, offset, value_len, ENC_ASCII | ENC_NA); } @@ -2088,6 +2099,8 @@ proto_register_couchbase(void) { &hf_observe_last_received_seqno, { "Last received sequence number", "couchbase.observe.last_received_seqno", FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL } }, { &hf_observe_failed_over, { "Failed over", "couchbase.observe.failed_over", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_get_errmap_version, {"Version", "couchbase.geterrmap.version", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL} }, + { &hf_multipath_opcode, { "Opcode", "couchbase.multipath.opcode", FT_UINT8, BASE_HEX|BASE_EXT_STRING, &opcode_vals_ext, 0x0, "Command code", HFILL } }, { &hf_multipath_index, { "Index", "couchbase.multipath.index", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_multipath_pathlen, { "Path Length", "couchbase.multipath.path.length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, |