Lines Matching refs:cur

48 	uint8_t *cur = buf->cur;  in pack_uint8()  local
51 if ((end - cur) < sizeof(uint8_t)) { in pack_uint8()
55 NET_DBG(">> val:%02x cur:%p, end:%p", val, (void *)cur, (void *)end); in pack_uint8()
58 cur[0] = val; in pack_uint8()
59 buf->cur = (cur + sizeof(uint8_t)); in pack_uint8()
76 uint8_t *cur = buf->cur; in pack_uint16() local
79 if ((end - cur) < sizeof(uint16_t)) { in pack_uint16()
83 NET_DBG(">> val:%04x cur:%p, end:%p", val, (void *)cur, (void *)end); in pack_uint16()
86 sys_put_be16(val, cur); in pack_uint16()
87 buf->cur = (cur + sizeof(uint16_t)); in pack_uint16()
104 if ((buf->end - buf->cur) < GET_UT8STR_BUFFER_SIZE(str)) { in pack_utf8_str()
109 (uint32_t)GET_UT8STR_BUFFER_SIZE(str), (void *)buf->cur, (void *)buf->end); in pack_utf8_str()
114 memcpy(buf->cur, str->utf8, str->size); in pack_utf8_str()
115 buf->cur += str->size; in pack_utf8_str()
150 (buf == NULL) ? 0 : (void *)buf->cur, (buf == NULL) ? 0 : (void *)buf->end); in packet_length_encode()
156 *(buf->cur) = length & MQTT_LENGTH_VALUE_MASK; in packet_length_encode()
163 *(buf->cur) |= MQTT_LENGTH_CONTINUATION_BIT; in packet_length_encode()
165 buf->cur++; in packet_length_encode()
196 uint32_t length = buf->cur - start; in mqtt_encode_fixed_header()
211 buf->cur = start - fixed_header_length; in mqtt_encode_fixed_header()
219 buf->cur = buf->cur - fixed_header_length; in mqtt_encode_fixed_header()
220 buf->end = buf->cur + length + fixed_header_length; in mqtt_encode_fixed_header()
265 buf->cur += MQTT_FIXED_HEADER_MAX_SIZE; in mqtt_message_id_only_enc()
266 start = buf->cur; in mqtt_message_id_only_enc()
294 buf->cur += MQTT_FIXED_HEADER_MAX_SIZE; in connect_request_encode()
295 start = buf->cur; in connect_request_encode()
314 connect_flags_pos = buf->cur; in connect_request_encode()
412 buf->cur += MQTT_FIXED_HEADER_MAX_SIZE; in publish_encode()
413 start = buf->cur; in publish_encode()
430 buf->cur += param->message.payload.len; in publish_encode()
480 uint8_t *cur = buf->cur; in disconnect_encode() local
483 if ((end - cur) < sizeof(disc_packet)) { in disconnect_encode()
487 memcpy(cur, disc_packet, sizeof(disc_packet)); in disconnect_encode()
488 buf->end = (cur + sizeof(disc_packet)); in disconnect_encode()
507 buf->cur += MQTT_FIXED_HEADER_MAX_SIZE; in subscribe_encode()
508 start = buf->cur; in subscribe_encode()
539 buf->cur += MQTT_FIXED_HEADER_MAX_SIZE; in unsubscribe_encode()
540 start = buf->cur; in unsubscribe_encode()
559 uint8_t *cur = buf->cur; in ping_request_encode() local
562 if ((end - cur) < sizeof(ping_packet)) { in ping_request_encode()
566 memcpy(cur, ping_packet, sizeof(ping_packet)); in ping_request_encode()
567 buf->end = (cur + sizeof(ping_packet)); in ping_request_encode()