Lines Matching refs:received
309 check_token(coap_pdu_t *received) { in check_token() argument
310 return received->hdr->token_length == the_token.length && in check_token()
311 memcmp(received->hdr->token, the_token.s, the_token.length) == 0; in check_token()
319 coap_pdu_t *received, in message_handler() argument
334 (received->hdr->code >> 5), received->hdr->code & 0x1F); in message_handler()
335 coap_show_pdu(received); in message_handler()
340 if (!check_token(received)) { in message_handler()
342 if (!sent && (received->hdr->type == COAP_MESSAGE_CON || in message_handler()
343 received->hdr->type == COAP_MESSAGE_NON)) in message_handler()
344 coap_send_rst(ctx, local_interface, remote, received); in message_handler()
348 if (received->hdr->type == COAP_MESSAGE_RST) { in message_handler()
354 if (COAP_RESPONSE_CLASS(received->hdr->code) == 2) { in message_handler()
357 if (sent && coap_check_option(received, COAP_OPTION_SUBSCRIPTION, &opt_iter)) { in message_handler()
364 block_opt = coap_check_option(received, COAP_OPTION_BLOCK2, &opt_iter); in message_handler()
369 if (coap_get_data(received, &len, &databuf)) in message_handler()
426 block_opt = coap_check_option(received, COAP_OPTION_BLOCK1, &opt_iter); in message_handler()
499 if (coap_get_data(received, &len, &databuf)) in message_handler()
506 if (COAP_RESPONSE_CLASS(received->hdr->code) >= 4) { in message_handler()
508 (received->hdr->code >> 5), received->hdr->code & 0x1F); in message_handler()
509 if (coap_get_data(received, &len, &databuf)) { in message_handler()
526 ready = coap_check_option(received, COAP_OPTION_SUBSCRIPTION, &opt_iter) == NULL; in message_handler()