Home
last modified time | relevance | path

Searched refs:result (Results 1 – 25 of 73) sorted by relevance

123

/net-tools-3.5.0/libcoap/tests/
Dtest_pdu.c28 int result; in t_parse_pdu1() local
30 result = coap_pdu_parse((unsigned char *)teststr, sizeof(teststr), pdu); in t_parse_pdu1()
31 CU_ASSERT(result > 0); in t_parse_pdu1()
45 int result; in t_parse_pdu2() local
47 result = coap_pdu_parse((unsigned char *)teststr, sizeof(teststr), pdu); in t_parse_pdu2()
48 CU_ASSERT(result > 0); in t_parse_pdu2()
63 int result; in t_parse_pdu3() local
65 result = coap_pdu_parse((unsigned char *)teststr, sizeof(teststr), pdu); in t_parse_pdu3()
66 CU_ASSERT(result == 0); in t_parse_pdu3()
74 int result; in t_parse_pdu4() local
[all …]
Dtest_options.c27 size_t result; in t_parse_option1() local
31 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option1()
32 CU_ASSERT(result == 1); in t_parse_option1()
43 size_t result; in t_parse_option2() local
46 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option2()
47 CU_ASSERT(result == 2); in t_parse_option2()
59 size_t result; in t_parse_option3() local
62 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option3()
63 CU_ASSERT(result == 13); in t_parse_option3()
75 size_t result; in t_parse_option4() local
[all …]
Dtest_uri.c20 int result; in t_parse_uri1() local
23 result = coap_split_uri((unsigned char *)teststr, strlen(teststr), &uri); in t_parse_uri1()
24 if (result == 0) { in t_parse_uri1()
43 int result; in t_parse_uri2() local
46 result = coap_split_uri((unsigned char *)teststr, strlen(teststr), &uri); in t_parse_uri2()
47 if (result == 0) { in t_parse_uri2()
66 int result; in t_parse_uri3() local
69 result = coap_split_uri((unsigned char *)teststr, strlen(teststr), &uri); in t_parse_uri3()
70 if (result == 0) { in t_parse_uri3()
88 int result; in t_parse_uri4() local
[all …]
Dtest_sendqueue.c42 int result = coap_insert_node(&sendqueue, node[1]); in t_sendqueue1() local
44 CU_ASSERT(result > 0); in t_sendqueue1()
52 int result; in t_sendqueue2() local
54 result = coap_insert_node(&sendqueue, node[2]); in t_sendqueue2()
56 CU_ASSERT(result > 0); in t_sendqueue2()
67 int result; in t_sendqueue3() local
68 result = coap_insert_node(&sendqueue, node[3]); in t_sendqueue3()
70 CU_ASSERT(result > 0); in t_sendqueue3()
85 int result; in t_sendqueue4() local
87 result = coap_insert_node(&sendqueue, node[4]); in t_sendqueue4()
[all …]
Dtest_wellknown.c28 coap_print_status_t result; in t_wellknown1() local
51 result = coap_print_link(r, buf, &buflen, &ofs); in t_wellknown1()
53 CU_ASSERT(result == sizeof(teststr) - offset); in t_wellknown1()
61 result = coap_print_link(r, buf, &buflen, &ofs); in t_wellknown1()
63 CU_ASSERT(result == 0); in t_wellknown1()
69 result = coap_print_link(r, buf, &buflen, &ofs); in t_wellknown1()
71 CU_ASSERT(result == 0); in t_wellknown1()
77 coap_print_status_t result; in t_wellknown2() local
98 result = coap_print_link(r, buf, &buflen, &ofs); in t_wellknown2()
100 CU_ASSERT(result == (COAP_PRINT_STATUS_TRUNC | sizeof(buf))); in t_wellknown2()
[all …]
Dtestdriver.c23 CU_ErrorCode result; in main() local
39 result = CU_basic_run_tests(); in main()
43 return result; in main()
/net-tools-3.5.0/libcoap/src/
Duri.c413 unsigned char *result; in coap_new_uri() local
415 result = coap_malloc(length + 1 + sizeof(coap_uri_t)); in coap_new_uri()
417 if (!result) in coap_new_uri()
420 memcpy(URI_DATA(result), uri, length); in coap_new_uri()
421 URI_DATA(result)[length] = '\0'; /* make it zero-terminated */ in coap_new_uri() local
423 if (coap_split_uri(URI_DATA(result), length, (coap_uri_t *)result) < 0) { in coap_new_uri()
424 coap_free(result); in coap_new_uri()
427 return (coap_uri_t *)result; in coap_new_uri()
432 coap_uri_t *result; in coap_clone_uri() local
437 result = (coap_uri_t *)coap_malloc( uri->query.length + uri->host.length + in coap_clone_uri()
[all …]
Dcoap_io_lwip.c68 coap_endpoint_t *result; in coap_new_endpoint() local
73 result = coap_malloc_type(COAP_ENDPOINT, sizeof(coap_endpoint_t)); in coap_new_endpoint()
74 if (!result) return NULL; in coap_new_endpoint()
76 result->pcb = udp_new(); in coap_new_endpoint()
77 if (result->pcb == NULL) goto error; in coap_new_endpoint()
79 udp_recv(result->pcb, coap_recv, (void*)result); in coap_new_endpoint()
80 err = udp_bind(result->pcb, &addr->addr, addr->port); in coap_new_endpoint()
82 udp_remove(result->pcb); in coap_new_endpoint()
86 return result; in coap_new_endpoint()
89 coap_free_type(COAP_ENDPOINT, result); in coap_new_endpoint()
Doption.c39 coap_opt_parse(const coap_opt_t *opt, size_t length, coap_option_t *result) { in coap_opt_parse() argument
43 assert(opt); assert(result); in coap_opt_parse()
56 result->delta = (*opt & 0xf0) >> 4; in coap_opt_parse()
57 result->length = *opt & 0x0f; in coap_opt_parse()
59 switch(result->delta) { in coap_opt_parse()
70 result->delta = ((*opt & 0xff) << 8) + 269; in coap_opt_parse()
71 if (result->delta < 269) { in coap_opt_parse()
78 result->delta += *opt & 0xff; in coap_opt_parse()
85 switch(result->length) { in coap_opt_parse()
94 result->length = ((*opt & 0xff) << 8) + 269; in coap_opt_parse()
[all …]
/net-tools-3.5.0/mbedtls-2.4.0/tests/suites/
Dtest_suite_base64.function12 int result )
22 …dtls_base64_encode( dst_str, dst_buf_size, &len, src_str, strlen( (char *) src_str ) ) == result );
23 if( result == 0 )
31 void mbedtls_base64_decode( char *src_string, char *dst_string, int result )
43 TEST_ASSERT( res == result );
44 if( result == 0 )
53 int result )
61 TEST_ASSERT( mbedtls_base64_encode( res, dst_buf_size, &len, src, src_len ) == result );
62 if( result == 0 )
76 int result )
[all …]
Dtest_suite_pkparse.function13 void pk_parse_keyfile_rsa( char *key_file, char *password, int result )
26 TEST_ASSERT( res == result );
42 void pk_parse_public_keyfile_rsa( char *key_file, int result )
51 TEST_ASSERT( res == result );
67 void pk_parse_public_keyfile_ec( char *key_file, int result )
76 TEST_ASSERT( res == result );
92 void pk_parse_keyfile_ec( char *key_file, char *password, int result )
101 TEST_ASSERT( res == result );
117 void pk_parse_key_rsa( char *key_data, char *result_str, int result )
132 TEST_ASSERT( mbedtls_pk_parse_key( &pk, buf, data_len, NULL, 0 ) == ( result ) );
[all …]
Dtest_suite_ccm.function18 void mbedtls_ccm_setkey( int cipher_id, int key_size, int result )
30 TEST_ASSERT( ret == result );
87 unsigned char result[50];
97 memset( result, 0x00, sizeof( result ) );
103 result_len = unhexify( result, result_hex );
112 TEST_ASSERT( memcmp( msg, result, result_len ) == 0 );
133 unsigned char result[50];
145 memset( result, 0x00, sizeof( result ) );
162 result_len = unhexify( result, result_hex );
173 TEST_ASSERT( memcmp( msg, result, result_len ) == 0 );
Dtest_suite_rsa.function22 char *input_E, char *result_hex_str, int result )
64 …tx, &rnd_pseudo_rand, &rnd_info, MBEDTLS_RSA_PRIVATE, digest, 0, hash_result, output ) == result );
65 if( result == 0 )
81 char *input_E, char *result_hex_str, int result )
106 …cs1_verify( &ctx, NULL, NULL, MBEDTLS_RSA_PUBLIC, digest, 0, hash_result, result_str ) == result );
241 char *result_hex_str, int result )
265 … &ctx, &rnd_pseudo_rand, &rnd_info, MBEDTLS_RSA_PUBLIC, msg_len, message_str, output ) == result );
266 if( result == 0 )
282 char *result_hex_str, int result )
303 …ncrypt( &ctx, &rnd_zero_rand, NULL, MBEDTLS_RSA_PUBLIC, msg_len, message_str, output ) == result );
[all …]
Dtest_suite_asn1write.function15 int buf_len, int result )
40 if( result >= 0 )
52 int buf_len, int result )
76 if( result >= 0 )
88 int result )
104 TEST_ASSERT( ret == result );
113 if( result >= 0 )
Dtest_suite_pkcs1_v15.function15 char *result_hex_str, int result )
41 …ypt( &ctx, &rnd_buffer_rand, &info, MBEDTLS_RSA_PUBLIC, msg_len, message_str, output ) == result );
42 if( result == 0 )
59 char *message_hex_string, int result )
97 …_pseudo_rand, &rnd_info, MBEDTLS_RSA_PRIVATE, &output_len, message_str, output, 1000 ) == result );
98 if( result == 0 )
116 char *result_hex_str, int result )
161 …( &ctx, &rnd_buffer_rand, &info, MBEDTLS_RSA_PRIVATE, digest, 0, hash_result, output ) == result );
162 if( result == 0 )
179 char *result_hex_str, int result )
[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
50 result[v] = d; in add()
57 static uint32_t sub( const uint32_t *x, const uint32_t *y, uint32_t *result, uint8_t length){ in sub() argument
62 result[v] = d & 0xFFFFFFFF; in sub()
137 static int fieldAdd(const uint32_t *x, const uint32_t *y, const uint32_t *reducer, uint32_t *result in fieldAdd() argument
138 if(add(x, y, result, arrayLength)){ //add prime if carry is still set! in fieldAdd()
141 add(result, reducer, tempas, arrayLength); in fieldAdd()
142 copy(tempas, result, arrayLength); in fieldAdd()
147 static int fieldSub(const uint32_t *x, const uint32_t *y, const uint32_t *modulus, uint32_t *result in fieldSub() argument
148 if(sub(x, y, result, arrayLength)){ //add modulus if carry is set in fieldSub()
[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);
71 int ecc_fieldAdd(const uint32_t *x, const uint32_t *y, const uint32_t *reducer, uint32_t *result);
72 int ecc_fieldSub(const uint32_t *x, const uint32_t *y, const uint32_t *modulus, uint32_t *result);
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);
/net-tools-3.5.0/mbedtls-2.4.0/tests/scripts/
Drun-test-suites.pl51 my $result = `$prefix$suite`;
53 $suite_cases_passed = () = $result =~ /.. PASS/g;
54 $suite_cases_failed = () = $result =~ /.. FAILED/g;
55 $suite_cases_skipped = () = $result =~ /.. ----/g;
57 if( $result =~ /PASSED/ ) {
64 my ($passed, $tests, $skipped) = $result =~ /([0-9]*) \/ ([0-9]*) tests.*?([0-9]*) skipped/;
/net-tools-3.5.0/tinydtls-0.8.2/tests/
Ddtls-client.c70 ssize_t result = 0; in read_from_file() local
80 result = -1; in read_from_file()
85 result += bytes_read; in read_from_file()
90 return result; in read_from_file()
109 unsigned char *result, size_t result_length) { in get_psk_info() argument
122 memcpy(result, psk_id, psk_id_length); in get_psk_info()
133 memcpy(result, psk_key, psk_key_length); in get_psk_info()
147 const dtls_ecdsa_key_t **result) { in get_ecdsa_key() argument
155 *result = &ecdsa_key; in get_ecdsa_key()
347 int fd, result; local
[all …]
Dprf-test.c19 size_t result; in main() local
21 result = dtls_prf(key, sizeof(key), in main()
27 printf("PRF yields %zu bytes of random data:\n", result); in main()
28 hexdump(buf, result); in main()
/net-tools-3.5.0/mbedtls-2.4.0/programs/pkey/
Dpk_decrypt.c67 unsigned char result[1024]; in main() local
73 memset(result, 0, sizeof( result ) ); in main()
135 if( ( ret = mbedtls_pk_decrypt( &pk, buf, i, result, &olen, sizeof(result), in main()
144 mbedtls_printf( "The decrypted result is: '%s'\n\n", result ); in main()
Drsa_decrypt.c69 unsigned char result[1024]; in main() local
74 memset(result, 0, sizeof( result ) ); in main()
169 buf, result, 1024 ); in main()
180 mbedtls_printf( "The decrypted result is: '%s'\n\n", result ); in main()
/net-tools-3.5.0/libcoap/examples/
Dcoap-server.c348 struct addrinfo *result, *rp; in get_context() local
355 s = getaddrinfo(node, port, &hints, &result); in get_context()
362 for (rp = result; rp != NULL; rp = rp->ai_next) { in get_context()
381 freeaddrinfo(result); in get_context()
389 int result = -1; in join() local
396 result = getaddrinfo("::", NULL, &hints, &reslocal); in join()
397 if (result < 0) { in join()
399 gai_strerror(result)); in join()
417 result = getaddrinfo(group_name, NULL, &hints, &resmulti); in join()
419 if (result < 0) { in join()
[all …]
Dcoap-rd.c251 str *result) { in parse_param() argument
253 if (result) in parse_param()
254 memset(result, 0, sizeof(str)); in parse_param()
272 if (data_len > 1 && result) { in parse_param()
275 result->s = ++data; in parse_param()
277 ++data; result->length++; in parse_param()
577 struct addrinfo *result, *rp; in get_context() local
584 s = getaddrinfo(node, port, &hints, &result); in get_context()
591 for (rp = result; rp != NULL; rp = rp->ai_next) { in get_context()
610 freeaddrinfo(result); in get_context()
[all …]
/net-tools-3.5.0/tinydtls-0.8.2/
Dglobal.h128 int result = 1; in equals() local
130 result &= (*a++ == *b++); in equals()
132 return result; in equals()

123