Home
last modified time | relevance | path

Searched refs:token_length (Results 1 – 14 of 14) sorted by relevance

/net-tools-3.7.0/libcoap/src/
Dasync.c41 request->hdr->token_length); in coap_register_async()
47 memset(s, 0, sizeof(coap_async_state_t) + request->hdr->token_length); in coap_register_async()
58 if (request->hdr->token_length) { in coap_register_async()
59 s->tokenlen = request->hdr->token_length; in coap_register_async()
60 memcpy(s->token, request->hdr->token, request->hdr->token_length); in coap_register_async()
Dpdu.c159 pdu->hdr->token_length = len; in coap_add_token()
363 pdu->hdr->token_length = data[0] & 0x0f; in coap_pdu_parse()
370 if (length != sizeof(coap_hdr_t) || pdu->hdr->token_length) { in coap_pdu_parse()
376 if (length < sizeof(coap_hdr_t) + pdu->hdr->token_length in coap_pdu_parse()
377 || pdu->hdr->token_length > 8) { in coap_pdu_parse()
396 length -= (pdu->hdr->token_length + sizeof(coap_hdr_t)); in coap_pdu_parse()
397 opt = (unsigned char *)(pdu->hdr + 1) + pdu->hdr->token_length; in coap_pdu_parse()
Dresource.c115 size_t token_length; in match() local
120 token_length = next_token - token; in match()
121 remaining_length -= (token_length + 1); in match()
124 token_length = remaining_length; in match()
128 if ((match_prefix || pattern->length == token_length) && in match()
532 && (!token || (token->length == s->token_length
568 s->token_length = token->length;
569 memcpy(s->token, token->s, min(s->token_length, 8));
638 if (!coap_add_token(response, obs->token_length, obs->token)) {
646 token.length = obs->token_length;
[all …]
Doption.c28 (pdu->hdr->token + pdu->hdr->token_length in options_start()
31 coap_opt_t *opt = pdu->hdr->token + pdu->hdr->token_length; in options_start()
129 + pdu->hdr->token_length; in coap_option_iterator_init()
135 assert((sizeof(coap_hdr_t) + pdu->hdr->token_length) <= pdu->length); in coap_option_iterator_init()
137 oi->length = pdu->length - (sizeof(coap_hdr_t) + pdu->hdr->token_length); in coap_option_iterator_init()
Dnet.c808 token.length = node->pdu->hdr->token_length; in coap_retransmit()
985 const unsigned char *token, size_t token_length) { in coap_cancel_all_messages() argument
992 token_match(token, token_length, in coap_cancel_all_messages()
994 context->sendqueue->pdu->hdr->token_length)) { in coap_cancel_all_messages()
1010 token_match(token, token_length, in coap_cancel_all_messages()
1011 q->pdu->hdr->token, q->pdu->hdr->token_length)) { in coap_cancel_all_messages()
1036 size_t size = sizeof(coap_hdr_t) + request->hdr->token_length; in coap_new_error_response()
1100 if (!coap_add_token(response, request->hdr->token_length, in coap_new_error_response()
1168 if (!coap_add_token(resp, request->hdr->token_length, request->hdr->token)) { in coap_wellknown_response()
1181 resp->length = sizeof(coap_hdr_t) + resp->hdr->token_length; in coap_wellknown_response()
[all …]
Ddebug.c389 for (i = 0; i < pdu->hdr->token_length; i++) { in coap_show_pdu()
/net-tools-3.7.0/libcoap/tests/
Dtest_error_response.c49 CU_ASSERT(response->hdr->token_length == 0); in t_error_response1()
79 CU_ASSERT(response->hdr->token_length == 5); in t_error_response2()
112 CU_ASSERT(response->hdr->token_length == 5); in t_error_response3()
151 CU_ASSERT(response->hdr->token_length == 5); in t_error_response4()
192 CU_ASSERT(response->hdr->token_length == 5); in t_error_response5()
233 CU_ASSERT(response->hdr->token_length == 5); in t_error_response6()
275 CU_ASSERT(response->hdr->token_length == 5); in t_error_response7()
316 CU_ASSERT(response->hdr->token_length == 5); in t_error_response8()
Dtest_pdu.c36 CU_ASSERT(pdu->hdr->token_length == 0); in t_parse_pdu1()
53 CU_ASSERT(pdu->hdr->token_length == 5); in t_parse_pdu2()
99 CU_ASSERT(pdu->hdr->token_length == 5); in t_parse_pdu5()
135 CU_ASSERT(pdu->hdr->token_length == 5); in t_parse_pdu7()
161 CU_ASSERT(pdu->hdr->token_length == 0); in t_parse_pdu8()
204 CU_ASSERT(pdu->hdr->token_length == 0); in t_parse_pdu11()
221 CU_ASSERT(pdu->hdr->token_length == 0); in t_parse_pdu12()
/net-tools-3.7.0/libcoap/include/coap/
Dsubscribe.h64 size_t token_length; /**< actual length of token */ member
Dpdu.h178 unsigned int token_length:4; /* length of Token */ member
186 unsigned int token_length:4; /* length of Token */ member
Dnet.h455 size_t token_length);
/net-tools-3.7.0/libcoap/examples/
Dcoap-rd.c190 if (request->hdr->token_length) in hnd_put_resource()
191 coap_add_token(response, request->hdr->token_length, request->hdr->token); in hnd_put_resource()
Dclient.c147 pdu->hdr->token_length = the_token.length; in coap_new_request()
310 return received->hdr->token_length == the_token.length && in check_token()
/net-tools-3.7.0/
Dcoap-client.c1094 return received->hdr->token_length == the_token.length && in check_token()
1170 pdu->hdr->token_length = the_token.length; in coap_new_request()