Lines Matching refs:cpkt
24 static inline bool append_u8(struct coap_packet *cpkt, uint8_t data) in append_u8() argument
26 if (!cpkt) { in append_u8()
30 if (cpkt->max_len - cpkt->offset < 1) { in append_u8()
34 cpkt->data[cpkt->offset++] = data; in append_u8()
39 static inline bool append_be16(struct coap_packet *cpkt, uint16_t data) in append_be16() argument
41 if (!cpkt) { in append_be16()
45 if (cpkt->max_len - cpkt->offset < 2) { in append_be16()
49 cpkt->data[cpkt->offset++] = data >> 8; in append_be16()
50 cpkt->data[cpkt->offset++] = (uint8_t) data; in append_be16()
55 static inline bool append(struct coap_packet *cpkt, const uint8_t *data, uint16_t len) in append() argument
57 if (!cpkt || !data) { in append()
61 if (cpkt->max_len - cpkt->offset < len) { in append()
65 memcpy(cpkt->data + cpkt->offset, data, len); in append()
66 cpkt->offset += len; in append()
400 int clear_more_flag(struct coap_packet *cpkt) in clear_more_flag() argument
407 offset = cpkt->hdr_len; in clear_more_flag()
411 opt = cpkt->data[offset++]; in clear_more_flag()
430 cpkt->data[offset] = cpkt->data[offset] & 0xF7; in clear_more_flag()