Lines Matching refs:hdr

34   CU_ASSERT(pdu->hdr->version == 1);  in t_parse_pdu1()
35 CU_ASSERT(pdu->hdr->type == COAP_MESSAGE_CON); in t_parse_pdu1()
36 CU_ASSERT(pdu->hdr->token_length == 0); in t_parse_pdu1()
37 CU_ASSERT(pdu->hdr->code == COAP_REQUEST_GET); in t_parse_pdu1()
38 CU_ASSERT(memcmp(&pdu->hdr->id, teststr + 2, 2) == 0); in t_parse_pdu1()
51 CU_ASSERT(pdu->hdr->version == 1); in t_parse_pdu2()
52 CU_ASSERT(pdu->hdr->type == COAP_MESSAGE_NON); in t_parse_pdu2()
53 CU_ASSERT(pdu->hdr->token_length == 5); in t_parse_pdu2()
54 CU_ASSERT(pdu->hdr->code == 0x69); in t_parse_pdu2()
55 CU_ASSERT(memcmp(&pdu->hdr->id, teststr + 2, 2) == 0); in t_parse_pdu2()
56 CU_ASSERT(memcmp(pdu->hdr->token, teststr + 4, 5) == 0); in t_parse_pdu2()
97 CU_ASSERT(pdu->hdr->version == 1); in t_parse_pdu5()
98 CU_ASSERT(pdu->hdr->type == COAP_MESSAGE_NON); in t_parse_pdu5()
99 CU_ASSERT(pdu->hdr->token_length == 5); in t_parse_pdu5()
100 CU_ASSERT(pdu->hdr->code == 0x73); in t_parse_pdu5()
101 CU_ASSERT(memcmp(&pdu->hdr->id, teststr + 2, 2) == 0); in t_parse_pdu5()
102 CU_ASSERT(memcmp(pdu->hdr->token, teststr + 4, 5) == 0); in t_parse_pdu5()
133 CU_ASSERT(pdu->hdr->version == 1); in t_parse_pdu7()
134 CU_ASSERT(pdu->hdr->type == COAP_MESSAGE_NON); in t_parse_pdu7()
135 CU_ASSERT(pdu->hdr->token_length == 5); in t_parse_pdu7()
136 CU_ASSERT(pdu->hdr->code == 0x73); in t_parse_pdu7()
137 CU_ASSERT(memcmp(&pdu->hdr->id, teststr + 2, 2) == 0); in t_parse_pdu7()
138 CU_ASSERT(memcmp(pdu->hdr->token, teststr + 4, 5) == 0); in t_parse_pdu7()
142 CU_ASSERT(pdu->data == (unsigned char *)pdu->hdr + 13); in t_parse_pdu7()
159 CU_ASSERT(pdu->hdr->version == 1); in t_parse_pdu8()
160 CU_ASSERT(pdu->hdr->type == COAP_MESSAGE_NON); in t_parse_pdu8()
161 CU_ASSERT(pdu->hdr->token_length == 0); in t_parse_pdu8()
162 CU_ASSERT(pdu->hdr->code == 0x73); in t_parse_pdu8()
163 CU_ASSERT(memcmp(&pdu->hdr->id, teststr + 2, 2) == 0); in t_parse_pdu8()
167 CU_ASSERT(pdu->data == (unsigned char *)pdu->hdr + 5); in t_parse_pdu8()
202 CU_ASSERT(pdu->hdr->version == 1); in t_parse_pdu11()
203 CU_ASSERT(pdu->hdr->type == COAP_MESSAGE_ACK); in t_parse_pdu11()
204 CU_ASSERT(pdu->hdr->token_length == 0); in t_parse_pdu11()
205 CU_ASSERT(pdu->hdr->code == 0); in t_parse_pdu11()
206 CU_ASSERT(memcmp(&pdu->hdr->id, teststr + 2, 2) == 0); in t_parse_pdu11()
219 CU_ASSERT(pdu->hdr->version == 1); in t_parse_pdu12()
220 CU_ASSERT(pdu->hdr->type == COAP_MESSAGE_RST); in t_parse_pdu12()
221 CU_ASSERT(pdu->hdr->token_length == 0); in t_parse_pdu12()
222 CU_ASSERT(pdu->hdr->code == 0); in t_parse_pdu12()
223 CU_ASSERT(memcmp(&pdu->hdr->id, teststr + 2, 2) == 0); in t_parse_pdu12()
260 pdu->hdr->type = COAP_MESSAGE_CON; in t_encode_pdu1()
261 pdu->hdr->code = COAP_REQUEST_GET; in t_encode_pdu1()
262 pdu->hdr->id = htons(0x1234); in t_encode_pdu1()
269 CU_ASSERT(memcmp(pdu->hdr, teststr, sizeof(teststr)) == 0); in t_encode_pdu1()
279 pdu->hdr->type = COAP_MESSAGE_CON; in t_encode_pdu2()
280 pdu->hdr->code = COAP_REQUEST_GET; in t_encode_pdu2()
281 pdu->hdr->id = htons(0x1234); in t_encode_pdu2()
313 pdu->hdr->type = COAP_MESSAGE_ACK; in t_encode_pdu4()
314 pdu->hdr->code = 0x99; in t_encode_pdu4()
315 pdu->hdr->id = htons(0x1234); in t_encode_pdu4()
350 CU_ASSERT(memcmp(pdu->hdr, teststr, sizeof(teststr)) == 0); in t_encode_pdu4()
364 pdu->hdr->type = COAP_MESSAGE_ACK; in t_encode_pdu5()
365 pdu->hdr->code = COAP_RESPONSE_CODE(404); in t_encode_pdu5()
366 pdu->hdr->id = htons(0x1234); in t_encode_pdu5()
391 CU_ASSERT(memcmp(pdu->hdr, teststr, sizeof(teststr)) == 0); in t_encode_pdu5()
402 pdu->hdr->type = COAP_MESSAGE_NON; in t_encode_pdu6()
403 pdu->hdr->code = COAP_REQUEST_POST; in t_encode_pdu6()
404 pdu->hdr->id = htons(0x1234); in t_encode_pdu6()
412 CU_ASSERT(memcmp(pdu->hdr, teststr, sizeof(teststr)) == 0); in t_encode_pdu6()
422 pdu->hdr->type = COAP_MESSAGE_CON; in t_encode_pdu7()
423 pdu->hdr->code = COAP_RESPONSE_CODE(203); in t_encode_pdu7()
424 pdu->hdr->id = htons(0x1234); in t_encode_pdu7()
435 CU_ASSERT(memcmp(pdu->hdr, teststr, sizeof(teststr)) == 0); in t_encode_pdu7()
445 pdu->hdr->type = COAP_MESSAGE_CON; in t_encode_pdu8()
446 pdu->hdr->code = COAP_RESPONSE_CODE(203); in t_encode_pdu8()
447 pdu->hdr->id = htons(0x1234); in t_encode_pdu8()
459 CU_ASSERT(pdu->data == (unsigned char *)pdu->hdr + 7); in t_encode_pdu8()
462 CU_ASSERT(memcmp(pdu->hdr, teststr, sizeof(teststr)) == 0); in t_encode_pdu8()
478 pdu->hdr->type = COAP_MESSAGE_ACK; in t_encode_pdu9()
479 pdu->hdr->code = COAP_RESPONSE_CODE(204); in t_encode_pdu9()
480 pdu->hdr->id = htons(0x1234); in t_encode_pdu9()
510 CU_ASSERT(pdu->data == (unsigned char *)pdu->hdr + 35); in t_encode_pdu9()
513 CU_ASSERT(memcmp(pdu->hdr, teststr, sizeof(teststr)) == 0); in t_encode_pdu9()
560 pdu->hdr->type = COAP_MESSAGE_ACK; in t_encode_pdu10()
561 pdu->hdr->code = COAP_RESPONSE_CODE(204); in t_encode_pdu10()
562 pdu->hdr->id = htons(0x1234); in t_encode_pdu10()
597 CU_ASSERT(pdu->data == (unsigned char *)pdu->hdr + 282); in t_encode_pdu10()
600 CU_ASSERT(memcmp(pdu->hdr, teststr, sizeof(teststr)) == 0); in t_encode_pdu10()