protocol_binary.h File Reference

#include <stdint.h>

Include dependency graph for protocol_binary.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  protocol_binary_request_header
 Definition of the header structure for a request packet. More...
union  protocol_binary_response_header
 Definition of the header structure for a response packet. More...
union  protocol_binary_request_no_extras
 Definition of a request-packet containing no extras. More...
union  protocol_binary_response_no_extras
 Definition of a response-packet containing no extras. More...
union  protocol_binary_response_get
 Definition of the packet returned from a successful get, getq, getk and getkq. More...
union  protocol_binary_request_flush
 Definition of the packet used by the flush command See section 4 Please note that the expiration field is optional, so remember to see check the header.bodysize to see if it is present. More...
union  protocol_binary_request_set
 Definition of the packet used by set, add and replace See section 4. More...
union  protocol_binary_request_incr
 Definition of the structure used by the increment and decrement command. More...
union  protocol_binary_response_incr
 Definition of the response from an incr or decr command command. More...

Typedefs

typedef
protocol_binary_request_no_extras 
protocol_binary_request_get
 Definition of the packet used by the get, getq, getk and getkq command.
typedef
protocol_binary_request_no_extras 
protocol_binary_request_getq
typedef
protocol_binary_request_no_extras 
protocol_binary_request_getk
typedef
protocol_binary_request_no_extras 
protocol_binary_request_getkq
typedef
protocol_binary_response_get 
protocol_binary_response_getq
typedef
protocol_binary_response_get 
protocol_binary_response_getk
typedef
protocol_binary_response_get 
protocol_binary_response_getkq
typedef
protocol_binary_request_no_extras 
protocol_binary_request_delete
 Definition of the packet used by the delete command See section 4.
typedef
protocol_binary_response_no_extras 
protocol_binary_response_delete
 Definition of the packet returned by the delete command See section 4.
typedef
protocol_binary_response_no_extras 
protocol_binary_response_flush
 Definition of the packet returned by the flush command See section 4.
typedef protocol_binary_request_set protocol_binary_request_add
typedef protocol_binary_request_set protocol_binary_request_replace
typedef
protocol_binary_response_no_extras 
protocol_binary_response_set
 Definition of the packet returned by set, add and replace See section 4.
typedef
protocol_binary_response_no_extras 
protocol_binary_response_add
typedef
protocol_binary_response_no_extras 
protocol_binary_response_replace
typedef
protocol_binary_request_no_extras 
protocol_binary_request_noop
 Definition of the noop packet See section 4.
typedef
protocol_binary_response_no_extras 
protocol_binary_response_noop
 Definition of the packet returned by the noop command See section 4.
typedef
protocol_binary_request_incr 
protocol_binary_request_decr
typedef
protocol_binary_response_incr 
protocol_binary_response_decr
typedef
protocol_binary_request_no_extras 
protocol_binary_request_quit
 Definition of the quit See section 4.
typedef
protocol_binary_response_no_extras 
protocol_binary_response_quit
 Definition of the packet returned by the quit command See section 4.
typedef
protocol_binary_request_no_extras 
protocol_binary_request_append
 Definition of the packet used by append and prepend command See section 4.
typedef
protocol_binary_request_no_extras 
protocol_binary_request_prepend
typedef
protocol_binary_response_no_extras 
protocol_binary_response_append
 Definition of the packet returned from a successful append or prepend See section 4.
typedef
protocol_binary_response_no_extras 
protocol_binary_response_prepend
typedef
protocol_binary_request_no_extras 
protocol_binary_request_version
 Definition of the packet used by the version command See section 4.
typedef
protocol_binary_response_no_extras 
protocol_binary_response_version
 Definition of the packet returned from a successful version command See section 4.
typedef
protocol_binary_request_no_extras 
protocol_binary_request_stats
 Definition of the packet used by the stats command.
typedef
protocol_binary_response_no_extras 
protocol_binary_response_stats
 Definition of the packet returned from a successful stats command See section 4.

Enumerations

enum  protocol_binary_magic { PROTOCOL_BINARY_REQ = 0x80, PROTOCOL_BINARY_RES = 0x81 }
 This file contains definitions of the constants and packet formats defined in the binary specification. More...
enum  protocol_binary_response_status {
  PROTOCOL_BINARY_RESPONSE_SUCCESS = 0x00, PROTOCOL_BINARY_RESPONSE_KEY_ENOENT = 0x01, PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS = 0x02, PROTOCOL_BINARY_RESPONSE_E2BIG = 0x03,
  PROTOCOL_BINARY_RESPONSE_EINVAL = 0x04, PROTOCOL_BINARY_RESPONSE_NOT_STORED = 0x05, PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND = 0x81, PROTOCOL_BINARY_RESPONSE_ENOMEM = 0x82
}
 Definition of the valid response status numbers. More...
