ci: bsds: rebuild packages after reconfiguration
[m6w6/libmemcached] / include / libmemcachedprotocol-0.0 / binary.h
1 /*
2 +--------------------------------------------------------------------+
3 | libmemcached - C/C++ Client Library for memcached |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted under the terms of the BSD license. |
7 | You should have received a copy of the license in a bundled file |
8 | named LICENSE; in case you did not receive a copy you can review |
9 | the terms online at: https://opensource.org/licenses/BSD-3-Clause |
10 +--------------------------------------------------------------------+
11 | Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ |
12 | Copyright (c) 2020 Michael Wallner <mike@php.net> |
13 +--------------------------------------------------------------------+
14 */
15
16 #ifndef PROTOCOL_BINARY_H
17 #define PROTOCOL_BINARY_H
18
19 #include "libmemcachedprotocol-0.0/vbucket.h"
20
21 /**
22 * \addtogroup Protocol
23 * @{
24 */
25
26 /**
27 * This file contains definitions of the constants and packet formats
28 * defined in the binary specification. Please note that you _MUST_ remember
29 * to convert each multibyte field to / from network byte order to / from
30 * host order.
31 */
32 #ifdef __cplusplus
33 # include <cstdint>
34 extern "C" {
35 #else
36 # include <stdint.h>
37 #endif
38
39 /**
40 * Definition of the legal "magic" values used in a packet.
41 * See section 3.1 Magic byte
42 */
43 typedef enum { PROTOCOL_BINARY_REQ = 0x80, PROTOCOL_BINARY_RES = 0x81 } protocol_binary_magic;
44
45 /**
46 * Definition of the valid response status numbers.
47 * See section 3.2 Response Status
48 */
49 typedef enum {
50 PROTOCOL_BINARY_RESPONSE_SUCCESS = 0x00,
51 PROTOCOL_BINARY_RESPONSE_KEY_ENOENT = 0x01,
52 PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS = 0x02,
53 PROTOCOL_BINARY_RESPONSE_E2BIG = 0x03,
54 PROTOCOL_BINARY_RESPONSE_EINVAL = 0x04,
55 PROTOCOL_BINARY_RESPONSE_NOT_STORED = 0x05,
56 PROTOCOL_BINARY_RESPONSE_DELTA_BADVAL = 0x06,
57 PROTOCOL_BINARY_RESPONSE_NOT_MY_VBUCKET = 0x07,
58 PROTOCOL_BINARY_RESPONSE_AUTH_ERROR = 0x20,
59 PROTOCOL_BINARY_RESPONSE_AUTH_CONTINUE = 0x21,
60 PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND = 0x81,
61 PROTOCOL_BINARY_RESPONSE_ENOMEM = 0x82,
62 PROTOCOL_BINARY_RESPONSE_NOT_SUPPORTED = 0x83,
63 PROTOCOL_BINARY_RESPONSE_EINTERNAL = 0x84,
64 PROTOCOL_BINARY_RESPONSE_EBUSY = 0x85,
65 PROTOCOL_BINARY_RESPONSE_ETMPFAIL = 0x86
66 } protocol_binary_response_status;
67
68 /**
69 * Defintion of the different command opcodes.
70 * See section 3.3 Command Opcodes
71 */
72 typedef enum {
73 PROTOCOL_BINARY_CMD_GET = 0x00,
74 PROTOCOL_BINARY_CMD_SET = 0x01,
75 PROTOCOL_BINARY_CMD_ADD = 0x02,
76 PROTOCOL_BINARY_CMD_REPLACE = 0x03,
77 PROTOCOL_BINARY_CMD_DELETE = 0x04,
78 PROTOCOL_BINARY_CMD_INCREMENT = 0x05,
79 PROTOCOL_BINARY_CMD_DECREMENT = 0x06,
80 PROTOCOL_BINARY_CMD_QUIT = 0x07,
81 PROTOCOL_BINARY_CMD_FLUSH = 0x08,
82 PROTOCOL_BINARY_CMD_GETQ = 0x09,
83 PROTOCOL_BINARY_CMD_NOOP = 0x0a,
84 PROTOCOL_BINARY_CMD_VERSION = 0x0b,
85 PROTOCOL_BINARY_CMD_GETK = 0x0c,
86 PROTOCOL_BINARY_CMD_GETKQ = 0x0d,
87 PROTOCOL_BINARY_CMD_APPEND = 0x0e,
88 PROTOCOL_BINARY_CMD_PREPEND = 0x0f,
89 PROTOCOL_BINARY_CMD_STAT = 0x10,
90 PROTOCOL_BINARY_CMD_SETQ = 0x11,
91 PROTOCOL_BINARY_CMD_ADDQ = 0x12,
92 PROTOCOL_BINARY_CMD_REPLACEQ = 0x13,
93 PROTOCOL_BINARY_CMD_DELETEQ = 0x14,
94 PROTOCOL_BINARY_CMD_INCREMENTQ = 0x15,
95 PROTOCOL_BINARY_CMD_DECREMENTQ = 0x16,
96 PROTOCOL_BINARY_CMD_QUITQ = 0x17,
97 PROTOCOL_BINARY_CMD_FLUSHQ = 0x18,
98 PROTOCOL_BINARY_CMD_APPENDQ = 0x19,
99 PROTOCOL_BINARY_CMD_PREPENDQ = 0x1a,
100 PROTOCOL_BINARY_CMD_VERBOSITY = 0x1b,
101 PROTOCOL_BINARY_CMD_TOUCH = 0x1c,
102 PROTOCOL_BINARY_CMD_GAT = 0x1d,
103 PROTOCOL_BINARY_CMD_GATQ = 0x1e,
104 PROTOCOL_BINARY_CMD_GATK = 0x23,
105 PROTOCOL_BINARY_CMD_GATKQ = 0x24,
106
107 PROTOCOL_BINARY_CMD_SASL_LIST_MECHS = 0x20,
108 PROTOCOL_BINARY_CMD_SASL_AUTH = 0x21,
109 PROTOCOL_BINARY_CMD_SASL_STEP = 0x22,
110
111 /* These commands are used for range operations and exist within
112 * this header for use in other projects. Range operations are
113 * not expected to be implemented in the memcached server itself.
114 */
115 PROTOCOL_BINARY_CMD_RGET = 0x30,
116 PROTOCOL_BINARY_CMD_RSET = 0x31,
117 PROTOCOL_BINARY_CMD_RSETQ = 0x32,
118 PROTOCOL_BINARY_CMD_RAPPEND = 0x33,
119 PROTOCOL_BINARY_CMD_RAPPENDQ = 0x34,
120 PROTOCOL_BINARY_CMD_RPREPEND = 0x35,
121 PROTOCOL_BINARY_CMD_RPREPENDQ = 0x36,
122 PROTOCOL_BINARY_CMD_RDELETE = 0x37,
123 PROTOCOL_BINARY_CMD_RDELETEQ = 0x38,
124 PROTOCOL_BINARY_CMD_RINCR = 0x39,
125 PROTOCOL_BINARY_CMD_RINCRQ = 0x3a,
126 PROTOCOL_BINARY_CMD_RDECR = 0x3b,
127 PROTOCOL_BINARY_CMD_RDECRQ = 0x3c,
128 /* End Range operations */
129
130 /* VBucket commands */
131 PROTOCOL_BINARY_CMD_SET_VBUCKET = 0x3d,
132 PROTOCOL_BINARY_CMD_GET_VBUCKET = 0x3e,
133 PROTOCOL_BINARY_CMD_DEL_VBUCKET = 0x3f,
134 /* End VBucket commands */
135
136 /* TAP commands */
137 PROTOCOL_BINARY_CMD_TAP_CONNECT = 0x40,
138 PROTOCOL_BINARY_CMD_TAP_MUTATION = 0x41,
139 PROTOCOL_BINARY_CMD_TAP_DELETE = 0x42,
140 PROTOCOL_BINARY_CMD_TAP_FLUSH = 0x43,
141 PROTOCOL_BINARY_CMD_TAP_OPAQUE = 0x44,
142 PROTOCOL_BINARY_CMD_TAP_VBUCKET_SET = 0x45,
143 PROTOCOL_BINARY_CMD_TAP_CHECKPOINT_START = 0x46,
144 PROTOCOL_BINARY_CMD_TAP_CHECKPOINT_END = 0x47,
145 /* End TAP */
146
147 PROTOCOL_BINARY_CMD_LAST_RESERVED = 0xef,
148
149 /* Scrub the data */
150 PROTOCOL_BINARY_CMD_SCRUB = 0xf0
151 } protocol_binary_command;
152
153 /**
154 * Definition of the data types in the packet
155 * See section 3.4 Data Types
156 */
157 typedef enum { PROTOCOL_BINARY_RAW_BYTES = 0x00 } protocol_binary_datatypes;
158
159 /**
160 * Definition of the header structure for a request packet.
161 * See section 2
162 */
163 typedef union {
164 struct {
165 uint8_t magic;
166 uint8_t opcode;
167 uint16_t keylen;
168 uint8_t extlen;
169 uint8_t datatype;
170 uint16_t vbucket;
171 uint32_t bodylen;
172 uint32_t opaque;
173 uint64_t cas;
174 } request;
175 uint8_t bytes[24];
176 } protocol_binary_request_header;
177
178 /**
179 * Definition of the header structure for a response packet.
180 * See section 2
181 */
182 typedef union {
183 struct {
184 uint8_t magic;
185 uint8_t opcode;
186 uint16_t keylen;
187 uint8_t extlen;
188 uint8_t datatype;
189 uint16_t status;
190 uint32_t bodylen;
191 uint32_t opaque;
192 uint64_t cas;
193 } response;
194 uint8_t bytes[24];
195 } protocol_binary_response_header;
196
197 /**
198 * Definition of a request-packet containing no extras
199 */
200 union protocol_binary_request_no_extras {
201 struct {
202 protocol_binary_request_header header;
203 } message;
204 uint8_t bytes[sizeof(protocol_binary_request_header)];
205 };
206 typedef union protocol_binary_request_no_extras protocol_binary_request_no_extras;
207
208 /**
209 * Definition of a response-packet containing no extras
210 */
211 typedef union {
212 struct {
213 protocol_binary_response_header header;
214 } message;
215 uint8_t bytes[sizeof(protocol_binary_response_header)];
216 } protocol_binary_response_no_extras;
217
218 /**
219 * Definition of the packet used by the get, getq, getk and getkq command.
220 * See section 4
221 */
222 typedef protocol_binary_request_no_extras protocol_binary_request_get;
223 typedef protocol_binary_request_no_extras protocol_binary_request_getq;
224 typedef protocol_binary_request_no_extras protocol_binary_request_getk;
225 typedef protocol_binary_request_no_extras protocol_binary_request_getkq;
226
227 /**
228 * Definition of the packet returned from a successful get, getq, getk and
229 * getkq.
230 * See section 4
231 */
232 typedef union {
233 struct {
234 protocol_binary_response_header header;
235 struct {
236 uint32_t flags;
237 } body;
238 } message;
239 uint8_t bytes[sizeof(protocol_binary_response_header) + 4];
240 } protocol_binary_response_get;
241
242 typedef protocol_binary_response_get protocol_binary_response_getq;
243 typedef protocol_binary_response_get protocol_binary_response_getk;
244 typedef protocol_binary_response_get protocol_binary_response_getkq;
245
246 /**
247 * Definition of the packet used by the delete command
248 * See section 4
249 */
250 typedef protocol_binary_request_no_extras protocol_binary_request_delete;
251
252 /**
253 * Definition of the packet returned by the delete command
254 * See section 4
255 */
256 typedef protocol_binary_response_no_extras protocol_binary_response_delete;
257
258 /**
259 * Definition of the packet used by the flush command
260 * See section 4
261 * Please note that the expiration field is optional, so remember to see
262 * check the header.bodysize to see if it is present.
263 */
264 typedef union {
265 struct {
266 protocol_binary_request_header header;
267 struct {
268 uint32_t expiration;
269 } body;
270 } message;
271 uint8_t bytes[sizeof(protocol_binary_request_header) + 4];
272 } protocol_binary_request_flush;
273
274 /**
275 * Definition of the packet returned by the flush command
276 * See section 4
277 */
278 typedef protocol_binary_response_no_extras protocol_binary_response_flush;
279
280 /**
281 * Definition of the packet used by set, add and replace
282 * See section 4
283 */
284 typedef union {
285 struct {
286 protocol_binary_request_header header;
287 struct {
288 uint32_t flags;
289 uint32_t expiration;
290 } body;
291 } message;
292 uint8_t bytes[sizeof(protocol_binary_request_header) + 8];
293 } protocol_binary_request_set;
294 typedef protocol_binary_request_set protocol_binary_request_add;
295 typedef protocol_binary_request_set protocol_binary_request_replace;
296
297 /**
298 * Definition of the packet returned by set, add and replace
299 * See section 4
300 */
301 typedef protocol_binary_response_no_extras protocol_binary_response_set;
302 typedef protocol_binary_response_no_extras protocol_binary_response_add;
303 typedef protocol_binary_response_no_extras protocol_binary_response_replace;
304
305 /**
306 * Definition of the noop packet
307 * See section 4
308 */
309 typedef protocol_binary_request_no_extras protocol_binary_request_noop;
310
311 /**
312 * Definition of the packet returned by the noop command
313 * See section 4
314 */
315 typedef protocol_binary_response_no_extras protocol_binary_response_noop;
316
317 /**
318 * Definition of the structure used by the increment and decrement
319 * command.
320 * See section 4
321 */
322 typedef union {
323 struct {
324 protocol_binary_request_header header;
325 struct {
326 uint64_t delta;
327 uint64_t initial;
328 uint32_t expiration;
329 } body;
330 } message;
331 uint8_t bytes[sizeof(protocol_binary_request_header) + 20];
332 } protocol_binary_request_incr;
333 typedef protocol_binary_request_incr protocol_binary_request_decr;
334
335 /**
336 * Definition of the response from an incr or decr command
337 * command.
338 * See section 4
339 */
340 typedef union {
341 struct {
342 protocol_binary_response_header header;
343 struct {
344 uint64_t value;
345 } body;
346 } message;
347 uint8_t bytes[sizeof(protocol_binary_response_header) + 8];
348 } protocol_binary_response_incr;
349 typedef protocol_binary_response_incr protocol_binary_response_decr;
350
351 /**
352 * Definition of the quit
353 * See section 4
354 */
355 typedef protocol_binary_request_no_extras protocol_binary_request_quit;
356
357 /**
358 * Definition of the packet returned by the quit command
359 * See section 4
360 */
361 typedef protocol_binary_response_no_extras protocol_binary_response_quit;
362
363 /**
364 * Definition of the packet used by append and prepend command
365 * See section 4
366 */
367 typedef protocol_binary_request_no_extras protocol_binary_request_append;
368 typedef protocol_binary_request_no_extras protocol_binary_request_prepend;
369
370 /**
371 * Definition of the packet returned from a successful append or prepend
372 * See section 4
373 */
374 typedef protocol_binary_response_no_extras protocol_binary_response_append;
375 typedef protocol_binary_response_no_extras protocol_binary_response_prepend;
376
377 /**
378 * Definition of the packet used by the version command
379 * See section 4
380 */
381 typedef protocol_binary_request_no_extras protocol_binary_request_version;
382
383 /**
384 * Definition of the packet returned from a successful version command
385 * See section 4
386 */
387 typedef protocol_binary_response_no_extras protocol_binary_response_version;
388
389 /**
390 * Definition of the packet used by the stats command.
391 * See section 4
392 */
393 typedef protocol_binary_request_no_extras protocol_binary_request_stats;
394
395 /**
396 * Definition of the packet returned from a successful stats command
397 * See section 4
398 */
399 typedef protocol_binary_response_no_extras protocol_binary_response_stats;
400
401 /**
402 * Definition of the packet used by the verbosity command
403 */
404 typedef union {
405 struct {
406 protocol_binary_request_header header;
407 struct {
408 uint32_t level;
409 } body;
410 } message;
411 uint8_t bytes[sizeof(protocol_binary_request_header) + 4];
412 } protocol_binary_request_verbosity;
413
414 /**
415 * Definition of the packet returned from the verbosity command
416 */
417 typedef protocol_binary_response_no_extras protocol_binary_response_verbosity;
418
419 /**
420 * Definition of the packet used by the touch command.
421 */
422 typedef union {
423 struct {
424 protocol_binary_request_header header;
425 struct {
426 uint32_t expiration;
427 } body;
428 } message;
429 uint8_t bytes[sizeof(protocol_binary_request_header) + 4];
430 } protocol_binary_request_touch;
431
432 /**
433 * Definition of the packet returned from the touch command
434 */
435 typedef protocol_binary_response_no_extras protocol_binary_response_touch;
436
437 /**
438 * Definition of the packet used by the GAT(Q) command.
439 */
440 typedef union {
441 struct {
442 protocol_binary_request_header header;
443 struct {
444 uint32_t expiration;
445 } body;
446 } message;
447 uint8_t bytes[sizeof(protocol_binary_request_header) + 4];
448 } protocol_binary_request_gat;
449
450 typedef protocol_binary_request_gat protocol_binary_request_gatq;
451
452 /**
453 * Definition of the packet returned from the GAT(Q)
454 */
455 typedef protocol_binary_response_get protocol_binary_response_gat;
456 typedef protocol_binary_response_get protocol_binary_response_gatq;
457
458 /**
459 * Definition of a request for a range operation.
460 * See http://code.google.com/p/memcached/wiki/RangeOps
461 *
462 * These types are used for range operations and exist within
463 * this header for use in other projects. Range operations are
464 * not expected to be implemented in the memcached server itself.
465 */
466 typedef union {
467 struct {
468 protocol_binary_response_header header;
469 struct {
470 uint16_t size;
471 uint8_t reserved;
472 uint8_t flags;
473 uint32_t max_results;
474 } body;
475 } message;
476 uint8_t bytes[sizeof(protocol_binary_request_header) + 4];
477 } protocol_binary_request_rangeop;
478
479 typedef protocol_binary_request_rangeop protocol_binary_request_rget;
480 typedef protocol_binary_request_rangeop protocol_binary_request_rset;
481 typedef protocol_binary_request_rangeop protocol_binary_request_rsetq;
482 typedef protocol_binary_request_rangeop protocol_binary_request_rappend;
483 typedef protocol_binary_request_rangeop protocol_binary_request_rappendq;
484 typedef protocol_binary_request_rangeop protocol_binary_request_rprepend;
485 typedef protocol_binary_request_rangeop protocol_binary_request_rprependq;
486 typedef protocol_binary_request_rangeop protocol_binary_request_rdelete;
487 typedef protocol_binary_request_rangeop protocol_binary_request_rdeleteq;
488 typedef protocol_binary_request_rangeop protocol_binary_request_rincr;
489 typedef protocol_binary_request_rangeop protocol_binary_request_rincrq;
490 typedef protocol_binary_request_rangeop protocol_binary_request_rdecr;
491 typedef protocol_binary_request_rangeop protocol_binary_request_rdecrq;
492
493 /**
494 * Definition of tap commands
495 * See To be written
496 *
497 */
498
499 typedef union {
500 struct {
501 protocol_binary_request_header header;
502 struct {
503 /**
504 * flags is a bitmask used to set properties for the
505 * the connection. Please In order to be forward compatible
506 * you should set all undefined bits to 0.
507 *
508 * If the bit require extra userdata, it will be stored
509 * in the user-data field of the body (passed to the engine
510 * as enginespeciffic). That means that when you parse the
511 * flags and the engine-specific data, you have to work your
512 * way from bit 0 and upwards to find the correct offset for
513 * the data.
514 *
515 */
516 uint32_t flags;
517
518 /**
519 * Backfill age
520 *
521 * By using this flag you can limit the amount of data being
522 * transmitted. If you don't specify a backfill age, the
523 * server will transmit everything it contains.
524 *
525 * The first 8 bytes in the engine specific data contains
526 * the oldest entry (from epoc) you're interested in.
527 * Specifying a time in the future (for the server you are
528 * connecting to), will cause it to start streaming current
529 * changes.
530 */
531 #define TAP_CONNECT_FLAG_BACKFILL 0x01
532 /**
533 * Dump will cause the server to send the data stored on the
534 * server, but disconnect when the keys stored in the server
535 * are transmitted.
536 */
537 #define TAP_CONNECT_FLAG_DUMP 0x02
538 /**
539 * The body contains a list of 16 bits words in network byte
540 * order specifying the vbucket ids to monitor. The first 16
541 * bit word contains the number of buckets. The number of 0
542 * means "all buckets"
543 */
544 #define TAP_CONNECT_FLAG_LIST_VBUCKETS 0x04
545 /**
546 * The responsibility of the vbuckets is to be transferred
547 * over to the caller when all items are transferred.
548 */
549 #define TAP_CONNECT_FLAG_TAKEOVER_VBUCKETS 0x08
550 /**
551 * The tap consumer supports ack'ing of tap messages
552 */
553 #define TAP_CONNECT_SUPPORT_ACK 0x10
554 /**
555 * The tap consumer would prefer to just get the keys
556 * back. If the engine supports this it will set
557 * the TAP_FLAG_NO_VALUE flag in each of the
558 * tap packets returned.
559 */
560 #define TAP_CONNECT_REQUEST_KEYS_ONLY 0x20
561 /**
562 * The body contains a list of (vbucket_id, last_checkpoint_id)
563 * pairs. This provides the checkpoint support in TAP streams.
564 * The last checkpoint id represents the last checkpoint that
565 * was successfully persisted.
566 */
567 #define TAP_CONNECT_CHECKPOINT 0x40
568 /**
569 * The tap consumer is a registered tap client, which means that
570 * the tap server will maintain its checkpoint cursor permanently.
571 */
572 #define TAP_CONNECT_REGISTERED_CLIENT 0x80
573 } body;
574 } message;
575 uint8_t bytes[sizeof(protocol_binary_request_header) + 4];
576 } protocol_binary_request_tap_connect;
577
578 typedef union {
579 struct {
580 protocol_binary_request_header header;
581 struct {
582 struct {
583 uint16_t enginespecific_length;
584 /*
585 * The flag section support the following flags
586 */
587 /**
588 * Request that the consumer send a response packet
589 * for this packet. The opaque field must be preserved
590 * in the response.
591 */
592 #define TAP_FLAG_ACK 0x01
593 /**
594 * The value for the key is not included in the packet
595 */
596 #define TAP_FLAG_NO_VALUE 0x02
597 uint16_t flags;
598 uint8_t ttl;
599 uint8_t res1;
600 uint8_t res2;
601 uint8_t res3;
602 } tap;
603 struct {
604 uint32_t flags;
605 uint32_t expiration;
606 } item;
607 } body;
608 } message;
609 uint8_t bytes[sizeof(protocol_binary_request_header) + 16];
610 } protocol_binary_request_tap_mutation;
611
612 typedef union {
613 struct {
614 protocol_binary_request_header header;
615 struct {
616 struct {
617 uint16_t enginespecific_length;
618 /**
619 * See the definition of the flags for
620 * protocol_binary_request_tap_mutation for a description
621 * of the available flags.
622 */
623 uint16_t flags;
624 uint8_t ttl;
625 uint8_t res1;
626 uint8_t res2;
627 uint8_t res3;
628 } tap;
629 } body;
630 } message;
631 uint8_t bytes[sizeof(protocol_binary_request_header) + 8];
632 } protocol_binary_request_tap_no_extras;
633
634 typedef protocol_binary_request_tap_no_extras protocol_binary_request_tap_delete;
635 typedef protocol_binary_request_tap_no_extras protocol_binary_request_tap_flush;
636 typedef protocol_binary_request_tap_no_extras protocol_binary_request_tap_opaque;
637 typedef protocol_binary_request_tap_no_extras protocol_binary_request_tap_vbucket_set;
638
639 /**
640 * Definition of the packet used by the scrub.
641 */
642 typedef protocol_binary_request_no_extras protocol_binary_request_scrub;
643
644 /**
645 * Definition of the packet returned from scrub.
646 */
647 typedef protocol_binary_response_no_extras protocol_binary_response_scrub;
648
649 /**
650 * Definition of the packet used by set vbucket
651 */
652 typedef union {
653 struct {
654 protocol_binary_request_header header;
655 struct {
656 vbucket_state_t state;
657 } body;
658 } message;
659 uint8_t bytes[sizeof(protocol_binary_request_header) + sizeof(vbucket_state_t)];
660 } protocol_binary_request_set_vbucket;
661 /**
662 * Definition of the packet returned from set vbucket
663 */
664 typedef protocol_binary_response_no_extras protocol_binary_response_set_vbucket;
665 /**
666 * Definition of the packet used by del vbucket
667 */
668 typedef protocol_binary_request_no_extras protocol_binary_request_del_vbucket;
669 /**
670 * Definition of the packet returned from del vbucket
671 */
672 typedef protocol_binary_response_no_extras protocol_binary_response_del_vbucket;
673
674 /**
675 * Definition of the packet used by get vbucket
676 */
677 typedef protocol_binary_request_no_extras protocol_binary_request_get_vbucket;
678
679 /**
680 * Definition of the packet returned from get vbucket
681 */
682 typedef union {
683 struct {
684 protocol_binary_response_header header;
685 struct {
686 vbucket_state_t state;
687 } body;
688 } message;
689 uint8_t bytes[sizeof(protocol_binary_response_header) + sizeof(vbucket_state_t)];
690 } protocol_binary_response_get_vbucket;
691
692 /**
693 * @}
694 */
695
696 #ifdef __cplusplus
697 }
698 #endif
699 #endif /* PROTOCOL_BINARY_H */