Lines Matching defs:buf
50 * Decodes multiple-length byte sequences. @p buf points to an input byte
53 * @param buf The input byte sequence to decode from
58 unsigned int coap_decode_var_bytes(const uint8_t *buf, size_t length);
61 * Decodes multiple-length byte sequences. @p buf points to an input byte
64 * @param buf The input byte sequence to decode from
69 uint64_t coap_decode_var_bytes8(const uint8_t *buf, size_t length);
72 * Encodes multiple-length byte sequences. @p buf points to an output buffer of
77 * @param buf The output buffer to encode into
84 unsigned int coap_encode_var_safe(uint8_t *buf,
89 * Encodes multiple-length byte sequences. @p buf points to an output buffer of
94 * @param buf The output buffer to encode into
101 unsigned int coap_encode_var_safe8(uint8_t *buf,
110 * maximum value of 0xffffffff, and buf is usually defined as an array, it
111 * is unsafe to continue to use this variant if buf[] is less than buf[4].
114 * char buf[1],oops;
116 * coap_encode_var_bytes(buf, 0xfff);
119 * coap_encode_var_safe(buf, sizeof(buf), 0xfff);
123 coap_encode_var_bytes(uint8_t *buf, unsigned int value) {
124 return (int)coap_encode_var_safe(buf, sizeof(value), value);