Home
last modified time | relevance | path

Searched refs:length (Results 1 – 25 of 108) sorted by relevance

12345

/net-tools-3.5.0/libcoap/src/
Duri.c203 decode_segment(const unsigned char *seg, size_t length, unsigned char *buf) { in decode_segment() argument
205 while (length--) { in decode_segment()
210 seg += 2; length -= 2; in decode_segment()
225 check_segment(const unsigned char *s, size_t length) { in check_segment() argument
229 while (length) { in check_segment()
231 if (length < 2 || !(isxdigit(s[1]) && isxdigit(s[2]))) in check_segment()
235 length -= 2; in check_segment()
238 ++s; ++n; --length; in check_segment()
264 make_decoded_option(const unsigned char *s, size_t length, in make_decoded_option() argument
274 res = check_segment(s, length); in make_decoded_option()
[all …]
Doption.c29 < (unsigned char *)pdu->hdr + pdu->length)) { in options_start()
39 coap_opt_parse(const coap_opt_t *opt, size_t length, coap_option_t *result) { in coap_opt_parse() argument
53 if (length < 1) in coap_opt_parse()
57 result->length = *opt & 0x0f; in coap_opt_parse()
69 ADVANCE_OPT(opt,length,1); in coap_opt_parse()
77 ADVANCE_OPT(opt,length,1); in coap_opt_parse()
85 switch(result->length) { in coap_opt_parse()
93 ADVANCE_OPT(opt,length,1); in coap_opt_parse()
94 result->length = ((*opt & 0xff) << 8) + 269; in coap_opt_parse()
97 ADVANCE_OPT(opt,length,1); in coap_opt_parse()
[all …]
Dpdu.c45 pdu->length = sizeof(coap_hdr_t); in coap_pdu_clear()
66 result->length = pbuf->tot_len; in coap_pdu_from_pbuf()
163 pdu->length = HEADERLENGTH; in coap_add_token()
183 opt = (unsigned char *)pdu->hdr + pdu->length; in coap_add_option()
186 optsize = coap_opt_encode(opt, pdu->max_size - pdu->length, in coap_add_option()
195 pdu->length += optsize; in coap_add_option()
215 opt = (unsigned char *)pdu->hdr + pdu->length; in coap_add_option_later()
218 optsize = coap_opt_encode(opt, pdu->max_size - pdu->length, in coap_add_option_later()
227 pdu->length += optsize; in coap_add_option_later()
241 if (pdu->length + len + 1 > pdu->max_size) { in coap_add_data()
[all …]
Dresource.c108 if (text->length < pattern->length) in match()
113 size_t remaining_length = text->length; in match()
128 if ((match_prefix || pattern->length == token_length) && in match()
129 memcmp(token, pattern->s, pattern->length) == 0) in match()
135 return (match_prefix || pattern->length == text->length) && in match()
136 memcmp(text->s, pattern->s, pattern->length) == 0; in match()
193 while (resource_param.length < COAP_OPT_LENGTH(query_filter)
194 && resource_param.s[resource_param.length] != '=')
195 resource_param.length++;
197 if (resource_param.length < COAP_OPT_LENGTH(query_filter)) {
[all …]
/net-tools-3.5.0/libcoap/tests/
Dtest_uri.c25 CU_ASSERT(uri.host.length == 3); in t_parse_uri1()
30 CU_ASSERT(uri.path.length == 16); in t_parse_uri1()
33 CU_ASSERT(uri.query.length == 0); in t_parse_uri1()
48 CU_ASSERT(uri.host.length == 3); in t_parse_uri2()
53 CU_ASSERT(uri.path.length == 16); in t_parse_uri2()
56 CU_ASSERT(uri.query.length == 0); in t_parse_uri2()
71 CU_ASSERT(uri.host.length == 9); in t_parse_uri3()
76 CU_ASSERT(uri.path.length == 0); in t_parse_uri3()
78 CU_ASSERT(uri.query.length == 13); in t_parse_uri3()
103 CU_ASSERT(uri.host.length == 3); in t_parse_uri5()
[all …]
Dtest_pdu.c33 CU_ASSERT(pdu->length == sizeof(teststr)); in t_parse_pdu1()
50 CU_ASSERT(pdu->length == sizeof(teststr)); in t_parse_pdu2()
96 CU_ASSERT(pdu->length == sizeof(teststr)); in t_parse_pdu5()
132 CU_ASSERT(pdu->length == sizeof(teststr)); in t_parse_pdu7()
158 CU_ASSERT(pdu->length == sizeof(teststr)); in t_parse_pdu8()
201 CU_ASSERT(pdu->length == sizeof(teststr)); in t_parse_pdu11()
218 CU_ASSERT(pdu->length == sizeof(teststr)); in t_parse_pdu12()
267 CU_ASSERT(pdu->length = sizeof(teststr)); in t_encode_pdu1()
317 CU_ASSERT(pdu->length == 4); in t_encode_pdu4()
324 CU_ASSERT(pdu->length == 24); in t_encode_pdu4()
[all …]
Dtest_options.c31 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option1()
34 CU_ASSERT(option.length == 0); in t_parse_option1()
46 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option2()
49 CU_ASSERT(option.length == 1); in t_parse_option2()
62 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option3()
65 CU_ASSERT(option.length == 12); in t_parse_option3()
78 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option4()
90 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option5()
102 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option6()
114 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option7()
[all …]
/net-tools-3.5.0/libcoap/examples/
Dclient.c83 if (!output_file.s || (output_file.length && output_file.s[0] == '-')) in append_to_output()
108 if (!output_file.s || (output_file.length && output_file.s[0] == '-')) in close_output()
136 size_t length) { in coap_new_request() argument
147 pdu->hdr->token_length = the_token.length; in coap_new_request()
148 if ( !coap_add_token(pdu, the_token.length, the_token.s)) { in coap_new_request()
167 if (length) { in coap_new_request()
169 coap_add_data(pdu, length, data); in coap_new_request()
171 coap_add_block(pdu, length, data, block.num, block.szx); in coap_new_request()
196 if (!coap_add_token(pdu, the_token.length, the_token.s)) { in clear_obs()
269 if (server->length) in resolve_address()
[all …]
Dcoap-rd.c120 coap_add_data(response, rd->data.length, rd->data.s); in hnd_get_resource()
152 if (coap_get_data(request, &tmp.length, &data)) { in hnd_put_resource()
154 tmp.s = (unsigned char *)coap_malloc(tmp.length); in hnd_put_resource()
163 rd->data.length = tmp.length; in hnd_put_resource()
164 memcpy(rd->data.s, data, rd->data.length); in hnd_put_resource()
277 ++data; result->length++; in parse_param()
368 if (coap_get_data(pdu, &rd->data.length, &data)) { in make_rd()
369 rd->data.s = (unsigned char *)coap_malloc(rd->data.length); in make_rd()
375 memcpy(rd->data.s, data, rd->data.length); in make_rd()
427 if (h.length) { /* client has specified a node name */ in hnd_post_rd()
[all …]
/net-tools-3.5.0/tinydtls-0.8.2/ecc/
Decc.c43 static uint32_t add( const uint32_t *x, const uint32_t *y, uint32_t *result, uint8_t length){ in add() argument
46 for(v = 0;v<length;v++){ in add()
57 static uint32_t sub( const uint32_t *x, const uint32_t *y, uint32_t *result, uint8_t length){ in sub() argument
60 for(v = 0;v < length; v++){ in sub()
108 static void setZero(uint32_t *A, const int length){ in setZero() argument
109 memset(A, 0x0, length * sizeof(uint32_t)); in setZero()
115 static void copy(const uint32_t *from, uint32_t *to, uint8_t length){ in copy() argument
116 memcpy(to, from, length * sizeof(uint32_t)); in copy()
119 static int isSame(const uint32_t *A, const uint32_t *B, uint8_t length){ in isSame() argument
120 return !memcmp(A, B, length * sizeof(uint32_t)); in isSame()
[all …]
Decc.h67 uint32_t ecc_add( const uint32_t *x, const uint32_t *y, uint32_t *result, uint8_t length);
68 uint32_t ecc_sub( const uint32_t *x, const uint32_t *y, uint32_t *result, uint8_t length);
73 int ecc_fieldMult(const uint32_t *x, const uint32_t *y, uint32_t *result, uint8_t length);
75 void ecc_fieldModO(const uint32_t *A, uint32_t *result, uint8_t length);
79 void ecc_copy(const uint32_t *from, uint32_t *to, uint8_t length);
80 int ecc_isSame(const uint32_t *A, const uint32_t *B, uint8_t length);
81 void ecc_setZero(uint32_t *A, const int length);
84 int ecc_isGreater(const uint32_t *A, const uint32_t *B, uint8_t length);
/net-tools-3.5.0/tinydtls-0.8.2/
Ddebug.h94 void hexdump(const unsigned char *packet, int length);
99 void dtls_dsrv_hexdump_log(log_t level, const char *name, const unsigned char *buf, size_t length, …
116 static inline void hexdump(const unsigned char *packet, int length) in hexdump() argument
123 dtls_dsrv_hexdump_log(log_t level, const char *name, const unsigned char *buf, size_t length, int e… in dtls_dsrv_hexdump_log() argument
140 #define dtls_debug_hexdump(name, buf, length) dtls_dsrv_hexdump_log(DTLS_LOG_DEBUG, name, buf, leng… argument
141 #define dtls_debug_dump(name, buf, length) dtls_dsrv_hexdump_log(DTLS_LOG_DEBUG, name, buf, length,… argument
Ddebug.c252 void hexdump(const unsigned char *packet, int length) { in hexdump() argument
255 while (length--) { in hexdump()
290 dtls_dsrv_hexdump_log(log_t level, const char *name, const unsigned char *buf, size_t length, int e… in dtls_dsrv_hexdump_log() argument
307 fprintf(log_fd, "%s: (%zu bytes):\n", name, length); in dtls_dsrv_hexdump_log()
309 while (length--) { in dtls_dsrv_hexdump_log()
324 fprintf(log_fd, "%s: (%zu bytes): ", name, length); in dtls_dsrv_hexdump_log()
325 while (length--) in dtls_dsrv_hexdump_log()
334 dtls_dsrv_hexdump_log(log_t level, const char *name, const unsigned char *buf, size_t length, int e… in dtls_dsrv_hexdump_log() argument
348 PRINTF("%s: (%zu bytes):\n", name, length); in dtls_dsrv_hexdump_log()
350 while (length--) { in dtls_dsrv_hexdump_log()
[all …]
/net-tools-3.5.0/mbedtls-2.4.0/tests/suites/
Dtest_suite_ecjpake.data19 ECJPAKE round one: KKP1: length of first point too small
22 ECJPAKE round one: KKP1: length of first point too big
37 ECJPAKE round one: KKP1: length of second point too small
40 ECJPAKE round one: KKP1: length of second point too big
52 ECJPAKE round one: KKP1: zero-length r
67 ECJPAKE round one: KKP2: length of first point too small
70 ECJPAKE round one: KKP2: length of first point too big
85 ECJPAKE round one: KKP2: length of second point too small
88 ECJPAKE round one: KKP2: length of second point too big
100 ECJPAKE round one: KKP2: zero-length r
[all …]
Dtest_suite_entropy.data13 Entropy output length #1
16 Entropy output length #2
19 Entropy output length #3
22 Entropy output length #4
25 Entropy output length #5
Dtest_suite_cipher.function136 size_t length = length_val, outlen, total_len, i, block_size;
206 /* encode length number of bytes from inbuf */
207 TEST_ASSERT( 0 == mbedtls_cipher_update( &ctx_enc, inbuf, length, encbuf, &outlen ) );
210 TEST_ASSERT( total_len == length ||
212 total_len < length &&
213 total_len + block_size > length ) );
222 TEST_ASSERT( total_len == length ||
224 total_len > length &&
225 total_len <= length + block_size ) );
231 TEST_ASSERT( total_len == length ||
[all …]
/net-tools-3.5.0/mbedtls-2.4.0/library/
Dcipher_wrap.c123 static int aes_crypt_cbc_wrap( void *ctx, mbedtls_operation_t operation, size_t length, in aes_crypt_cbc_wrap() argument
126 return mbedtls_aes_crypt_cbc( (mbedtls_aes_context *) ctx, operation, length, iv, input, in aes_crypt_cbc_wrap()
133 size_t length, size_t *iv_off, unsigned char *iv, in aes_crypt_cfb128_wrap() argument
136 return mbedtls_aes_crypt_cfb128( (mbedtls_aes_context *) ctx, operation, length, iv_off, iv, in aes_crypt_cfb128_wrap()
142 static int aes_crypt_ctr_wrap( void *ctx, size_t length, size_t *nc_off, in aes_crypt_ctr_wrap() argument
146 return mbedtls_aes_crypt_ctr( (mbedtls_aes_context *) ctx, length, nc_off, nonce_counter, in aes_crypt_ctr_wrap()
479 size_t length, unsigned char *iv, in camellia_crypt_cbc_wrap() argument
482 return mbedtls_camellia_crypt_cbc( (mbedtls_camellia_context *) ctx, operation, length, iv, in camellia_crypt_cbc_wrap()
489 size_t length, size_t *iv_off, unsigned char *iv, in camellia_crypt_cfb128_wrap() argument
492 return mbedtls_camellia_crypt_cfb128( (mbedtls_camellia_context *) ctx, operation, length, in camellia_crypt_cfb128_wrap()
[all …]
Dblowfish.c263 size_t length, in mbedtls_blowfish_crypt_cbc() argument
271 if( length % MBEDTLS_BLOWFISH_BLOCKSIZE ) in mbedtls_blowfish_crypt_cbc()
276 while( length > 0 ) in mbedtls_blowfish_crypt_cbc()
288 length -= MBEDTLS_BLOWFISH_BLOCKSIZE; in mbedtls_blowfish_crypt_cbc()
293 while( length > 0 ) in mbedtls_blowfish_crypt_cbc()
303 length -= MBEDTLS_BLOWFISH_BLOCKSIZE; in mbedtls_blowfish_crypt_cbc()
317 size_t length, in mbedtls_blowfish_crypt_cfb64() argument
328 while( length-- ) in mbedtls_blowfish_crypt_cfb64()
342 while( length-- ) in mbedtls_blowfish_crypt_cfb64()
364 size_t length, in mbedtls_blowfish_crypt_ctr() argument
[all …]
/net-tools-3.5.0/mbedtls-2.4.0/include/mbedtls/
Dcipher_internal.h54 int (*cbc_func)( void *ctx, mbedtls_operation_t mode, size_t length,
61 int (*cfb_func)( void *ctx, mbedtls_operation_t mode, size_t length, size_t *iv_off,
68 int (*ctr_func)( void *ctx, size_t length, size_t *nc_off,
75 int (*stream_func)( void *ctx, size_t length,
Daes.h144 size_t length,
178 size_t length,
210 size_t length,
240 size_t length,
/net-tools-3.5.0/tinydtls-0.8.2/sha2/testvectors/testvectors/
Dvector017.info6 that affected SHA-256/384/512 hashes where the data set length
7 was of a certain length. In the case of SHA512 or SHA384, if
8 the data length after subtracting 111 was an even multiple of
10 subtracting 55, the remaining length was an even multiple of 64,
17 (Total length of test vector data: 12271)
/net-tools-3.5.0/libcoap/include/coap/
Doption.h31 size_t length; member
48 size_t length,
254 size_t length; /**< remaining length of PDU */ member
334 size_t length);
355 size_t length);
Duri.h38 coap_uri_t *coap_new_uri(const unsigned char *uri, unsigned int length);
97 size_t length,
117 size_t length,
/net-tools-3.5.0/
Dhttp-server.py13 length = 0 variable in RequestHandler
18 self.send_header('Content-Length', str(self.length))
23 self.length = len(payload)
/net-tools-3.5.0/docker/
Dhttp-server.py13 length = 0 variable in RequestHandler
18 self.send_header('Content-Length', str(self.length))
23 self.length = len(payload)

12345