aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-couchbase.c
diff options
context:
space:
mode:
authorChristopher Farman <christopher.farman@couchbase.com>2018-10-29 14:32:33 +0000
committerAnders Broman <a.broman58@gmail.com>2018-10-30 12:26:30 +0000
commit8f496ad4ded0ef9d0e4daaf1f6840f473c6e388a (patch)
tree985ca3ea01f04c0f67314bede3eb2498f287a084 /epan/dissectors/packet-couchbase.c
parent506e5a7667d3f31e83286d9cca79cb3b3d330bff (diff)
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>
Diffstat (limited to 'epan/dissectors/packet-couchbase.c')
-rw-r--r--epan/dissectors/packet-couchbase.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/epan/dissectors/packet-couchbase.c b/epan/dissectors/packet-couchbase.c
index fdbf7b4482..f0ac57f5ea 100644
--- a/epan/dissectors/packet-couchbase.c
+++ b/epan/dissectors/packet-couchbase.c
@@ -1277,6 +1277,28 @@ dissect_extras(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
}
break;
case PROTOCOL_BINARY_DCP_EXPIRATION:
+ if (extlen) {
+ if (request) {
+ proto_tree_add_item(extras_tree, hf_extras_by_seqno, tvb, offset, 8, ENC_BIG_ENDIAN);
+ offset += 8;
+ proto_tree_add_item(extras_tree, hf_extras_rev_seqno, tvb, offset, 8, ENC_BIG_ENDIAN);
+ offset += 8;
+ if (extlen == 20) {
+ proto_tree_add_item(extras_tree, hf_extras_delete_time, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
+ } else {
+ // Handle legacy expiration packet (despite its lack of use)
+ proto_tree_add_item(extras_tree, hf_extras_nmeta, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ }
+ } else {
+ illegal = TRUE;
+ }
+ } else if (request) {
+ /* Request must have extras */
+ missing = TRUE;
+ }
+ break;
case PROTOCOL_BINARY_DCP_FLUSH:
if (extlen) {
if (request) {