Lines Matching refs:bytesread
86 #define READ_TOKEN_BYTES(buf, len, dest, size, bytesread, err) do { \
87 if ((bytesread) + (size) > (u_int32_t)(len)) { \
90 memcpy((dest), (buf) + (bytesread), (size)); \
91 bytesread += size; \
95 #define READ_TOKEN_U_CHAR(buf, len, dest, bytesread, err) do { \
96 if ((bytesread) + sizeof(u_char) <= (u_int32_t)(len)) { \
97 (dest) = buf[(bytesread)]; \
98 (bytesread) += sizeof(u_char); \
103 #define READ_TOKEN_U_INT16(buf, len, dest, bytesread, err) do { \
104 if ((bytesread) + sizeof(u_int16_t) <= (u_int32_t)(len)) { \
105 (dest) = be16dec((buf) + (bytesread)); \
106 (bytesread) += sizeof(u_int16_t); \
111 #define READ_TOKEN_U_INT32(buf, len, dest, bytesread, err) do { \
112 if ((bytesread) + sizeof(u_int32_t) <= (u_int32_t)(len)) { \
113 (dest) = be32dec((buf) + (bytesread)); \
114 (bytesread) += sizeof(u_int32_t); \
119 #define READ_TOKEN_U_INT64(buf, len, dest, bytesread, err) do { \
120 if ((bytesread) + sizeof(u_int64_t) <= (u_int32_t)(len)) { \
121 dest = be64dec((buf) + (bytesread)); \
122 (bytesread) += sizeof(u_int64_t); \
127 #define SET_PTR(buf, len, ptr, size, bytesread, err) do { \
128 if ((bytesread) + (size) > (u_int32_t)(len)) \
131 (ptr) = (buf) + (bytesread); \
132 (bytesread) += (size); \