Home
last modified time | relevance | path

Searched refs:block (Results 1 – 25 of 35) sorted by relevance

12

/net-tools-3.5.0/libcoap/src/
Dblock.c45 coap_get_block(coap_pdu_t *pdu, unsigned short type, coap_block_t *block) { in coap_get_block() argument
49 assert(block); in coap_get_block()
50 memset(block, 0, sizeof(coap_block_t)); in coap_get_block()
53 block->szx = COAP_OPT_BLOCK_SZX(option); in coap_get_block()
55 block->m = 1; in coap_get_block()
56 block->num = coap_opt_block_num(option); in coap_get_block()
64 coap_write_block_opt(coap_block_t *block, unsigned short type, in coap_write_block_opt() argument
71 start = block->num << (block->szx + 4); in coap_write_block_opt()
78 want = 1 << (block->szx + 4); in coap_write_block_opt()
82 block->m = want < data_length - start; in coap_write_block_opt()
[all …]
Dnet.c1154 coap_block_t block; in coap_wellknown_response() local
1186 if (coap_get_block(request, COAP_OPTION_BLOCK2, &block)) { in coap_wellknown_response()
1188 offset = block.num << (block.szx + 4); in coap_wellknown_response()
1189 if (block.szx > 6) { /* invalid, MUST lead to 4.00 Bad Request */ in coap_wellknown_response()
1192 } else if (block.szx > COAP_MAX_BLOCK_SZX) { in coap_wellknown_response()
1193 block.szx = COAP_MAX_BLOCK_SZX; in coap_wellknown_response()
1194 block.num = offset >> (block.szx + 4); in coap_wellknown_response()
1222 block.num = 0; in coap_wellknown_response()
1223 block.m = 0; /* the M bit is set by coap_write_block_opt() */ in coap_wellknown_response()
1224 block.szx = COAP_MAX_BLOCK_SZX; in coap_wellknown_response()
[all …]
/net-tools-3.5.0/libcoap/tests/
Dtest_wellknown.c163 coap_block_t block; in t_wellknown4() local
169 CU_ASSERT(coap_get_block(response, COAP_OPTION_BLOCK2, &block) != 0); in t_wellknown4()
171 CU_ASSERT(block.num == 0); in t_wellknown4()
172 CU_ASSERT(block.m == 1); in t_wellknown4()
173 CU_ASSERT(1 << (block.szx + 4) in t_wellknown4()
186 coap_block_t block; in t_wellknown5() local
201 CU_ASSERT(coap_get_block(response, COAP_OPTION_BLOCK2, &block) != 0); in t_wellknown5()
203 CU_ASSERT(block.num == inblock.num); in t_wellknown5()
204 CU_ASSERT(block.m == 1); in t_wellknown5()
205 CU_ASSERT(1 << (block.szx + 4) in t_wellknown5()
[all …]
/net-tools-3.5.0/libcoap/examples/
Dclient.c56 coap_block_t block = { .num = 0, .m = 0, .szx = 6 }; variable
171 coap_add_block(pdu, length, data, block.num, block.szx); in coap_new_request()
429 block.szx = COAP_OPT_BLOCK_SZX(block_opt); in message_handler()
430 block.num = coap_opt_block_num(block_opt); in message_handler()
433 block.szx, block.num); in message_handler()
435 if (payload.length <= (block.num+1) * (1 << (block.szx + 4))) { in message_handler()
466 block.num++; in message_handler()
467 block.m = ((block.num+1) * (1 << (block.szx + 4)) < payload.length); in message_handler()
469 debug("send block %d\n", block.num); in message_handler()
473 (block.num << 4) | (block.m << 3) | block.szx), buf); in message_handler()
[all …]
Detsi_iot_01.c153 coap_block_t block; in hnd_get_resource() local
177 if (coap_get_block(request, COAP_OPTION_BLOCK2, &block)) { in hnd_get_resource()
178 res = coap_write_block_opt(&block, COAP_OPTION_BLOCK2, response, in hnd_get_resource()
196 block.num, block.szx); in hnd_get_resource()
201 block.szx = 6; in hnd_get_resource()
202 coap_write_block_opt(&block, COAP_OPTION_BLOCK2, response, in hnd_get_resource()
206 block.num, block.szx); in hnd_get_resource()
Dcoap-client.txt.in38 The block size to be used in GET/PUT/POST requests (value must be a
41 chain will start at block 'num'. When the server includes a Block2
43 retrieve the subsequent block from the server until there are no more
/net-tools-3.5.0/mbedtls-2.4.0/tests/suites/
Dtest_suite_cmac.data35 CMAC Single Blocks #1 - Empty block, no updates
38 CMAC Single Blocks #2 - Single 16 byte block
41 CMAC Single Blocks #3 - Single 64 byte block
59 CMAC Multiple Operations, same key #2 - Empty, 64 byte block
/net-tools-3.5.0/libcoap/include/coap/
Dblock.h91 int coap_get_block(coap_pdu_t *pdu, unsigned short type, coap_block_t *block);
113 int coap_write_block_opt(coap_block_t *block,
Dcoap.h.in38 #include "block.h"
/net-tools-3.5.0/
Dcoap-client.c147 static coap_block_t block = { variable
1198 block.num, block.szx); in coap_new_request()
1393 block.szx = COAP_OPT_BLOCK_SZX(block_opt); in coap_message_handler()
1394 block.num = coap_opt_block_num(block_opt); in coap_message_handler()
1398 block.szx, block.num); in coap_message_handler()
1400 if (payload.length <= (block.num+1) * in coap_message_handler()
1401 (1 << (block.szx + 4))) { in coap_message_handler()
1414 block.num++; in coap_message_handler()
1415 block.m = ((block.num+1) * in coap_message_handler()
1416 (1 << (block.szx + 4)) < in coap_message_handler()
[all …]
/net-tools-3.5.0/systemd/
DREADME.rst17 .. code-block:: console
27 .. code-block:: console
/net-tools-3.5.0/tinydtls-0.8.2/sha2/testvectors/testvectors/
Dvector008.dat1 …shing as it may appear, is exactly 128 bytes in length, as are both SHA-384 and SHA-512 block sizes
Dvector009.dat1 By hashing data that is one byte less than a multiple of a hash block length (like this 127-byte st…
Dvector008.info5 length as the SHA-384 and SHA-512 block lengths.
Dvector010.info5 size of the SHA-256 block length.
Dvector012.info5 size of the SHA-384 and SHA-512 block lengths.
Dvector006.info5 length as the SHA-256 block length.
Dvector007.info5 than the SHA-256 block length.
Dvector009.info5 in length than the SHA-384 and SHA-512 block lengths.
Dvector011.info5 than 7 times the size of the SHA-256 block length.
Dvector013.info5 of 17 times size of the SHA-384 and SHA-512 block lengths.
/net-tools-3.5.0/libcoap/
DMakefile.libcoap1 …ug.c encode.c uri.c subscribe.c resource.c hashkey.c str.c option.c async.c block.c mem.c coap_io.c
DMakefile.am53 src/block.c \
77 include/coap/block.h \
DChangeLog71 * block.h (coap_opt_block_num): Fixed handling of zero-length
189 block transfer.
206 * block.c: support for block transfer.
/net-tools-3.5.0/libcoap/examples/contiki/
DMakefile.common11 COAPOBJS = net.o debug.o option.o resource.o hashkey.o pdu.o encode.o subscribe.o coap_io.o block.o…

12