enum  protocol_binary_command {
  PROTOCOL_BINARY_CMD_GET = 0x00, PROTOCOL_BINARY_CMD_SET = 0x01, PROTOCOL_BINARY_CMD_ADD = 0x02, PROTOCOL_BINARY_CMD_REPLACE = 0x03,
  PROTOCOL_BINARY_CMD_DELETE = 0x04, PROTOCOL_BINARY_CMD_INCREMENT = 0x05, PROTOCOL_BINARY_CMD_DECREMENT = 0x06, PROTOCOL_BINARY_CMD_QUIT = 0x07,
  PROTOCOL_BINARY_CMD_FLUSH = 0x08, PROTOCOL_BINARY_CMD_GETQ = 0x09, PROTOCOL_BINARY_CMD_NOOP = 0x0a, PROTOCOL_BINARY_CMD_VERSION = 0x0b,
  PROTOCOL_BINARY_CMD_GETK = 0x0c, PROTOCOL_BINARY_CMD_GETKQ = 0x0d, PROTOCOL_BINARY_CMD_APPEND = 0x0e, PROTOCOL_BINARY_CMD_PREPEND = 0x0f,
  PROTOCOL_BINARY_CMD_STAT = 0x10, PROTOCOL_BINARY_CMD_SETQ = 0x11, PROTOCOL_BINARY_CMD_ADDQ = 0x12, PROTOCOL_BINARY_CMD_REPLACEQ = 0x13,
  PROTOCOL_BINARY_CMD_DELETEQ = 0x14, PROTOCOL_BINARY_CMD_INCREMENTQ = 0x15, PROTOCOL_BINARY_CMD_DECREMENTQ = 0x16, PROTOCOL_BINARY_CMD_QUITQ = 0x17,
  PROTOCOL_BINARY_CMD_FLUSHQ = 0x18, PROTOCOL_BINARY_CMD_APPENDQ = 0x19, PROTOCOL_BINARY_CMD_PREPENDQ = 0x1a
}
 Defintion of the different command opcodes. More...
enum  protocol_binary_datatypes { PROTOCOL_BINARY_RAW_BYTES = 0x00 }
 Definition of the data types in the packet See section 3.4 Data Types. More...


Typedef Documentation

Definition of the packet used by append and prepend command See section 4.

Definition of the packet used by the delete command See section 4.

Definition of the packet used by the get, getq, getk and getkq command.

See section 4

Definition of the noop packet See section 4.

Definition of the quit See section 4.

Definition of the packet used by the stats command.

See section 4

Definition of the packet used by the version command See section 4.

Definition of the packet returned from a successful append or prepend See section 4.

Definition of the packet returned by the delete command See section 4.

Definition of the packet returned by the flush command See section 4.

Definition of the packet returned by the noop command See section 4.

Definition of the packet returned by the quit command See section 4.

Definition of the packet returned by set, add and replace See section 4.

Definition of the packet returned from a successful stats command See section 4.

Definition of the packet returned from a successful version command See section 4.


Enumeration Type Documentation

Defintion of the different command opcodes.

See section 3.3 Command Opcodes

Enumerator:
PROTOCOL_BINARY_CMD_GET 
PROTOCOL_BINARY_CMD_SET 
PROTOCOL_BINARY_CMD_ADD 
PROTOCOL_BINARY_CMD_REPLACE 
PROTOCOL_BINARY_CMD_DELETE 
PROTOCOL_BINARY_CMD_INCREMENT 
PROTOCOL_BINARY_CMD_DECREMENT 
PROTOCOL_BINARY_CMD_QUIT 
PROTOCOL_BINARY_CMD_FLUSH 
PROTOCOL_BINARY_CMD_GETQ 
PROTOCOL_BINARY_CMD_NOOP 
PROTOCOL_BINARY_CMD_VERSION 
PROTOCOL_BINARY_CMD_GETK 
PROTOCOL_BINARY_CMD_GETKQ 
PROTOCOL_BINARY_CMD_APPEND 
PROTOCOL_BINARY_CMD_PREPEND 
PROTOCOL_BINARY_CMD_STAT 
PROTOCOL_BINARY_CMD_SETQ 
PROTOCOL_BINARY_CMD_ADDQ 
PROTOCOL_BINARY_CMD_REPLACEQ 
PROTOCOL_BINARY_CMD_DELETEQ 
PROTOCOL_BINARY_CMD_INCREMENTQ 
PROTOCOL_BINARY_CMD_DECREMENTQ 
PROTOCOL_BINARY_CMD_QUITQ 
PROTOCOL_BINARY_CMD_FLUSHQ 
PROTOCOL_BINARY_CMD_APPENDQ 
PROTOCOL_BINARY_CMD_PREPENDQ 

Definition of the data types in the packet See section 3.4 Data Types.

Enumerator:
PROTOCOL_BINARY_RAW_BYTES 

This file contains definitions of the constants and packet formats defined in the binary specification.

Please note that you _MUST_ remember to convert each multibyte field to / from network byte order to / from host order. Definition of the legal "magic" values used in a packet. See section 3.1 Magic byte

Enumerator:
PROTOCOL_BINARY_REQ 
PROTOCOL_BINARY_RES 

Definition of the valid response status numbers.

See section 3.2 Response Status

Enumerator:
PROTOCOL_BINARY_RESPONSE_SUCCESS 
PROTOCOL_BINARY_RESPONSE_KEY_ENOENT 
PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS 
PROTOCOL_BINARY_RESPONSE_E2BIG 
PROTOCOL_BINARY_RESPONSE_EINVAL 
PROTOCOL_BINARY_RESPONSE_NOT_STORED 
PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND 
PROTOCOL_BINARY_RESPONSE_ENOMEM 


Generated on Fri Apr 17 16:28:23 2009 for memcached by  doxygen 1.5.8