version 1.8.2.3, 2014/02/12 09:29:15
|
version 1.8.2.5, 2014/02/13 14:58:55
|
Line 62 typedef struct tagRawPacket {
|
Line 62 typedef struct tagRawPacket {
|
} while (0) |
} while (0) |
#define RPACK_SANITY(x) ((x) && (x)->r_buf && (x)->r_next && (x)->r_next >= (x)->r_buf) |
#define RPACK_SANITY(x) ((x) && (x)->r_buf && (x)->r_next && (x)->r_next >= (x)->r_buf) |
#define RPACK_BUF(x) (assert((x)), (x)->r_buf) |
#define RPACK_BUF(x) (assert((x)), (x)->r_buf) |
|
#define RPACK_NEXT(x) (assert((x)), (x)->r_next) |
#define RPACK_LEN(x) (assert((x)), (x)->r_len) |
#define RPACK_LEN(x) (assert((x)), (x)->r_len) |
#define RPACK_REWIND(x) (assert((x)), (x)->r_next = (x)->r_buf) |
#define RPACK_REWIND(x) (assert((x)), (x)->r_next = (x)->r_buf) |
#define RPACK_OFF(x) (assert((x)), (x)->r_next - (x)->r_buf) |
#define RPACK_OFF(x) (assert((x)), (x)->r_next - (x)->r_buf) |
|
#define RPACK_REMAIN(x) (assert((x)), (x)->r_len - ((x)->r_next - (x)->r_buf)) |
|
|
#define RPACK_SET_16(x, n) do { assert((x)); \ |
#define RPACK_SET_16(x, n) do { assert((x)); \ |
*((uint8_t *) (x) + 1) = *((const uint8_t *) (n) + 1); \ |
*((uint8_t *) (x) + 1) = *((const uint8_t *) (n) + 1); \ |
Line 155 typedef struct tagRawPacket {
|
Line 157 typedef struct tagRawPacket {
|
* return: NULL error or not enough space, !=NULL next position |
* return: NULL error or not enough space, !=NULL next position |
*/ |
*/ |
uint8_t *rpack_align_and_reserve(rpack_t * __restrict rp, size_t siz); |
uint8_t *rpack_align_and_reserve(rpack_t * __restrict rp, size_t siz); |
|
/* |
|
* rpack_next() - Get and set current position |
|
* |
|
* @rp = raw packet |
|
* @after_len = !=0 move current position after length |
|
* return: NULL error or current position |
|
*/ |
|
uint8_t *rpack_next(rpack_t * __restrict rp, size_t after_len); |
|
|
/* |
/* |
* rpack_create() - Allocate & init raw packet structure |
* rpack_create() - Allocate & init raw packet structure |