Lines Matching refs:len
54 LWIP_ASSERT("Can only deal with contiguous PBUFs", pbuf->tot_len == pbuf->len); in coap_pdu_from_pbuf()
153 coap_add_token(coap_pdu_t *pdu, size_t len, const unsigned char *data) { in coap_add_token() argument
154 const size_t HEADERLENGTH = len + 4; in coap_add_token()
156 if (!pdu || len > 8 || pdu->max_size < HEADERLENGTH) in coap_add_token()
159 pdu->hdr->token_length = len; in coap_add_token()
160 if (len) in coap_add_token()
161 memcpy(pdu->hdr->token, data, len); in coap_add_token()
171 coap_add_option(coap_pdu_t *pdu, unsigned short type, unsigned int len, const unsigned char *data) { in coap_add_option() argument
187 type - pdu->max_delta, data, len); in coap_add_option()
203 coap_add_option_later(coap_pdu_t *pdu, unsigned short type, unsigned int len) { in coap_add_option_later() argument
219 type - pdu->max_delta, NULL, len); in coap_add_option_later()
230 return ((unsigned char*)opt) + optsize - len; in coap_add_option_later()
234 coap_add_data(coap_pdu_t *pdu, unsigned int len, const unsigned char *data) { in coap_add_data() argument
238 if (len == 0) in coap_add_data()
241 if (pdu->length + len + 1 > pdu->max_size) { in coap_add_data()
251 memcpy(pdu->data, data, len); in coap_add_data()
252 pdu->length += len + 1; in coap_add_data()
257 coap_get_data(coap_pdu_t *pdu, size_t *len, unsigned char **data) { in coap_get_data() argument
259 assert(len); in coap_get_data()
263 *len = (unsigned char *)pdu->hdr + pdu->length - pdu->data; in coap_get_data()
266 *len = 0; in coap_get_data()