Tor
0.4.7.0-alpha-dev
|
Header for proto_cell.c. More...
Go to the source code of this file.
Functions | |
int | fetch_var_cell_from_buf (struct buf_t *buf, struct var_cell_t **out, int linkproto) |
Header for proto_cell.c.
Definition in file proto_cell.h.
int fetch_var_cell_from_buf | ( | buf_t * | buf, |
var_cell_t ** | out, | ||
int | linkproto | ||
) |
Check buf for a variable-length cell according to the rules of link protocol version linkproto. If one is found, pull it off the buffer and assign a newly allocated var_cell_t to *out, and return 1. Return 0 if whatever is on the start of buf_t is not a variable-length cell. Return 1 and set *out to NULL if there seems to be the start of a variable-length cell on buf, but the whole thing isn't there yet.
Definition at line 57 of file proto_cell.c.
Referenced by connection_fetch_var_cell_from_buf().