Lines Matching defs:pdu

19 static coap_pdu_t *pdu;          /* Holds the request PDU for most tests */
36 coap_pdu_clear(pdu, pdu->max_size);
37 pdu->type = COAP_MESSAGE_CON;
38 pdu->mid = 0x1234;
40 /* result = coap_add_token(pdu, 5, (unsigned char *)"token"); */
42 response = coap_new_error_response(pdu, COAP_RESPONSE_CODE(400), &opts);
65 coap_pdu_clear(pdu, pdu->max_size);
66 pdu->type = COAP_MESSAGE_NON;
67 pdu->mid = 0x1234;
68 coap_add_token(pdu, 5, (const uint8_t *)"token");
69 coap_add_option(pdu, COAP_OPTION_URI_HOST, 4, (const uint8_t *)"time");
72 response = coap_new_error_response(pdu, COAP_RESPONSE_CODE(404), &opts);
95 coap_pdu_clear(pdu, pdu->max_size);
96 pdu->type = COAP_MESSAGE_CON;
97 coap_add_token(pdu, 5, (const uint8_t *)"token");
98 /* coap_add_option(pdu, COAP_OPTION_URI_HOST, 4, (const uint8_t *)"time"); */
101 coap_add_option(pdu, 25, 0, NULL);
105 response = coap_new_error_response(pdu, code, &opts);
134 coap_pdu_clear(pdu, pdu->max_size);
135 pdu->type = COAP_MESSAGE_CON;
136 coap_add_token(pdu, 5, (const uint8_t *)"token");
137 /* coap_add_option(pdu, COAP_OPTION_URI_HOST, 4, (const uint8_t *)"time"); */
140 coap_add_option(pdu, 25, sizeof(optval), optval);
144 response = coap_new_error_response(pdu, code, &opts);
175 coap_pdu_clear(pdu, pdu->max_size);
176 pdu->type = COAP_MESSAGE_CON;
177 coap_add_token(pdu, 5, (const uint8_t *)"token");
178 /* coap_add_option(pdu, COAP_OPTION_URI_HOST, 4, (const uint8_t *)"time"); */
181 coap_add_option(pdu, 25, sizeof(optval), optval);
185 response = coap_new_error_response(pdu, code, &opts);
216 coap_pdu_clear(pdu, pdu->max_size);
217 pdu->type = COAP_MESSAGE_CON;
218 coap_add_token(pdu, 5, (const uint8_t *)"token");
219 /* coap_add_option(pdu, COAP_OPTION_URI_HOST, 4, (const uint8_t *)"time"); */
222 coap_add_option(pdu, 23, sizeof(optval), optval);
226 response = coap_new_error_response(pdu, code, &opts);
257 coap_pdu_clear(pdu, pdu->max_size);
258 pdu->type = COAP_MESSAGE_CON;
259 coap_add_token(pdu, 5, (const uint8_t *)"token");
261 coap_add_option(pdu, 11, 4, (const uint8_t *)"time");
264 coap_add_option(pdu, 23, sizeof(optval), optval);
268 response = coap_new_error_response(pdu, code, &opts);
293 coap_pdu_clear(pdu, pdu->max_size);
294 pdu->type = COAP_MESSAGE_CON;
295 coap_add_token(pdu, 5, (const uint8_t *)"token");
297 coap_add_option(pdu, 1000, 0, NULL);
300 coap_add_option(pdu, 1001, 0, NULL);
301 coap_add_option(pdu, 1014, 0, NULL);
304 coap_add_option(pdu, 2000, 0, NULL);
309 response = coap_new_error_response(pdu, code, &opts);
324 pdu = coap_pdu_init(0, 0, 0, COAP_DEFAULT_MTU);
326 return pdu == NULL;
331 coap_delete_pdu(pdu);