Loading...
Searching...
No Matches
Data Structures | Macros | Functions | Variables
as_proto.h File Reference
#include <aerospike/as_std.h>
#include <aerospike/as_error.h>
#include <citrusleaf/cf_byte_order.h>
#include <stddef.h>
+ Include dependency graph for as_proto.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  as_compressed_proto_s
 
struct  as_msg_s
 
struct  as_proto_msg_s
 
struct  as_proto_s
 

Macros

#define AS_ADMIN_MESSAGE_TYPE   2
 
#define AS_COMPRESSED_MESSAGE_TYPE   4
 
#define AS_INFO_MESSAGE_TYPE   1
 
#define AS_MESSAGE_TYPE   3
 
#define AS_PROTO_VERSION   2
 
#define PROTO_SIZE_MAX   (128 * 1024 * 1024)
 

Functions

as_status as_compressed_size_error (as_error *err, size_t size)
 
static as_status as_compressed_size_parse (as_error *err, const uint8_t *buf, size_t *size)
 
static as_status as_msg_parse (as_error *err, as_msg *msg, size_t size)
 
void as_msg_swap_header_from_be (as_msg *m)
 
as_status as_proto_decompress (as_error *err, uint8_t *trg, size_t trg_sz, uint8_t *src, size_t src_sz)
 
as_status as_proto_parse (as_error *err, as_proto *proto)
 
static as_status as_proto_parse_type (as_error *err, as_proto *proto, uint8_t expected_type)
 
as_status as_proto_size_error (as_error *err, size_t size)
 
void as_proto_swap_from_be (as_proto *m)
 
void as_proto_swap_to_be (as_proto *m)
 
as_status as_proto_type_error (as_error *err, as_proto *proto, uint8_t expected)
 
as_status as_proto_version_error (as_error *err, as_proto *proto)
 

Variables

uint8_t data [0]
 
uint32_t generation
 
uint8_t header_sz
 
uint8_t info1
 
uint8_t info2
 
uint8_t info3
 
as_msg m
 
uint16_t n_fields
 
uint16_t n_ops
 
as_proto proto
 
uint32_t record_ttl
 
uint8_t result_code
 
uint64_t sz
 
uint32_t transaction_ttl
 
uint8_t type
 
uint64_t uncompressed_sz
 
uint8_t unused
 
uint8_t version
 

Macro Definition Documentation

◆ AS_ADMIN_MESSAGE_TYPE

#define AS_ADMIN_MESSAGE_TYPE   2

Definition at line 37 of file as_proto.h.

◆ AS_COMPRESSED_MESSAGE_TYPE

#define AS_COMPRESSED_MESSAGE_TYPE   4

Definition at line 39 of file as_proto.h.

◆ AS_INFO_MESSAGE_TYPE

#define AS_INFO_MESSAGE_TYPE   1

Definition at line 36 of file as_proto.h.

◆ AS_MESSAGE_TYPE

#define AS_MESSAGE_TYPE   3

Definition at line 38 of file as_proto.h.

◆ AS_PROTO_VERSION

#define AS_PROTO_VERSION   2

Definition at line 33 of file as_proto.h.

◆ PROTO_SIZE_MAX

#define PROTO_SIZE_MAX   (128 * 1024 * 1024)

Definition at line 40 of file as_proto.h.

Function Documentation

◆ as_compressed_size_error()

as_status as_compressed_size_error ( as_error * err,
size_t size )

◆ as_compressed_size_parse()

static as_status as_compressed_size_parse ( as_error * err,
const uint8_t * buf,
size_t * size )
inlinestatic

Definition at line 158 of file as_proto.h.

References AEROSPIKE_OK, as_compressed_size_error(), and PROTO_SIZE_MAX.

◆ as_msg_parse()

static as_status as_msg_parse ( as_error * err,
as_msg * msg,
size_t size )
inlinestatic

Definition at line 148 of file as_proto.h.

References AEROSPIKE_OK, as_msg_swap_header_from_be(), and as_proto_size_error().

◆ as_msg_swap_header_from_be()

void as_msg_swap_header_from_be ( as_msg * m)

◆ as_proto_decompress()

as_status as_proto_decompress ( as_error * err,
uint8_t * trg,
size_t trg_sz,
uint8_t * src,
size_t src_sz )

◆ as_proto_parse()

as_status as_proto_parse ( as_error * err,
as_proto * proto )

◆ as_proto_parse_type()

static as_status as_proto_parse_type ( as_error * err,
as_proto * proto,
uint8_t expected_type )
inlinestatic

Definition at line 139 of file as_proto.h.

References as_proto_parse(), as_proto_type_error(), and proto.

◆ as_proto_size_error()

as_status as_proto_size_error ( as_error * err,
size_t size )

◆ as_proto_swap_from_be()

void as_proto_swap_from_be ( as_proto * m)

◆ as_proto_swap_to_be()

void as_proto_swap_to_be ( as_proto * m)

◆ as_proto_type_error()

as_status as_proto_type_error ( as_error * err,
as_proto * proto,
uint8_t expected )

◆ as_proto_version_error()

as_status as_proto_version_error ( as_error * err,
as_proto * proto )

Variable Documentation

◆ data

uint8_t data

Definition at line 3 of file as_proto.h.

◆ generation

uint32_t generation

Definition at line 6 of file as_proto.h.

◆ header_sz

uint8_t header_sz

Definition at line 0 of file as_proto.h.

◆ info1

uint8_t info1

Definition at line 1 of file as_proto.h.

◆ info2

uint8_t info2

Definition at line 2 of file as_proto.h.

◆ info3

uint8_t info3

Definition at line 3 of file as_proto.h.

◆ m

as_msg m

Definition at line 1 of file as_proto.h.

◆ n_fields

uint16_t n_fields

Definition at line 9 of file as_proto.h.

◆ n_ops

uint16_t n_ops

Definition at line 10 of file as_proto.h.

◆ proto

as_proto proto

Definition at line 0 of file as_proto.h.

◆ record_ttl

uint32_t record_ttl

Definition at line 7 of file as_proto.h.

◆ result_code

uint8_t result_code

Definition at line 5 of file as_proto.h.

◆ sz

uint64_t sz

Definition at line 2 of file as_proto.h.

◆ transaction_ttl

uint32_t transaction_ttl

Definition at line 8 of file as_proto.h.

◆ type

uint8_t type

Definition at line 1 of file as_proto.h.

◆ uncompressed_sz

uint64_t uncompressed_sz

Definition at line 1 of file as_proto.h.

◆ unused

uint8_t unused

Definition at line 4 of file as_proto.h.

◆ version

uint8_t version

Definition at line 0 of file as_proto.h.