Searched refs:chdr (Results 1 – 3 of 3) sorted by relevance
/openthread-3.6.0/third_party/tcplp/lib/test/ |
D | test_all.c | 78 void cbuf_test(const char* test_name, struct cbufhead* chdr, const char* contents) { in cbuf_test() argument 79 char buf_string[chdr->size + 1]; in cbuf_test() 82 cbuf_reference(chdr, &first, &second); in cbuf_test() 104 void cbuf_write_string(struct cbufhead* chdr, const char* string) { in cbuf_write_string() argument 105 cbuf_write(chdr, string, 0, strlen(string), cbuf_copy_into_buffer); in cbuf_write_string() 111 struct cbufhead chdr; in test_cbuf() local 113 cbuf_init(&chdr, buffer, 64); // capacity is actually 64 in test_cbuf() 114 cbuf_test("cbuf_init", &chdr, ""); in test_cbuf() 116 cbuf_write_string(&chdr, "abcdefghijklmnopqrstuvwxyz0123456789"); in test_cbuf() 117 cbuf_test("cbuf_write", &chdr, "abcdefghijklmnopqrstuvwxyz0123456789"); in test_cbuf() [all …]
|
/openthread-3.6.0/third_party/tcplp/lib/ |
D | cbuf.c | 74 void cbuf_init(struct cbufhead* chdr, uint8_t* buf, size_t len) { in cbuf_init() argument 75 chdr->r_index = 0; in cbuf_init() 76 chdr->used = 0; in cbuf_init() 77 chdr->size = len; in cbuf_init() 78 chdr->buf = buf; in cbuf_init() 81 size_t cbuf_used_space(struct cbufhead* chdr) { in cbuf_used_space() argument 82 return chdr->used; in cbuf_used_space() 85 size_t cbuf_free_space(struct cbufhead* chdr) { in cbuf_free_space() argument 86 return chdr->size - chdr->used; in cbuf_free_space() 89 size_t cbuf_size(struct cbufhead* chdr) { in cbuf_size() argument [all …]
|
D | cbuf.h | 51 void cbuf_init(struct cbufhead* chdr, uint8_t* buf, size_t len); 65 size_t cbuf_write(struct cbufhead* chdr, const void* data, size_t data_offset, size_t data_len, cbu… 68 size_t cbuf_read(struct cbufhead* chdr, void* data, size_t data_offset, size_t numbytes, int pop, c… 71 size_t cbuf_read_offset(struct cbufhead* chdr, void* data, size_t data_offset, size_t numbytes, siz… 74 size_t cbuf_pop(struct cbufhead* chdr, size_t numbytes); 77 size_t cbuf_used_space(struct cbufhead* chdr); 80 size_t cbuf_free_space(struct cbufhead* chdr); 83 size_t cbuf_size(struct cbufhead* chdr); 86 bool cbuf_empty(struct cbufhead* chdr); 89 void cbuf_contiguify(struct cbufhead* chdr, uint8_t* bitmap); [all …]
|