Lines Matching refs:cpkt

74 	zassert_not_equal(msg->msg_data, msg->cpkt.data,  in ZTEST_F()
76 zassert_equal(msg->cpkt.data, msg->body_encode_buffer.data, in ZTEST_F()
79 zassert_equal(EXPECTED_LWM2M_COAP_FULL_BUFFER_SIZE, msg->cpkt.max_len, in ZTEST_F()
82 zassert_equal(EXPECTED_DEFAULT_HEADER_OFFSET, msg->cpkt.offset); in ZTEST_F()
85 msg->out.out_cpkt = &msg->cpkt; in ZTEST_F()
89 zassert_equal(msg->cpkt.max_len, msg->cpkt.offset, "Buffer should be full"); in ZTEST_F()
107 zassert_not_equal(msg->msg_data, msg->cpkt.data, in ZTEST_F()
109 zassert_equal(msg->cpkt.data, msg->body_encode_buffer.data, in ZTEST_F()
112 ret = coap_append_option_int(&msg->cpkt, COAP_OPTION_CONTENT_FORMAT, in ZTEST_F()
116 ret = coap_packet_append_payload_marker(&msg->cpkt); in ZTEST_F()
119 ret = buf_append(CPKT_BUF_WRITE(&msg->cpkt), fixture->dummy_msg, in ZTEST_F()
125 coap_packet_get_payload(&msg->cpkt, &payload_len); in ZTEST_F()
134 zassert_equal(msg->msg_data, msg->cpkt.data, in ZTEST_F()
138 const uint8_t *payload = coap_packet_get_payload(&msg->cpkt, &payload_len); in ZTEST_F()
144 zassert_equal(EXPECTED_HEADERS_LEN, msg->cpkt.hdr_len + msg->cpkt.opt_len + 1, in ZTEST_F()
147 zassert_equal(payload, msg->cpkt.data + EXPECTED_HEADERS_LEN, in ZTEST_F()
152 zassert_mem_equal(msg->cpkt.data, expected_headers, EXPECTED_HEADERS_LEN, in ZTEST_F()
175 ret = coap_append_option_int(&msg->cpkt, COAP_OPTION_CONTENT_FORMAT, in ZTEST_F()
179 ret = coap_append_option_int(&msg->cpkt, COAP_OPTION_ACCEPT, COAP_CONTENT_FORMAT_APP_JSON); in ZTEST_F()
184 zassert_equal(msg->cpkt.hdr_len, expected_header_len, "Header length not as expected"); in ZTEST_F()
188 zassert_equal(msg->cpkt.opt_len, expected_options_len, "Options length not as expected"); in ZTEST_F()
190 ret = coap_packet_append_payload_marker(&msg->cpkt); in ZTEST_F()
193 ret = buf_append(CPKT_BUF_WRITE(&msg->cpkt), fixture->dummy_msg, in ZTEST_F()
197 zassert_not_equal(msg->msg_data, msg->cpkt.data, "Buffer for block data is not yet in use"); in ZTEST_F()
204 zassert_equal(msg->msg_data, msg->cpkt.data, "Buffer for block data is not in use"); in ZTEST_F()
206 ret = coap_get_option_int(&msg->cpkt, COAP_OPTION_BLOCK1); in ZTEST_F()
209 const uint8_t *payload = coap_packet_get_payload(&msg->cpkt, &payload_len); in ZTEST_F()
232 ret = coap_packet_append_option(&msg->cpkt, COAP_OPTION_URI_QUERY, query, strlen(query)); in ZTEST_F()
235 ret = coap_append_option_int(&msg->cpkt, COAP_OPTION_ACCEPT, in ZTEST_F()
241 zassert_equal(msg->cpkt.hdr_len, expected_header_len, "Header length not as expected"); in ZTEST_F()
245 zassert_equal(msg->cpkt.opt_len, expected_options_len, "Options length not as expected"); in ZTEST_F()
247 ret = coap_packet_append_payload_marker(&msg->cpkt); in ZTEST_F()
250 ret = buf_append(CPKT_BUF_WRITE(&msg->cpkt), fixture->dummy_msg, in ZTEST_F()
254 zassert_not_equal(msg->msg_data, msg->cpkt.data, "Buffer for block data is not yet in use"); in ZTEST_F()
260 zassert_equal(msg->msg_data, msg->cpkt.data, "Buffer for block data is not in use"); in ZTEST_F()
262 ret = coap_get_option_int(&msg->cpkt, COAP_OPTION_BLOCK1); in ZTEST_F()
265 payload = coap_packet_get_payload(&msg->cpkt, &payload_len); in ZTEST_F()
277 ret = coap_get_option_int(&msg->cpkt, COAP_OPTION_BLOCK1); in ZTEST_F()
280 payload = coap_packet_get_payload(&msg->cpkt, &payload_len); in ZTEST_F()
307 ret = coap_packet_append_option(&msg->cpkt, COAP_OPTION_PROXY_SCHEME, proxy_scheme, in ZTEST_F()
311 ret = coap_append_option_int(&msg->cpkt, COAP_OPTION_CONTENT_FORMAT, in ZTEST_F()
317 zassert_equal(msg->cpkt.hdr_len, expected_header_len, "Header length not as expected"); in ZTEST_F()
321 zassert_equal(msg->cpkt.opt_len, expected_options_len, "Options length not as expected"); in ZTEST_F()
323 ret = coap_packet_append_payload_marker(&msg->cpkt); in ZTEST_F()
326 ret = buf_append(CPKT_BUF_WRITE(&msg->cpkt), fixture->dummy_msg, in ZTEST_F()
330 zassert_not_equal(msg->msg_data, msg->cpkt.data, "Buffer for block data is not yet in use"); in ZTEST_F()
336 zassert_equal(msg->msg_data, msg->cpkt.data, "Buffer for block data is not in use"); in ZTEST_F()
338 ret = coap_get_option_int(&msg->cpkt, COAP_OPTION_BLOCK1); in ZTEST_F()
341 payload = coap_packet_get_payload(&msg->cpkt, &payload_len); in ZTEST_F()
353 ret = coap_get_option_int(&msg->cpkt, COAP_OPTION_BLOCK1); in ZTEST_F()
356 payload = coap_packet_get_payload(&msg->cpkt, &payload_len); in ZTEST_F()
368 ret = coap_get_option_int(&msg->cpkt, COAP_OPTION_BLOCK1); in ZTEST_F()
371 payload = coap_packet_get_payload(&msg->cpkt, &payload_len); in ZTEST_F()