38 return command == CELL_VERSIONS;
63 const int wide_circ_ids = linkproto >= MIN_LINK_PROTO_FOR_WIDE_CIRC_IDS;
64 const int circ_id_len = get_circ_id_size(wide_circ_ids);
65 const unsigned header_len = get_var_cell_header_size(wide_circ_ids);
75 length = ntohs(
get_uint16(hdr + circ_id_len + 1));
void buf_drain(buf_t *buf, size_t n)
size_t buf_datalen(const buf_t *buf)
void buf_peek(const buf_t *buf, char *string, size_t string_len)
Header file for buffers.c.
static uint16_t get_uint16(const void *cp)
static uint8_t get_uint8(const void *cp)
static uint32_t get_uint32(const void *cp)
tor_cmdline_mode_t command
var_cell_t * var_cell_new(uint16_t payload_len)
Header file for connection_or.c.
Master header file for Tor-specific functionality.
#define VAR_CELL_MAX_HEADER_SIZE
int fetch_var_cell_from_buf(buf_t *buf, var_cell_t **out, int linkproto)
static int cell_command_is_var_length(uint8_t command, int linkproto)
uint8_t payload[FLEXIBLE_ARRAY_MEMBER]
Variable-length cell structure.