Lines Matching refs:buf
30 unsigned char buf[40]; in t_wellknown1() local
49 buflen = sizeof(buf); in t_wellknown1()
51 result = coap_print_link(r, buf, &buflen, &ofs); in t_wellknown1()
55 CU_ASSERT(memcmp(buf, teststr + offset, sizeof(teststr) - offset) == 0); in t_wellknown1()
60 buflen = sizeof(buf); in t_wellknown1()
61 result = coap_print_link(r, buf, &buflen, &ofs); in t_wellknown1()
67 buflen = sizeof(buf); in t_wellknown1()
69 result = coap_print_link(r, buf, &buflen, &ofs); in t_wellknown1()
79 unsigned char buf[10]; /* smaller than teststr */ in t_wellknown2() local
94 for (offset = 0; offset < sizeof(teststr) - sizeof(buf); offset++) { in t_wellknown2()
96 buflen = sizeof(buf); in t_wellknown2()
98 result = coap_print_link(r, buf, &buflen, &ofs); in t_wellknown2()
100 CU_ASSERT(result == (COAP_PRINT_STATUS_TRUNC | sizeof(buf))); in t_wellknown2()
103 CU_ASSERT(memcmp(buf, teststr + offset, sizeof(buf)) == 0); in t_wellknown2()
109 buflen = sizeof(buf); in t_wellknown2()
110 result = coap_print_link(r, buf, &buflen, &ofs); in t_wellknown2()
115 CU_ASSERT(memcmp(buf, teststr + offset, in t_wellknown2()
120 buflen = sizeof(buf); in t_wellknown2()
122 result = coap_print_link(r, buf, &buflen, &ofs); in t_wellknown2()
135 unsigned char buf[40]; in t_wellknown3() local
136 size_t buflen = sizeof(buf); in t_wellknown3()
154 result = coap_print_wellknown(ctx, buf, &buflen, offset, NULL); in t_wellknown3()
187 unsigned char buf[3]; in t_wellknown5() local
190 coap_encode_var_bytes(buf, ((inblock.num << 4) | in t_wellknown5()
192 inblock.szx)), buf)) { in t_wellknown5()
215 unsigned char buf[TEST_PDU_SIZE]; in t_wellknown6() local
228 coap_encode_var_bytes(buf, in t_wellknown6()
229 ((block.num << 4) | block.szx)), buf)) { in t_wellknown6()
266 unsigned char *buf = (unsigned char *)_buf; in t_wkc_tests_create()
285 int len = snprintf((char *)buf, TEST_URI_LEN + 1, in t_wkc_tests_create()
287 r = coap_resource_init(buf, len, 0); in t_wkc_tests_create()
289 buf += TEST_URI_LEN + 1; in t_wkc_tests_create()