/net-tools-3.5.0/tinydtls-0.8.2/examples/contiki/ |
D | dtls-client.c | 90 try_send(struct dtls_context_t *ctx, session_t *dst) { in try_send() argument 92 res = dtls_write(ctx, dst, (uint8 *)buf, buflen); in try_send() 262 init_dtls(session_t *dst) { in init_dtls() argument 279 dst->size = sizeof(dst->addr) + sizeof(dst->port); in init_dtls() 280 dst->port = UIP_HTONS(20220); in init_dtls() 282 set_connection_address(&dst->addr); in init_dtls() 283 client_conn = udp_new(&dst->addr, 0, NULL); in init_dtls() 284 udp_bind(client_conn, dst->port); in init_dtls() 287 PRINT6ADDR(&dst->addr); in init_dtls() 288 PRINTF(":%d\n", uip_ntohs(dst->port)); in init_dtls() [all …]
|
/net-tools-3.5.0/mbedtls-2.4.0/tests/suites/ |
D | test_suite_base64.function | 52 void base64_encode_hex( char *src_hex, char *dst, int dst_buf_size, 64 TEST_ASSERT( len == strlen( dst ) ); 65 TEST_ASSERT( memcmp( dst, res, len ) == 0 ); 78 unsigned char *dst = NULL, *res = NULL; 81 dst = unhexify_alloc( dst_hex, &dst_len ); 89 TEST_ASSERT( memcmp( dst, res, len ) == 0 ); 93 mbedtls_free( dst ); 101 unsigned char dst[1000] = { 0 }; 107 TEST_ASSERT( mbedtls_base64_decode( dst, sizeof( dst ), &len, src, src_len ) == result ); 111 TEST_ASSERT( memcmp( dst, dst_ref, len ) == 0 );
|
/net-tools-3.5.0/libcoap/examples/ |
D | tiny.c | 104 struct sockaddr_in6 dst; in main() local 118 memset(&dst, 0, sizeof(struct sockaddr_in6 )); in main() 119 dst.sin6_family = AF_INET6; in main() 120 inet_pton( AF_INET6, argc > 1 ? argv[1] : "::1", &dst.sin6_addr ); in main() 121 dst.sin6_port = htons( COAP_DEFAULT_PORT ); in main() 123 if ( IN6_IS_ADDR_MULTICAST(&dst.sin6_addr) ) { in main() 137 coap_send( ctx, (struct sockaddr *)&dst, sizeof(dst), pdu ); in main()
|
D | client.c | 261 resolve_address(const str *server, struct sockaddr *dst) { in resolve_address() argument 290 memcpy(dst, ainfo->ai_addr, len); in resolve_address() 1026 coap_address_t dst; in main() local 1133 res = resolve_address(&server, &dst.addr.sa); in main() 1140 dst.size = res; in main() 1141 dst.addr.sin.sin_port = htons(port); in main() 1145 switch (dst.addr.sa.sa_family) { in main() 1147 addrptr = &dst.addr.sin.sin_addr; in main() 1153 addrptr = &dst.addr.sin6.sin6_addr; in main() 1173 && (inet_ntop(dst.addr.sa.sa_family, addrptr, addr, sizeof(addr)) != 0) in main() [all …]
|
/net-tools-3.5.0/libcoap/src/ |
D | coap_io.c | 44 coap_address_t dst; /**< the packet's destination address */ member 240 const coap_address_t *dst, in coap_network_send() argument 259 mhdr.msg_name = (void *)&dst->addr; in coap_network_send() 260 mhdr.msg_namelen = dst->size; in coap_network_send() 265 switch (dst->addr.sa.sa_family) { in coap_network_send() 334 &dst->addr, dst->port); in coap_network_send() 384 memcpy(&target->addr, &packet->dst, sizeof(target->addr)); in coap_packet_populate_endpoint() 406 is_local_if(const coap_address_t *local, const coap_address_t *dst) { in is_local_if() argument 407 return coap_address_isany(local) || coap_address_equals(dst, local) || in is_local_if() 408 coap_is_mcast(dst); in is_local_if() [all …]
|
D | net.c | 536 const coap_address_t *dst, in coap_send_ack() argument 545 result = coap_send(context, local_interface, dst, response); in coap_send_ack() 556 const coap_address_t *dst, in coap_send_impl() argument 561 if ( !context || !dst || !pdu ) in coap_send_impl() 571 bytes_written = context->network_send(context, local_interface, dst, in coap_send_impl() 575 coap_transaction_id(dst, pdu, &id); in coap_send_impl() 587 const coap_address_t *dst, in coap_send_impl() argument 593 if ( !context || !dst || !pdu ) in coap_send_impl() 606 coap_transaction_id(dst, pdu, &id); in coap_send_impl() 609 &dst->addr, dst->port); in coap_send_impl() [all …]
|
/net-tools-3.5.0/mbedtls-2.4.0/library/ |
D | base64.c | 77 int mbedtls_base64_encode( unsigned char *dst, size_t dlen, size_t *olen, in mbedtls_base64_encode() argument 100 if( ( dlen < n + 1 ) || ( NULL == dst ) ) in mbedtls_base64_encode() 108 for( i = 0, p = dst; i < n; i += 3 ) in mbedtls_base64_encode() 135 *olen = p - dst; in mbedtls_base64_encode() 144 int mbedtls_base64_decode( unsigned char *dst, size_t dlen, size_t *olen, in mbedtls_base64_decode() argument 198 if( dst == NULL || dlen < n ) in mbedtls_base64_decode() 204 for( j = 3, n = x = 0, p = dst; i > 0; i--, src++ ) in mbedtls_base64_decode() 221 *olen = p - dst; in mbedtls_base64_decode()
|
D | md_wrap.c | 106 static void md2_clone_wrap( void *dst, const void *src ) in md2_clone_wrap() argument 108 mbedtls_md2_clone( (mbedtls_md2_context *) dst, in md2_clone_wrap() 170 static void md4_clone_wrap( void *dst, const void *src ) in md4_clone_wrap() argument 172 mbedtls_md4_clone( (mbedtls_md4_context *) dst, in md4_clone_wrap() 232 static void md5_clone_wrap( void *dst, const void *src ) in md5_clone_wrap() argument 234 mbedtls_md5_clone( (mbedtls_md5_context *) dst, in md5_clone_wrap() 294 static void ripemd160_clone_wrap( void *dst, const void *src ) in ripemd160_clone_wrap() argument 296 mbedtls_ripemd160_clone( (mbedtls_ripemd160_context *) dst, in ripemd160_clone_wrap() 350 static void sha1_clone_wrap( void *dst, const void *src ) in sha1_clone_wrap() argument 352 mbedtls_sha1_clone( (mbedtls_sha1_context *) dst, in sha1_clone_wrap() [all …]
|
D | ccm.c | 127 #define CTR_CRYPT( dst, src, len ) \ argument 132 dst[i] = src[i] ^ b[i]; 151 unsigned char *dst; in ccm_auth_crypt() local 257 dst = output; in ccm_auth_crypt() 270 CTR_CRYPT( dst, src, use_len ); in ccm_auth_crypt() 275 memcpy( b, dst, use_len ); in ccm_auth_crypt() 279 dst += use_len; in ccm_auth_crypt()
|
D | ecp_curves.c | 799 static inline void add64( mbedtls_mpi_uint *dst, mbedtls_mpi_uint *src, mbedtls_mpi_uint *carry ) in add64() argument 803 for( i = 0; i < 8 / sizeof( mbedtls_mpi_uint ); i++, dst++, src++ ) in add64() 805 *dst += c; c = ( *dst < c ); in add64() 806 *dst += *src; c += ( *dst < *src ); in add64() 812 static inline void carry64( mbedtls_mpi_uint *dst, mbedtls_mpi_uint *carry ) in carry64() argument 815 for( i = 0; i < 8 / sizeof( mbedtls_mpi_uint ); i++, dst++ ) in carry64() 817 *dst += *carry; in carry64() 818 *carry = ( *dst < *carry ); in carry64() 903 static inline void add32( uint32_t *dst, uint32_t src, signed char *carry ) in add32() argument 905 *dst += src; in add32() [all …]
|
D | rsa.c | 464 static void mgf_mask( unsigned char *dst, size_t dlen, unsigned char *src, in mgf_mask() argument 479 p = dst; in mgf_mask() 1478 int mbedtls_rsa_copy( mbedtls_rsa_context *dst, const mbedtls_rsa_context *src ) in mbedtls_rsa_copy() argument 1482 dst->ver = src->ver; in mbedtls_rsa_copy() 1483 dst->len = src->len; in mbedtls_rsa_copy() 1485 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->N, &src->N ) ); in mbedtls_rsa_copy() 1486 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->E, &src->E ) ); in mbedtls_rsa_copy() 1488 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->D, &src->D ) ); in mbedtls_rsa_copy() 1489 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->P, &src->P ) ); in mbedtls_rsa_copy() 1490 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->Q, &src->Q ) ); in mbedtls_rsa_copy() [all …]
|
D | md.c | 203 int mbedtls_md_clone( mbedtls_md_context_t *dst, in mbedtls_md_clone() argument 206 if( dst == NULL || dst->md_info == NULL || in mbedtls_md_clone() 208 dst->md_info != src->md_info ) in mbedtls_md_clone() 213 dst->md_info->clone_func( dst->md_ctx, src->md_ctx ); in mbedtls_md_clone()
|
D | camellia.c | 900 unsigned char dst[16]; in mbedtls_camellia_self_test() local 928 memcpy( dst, camellia_test_ecb_plain[i], 16 ); in mbedtls_camellia_self_test() 932 memcpy( dst, camellia_test_ecb_cipher[u][i], 16 ); in mbedtls_camellia_self_test() 937 if( memcmp( buf, dst, 16 ) != 0 ) in mbedtls_camellia_self_test() 967 memcpy( dst, camellia_test_cbc_iv, 16 ); in mbedtls_camellia_self_test() 981 memcpy( dst, camellia_test_cbc_plain[i], 16 ); in mbedtls_camellia_self_test() 983 memcpy( iv , dst, 16 ); in mbedtls_camellia_self_test() 985 memcpy( dst, camellia_test_cbc_cipher[u][i], 16 ); in mbedtls_camellia_self_test() 990 if( memcmp( buf, dst, 16 ) != 0 ) in mbedtls_camellia_self_test()
|
D | md2.c | 99 void mbedtls_md2_clone( mbedtls_md2_context *dst, in mbedtls_md2_clone() argument 102 *dst = *src; in mbedtls_md2_clone()
|
/net-tools-3.5.0/libcoap/include/coap/ |
D | net.h | 126 const coap_address_t *dst, 223 const coap_address_t *dst, 263 const coap_address_t *dst, 287 const coap_address_t *dst, 308 const coap_address_t *dst, 328 const coap_address_t *dst, 348 const coap_address_t *dst, in coap_send_rst() argument 352 dst, request, in coap_send_rst() 453 const coap_address_t *dst,
|
D | coap_io.h | 81 const coap_address_t *dst, 146 coap_address_t dst; /**< the packet's destination address */ member
|
D | uthash.h | 50 #define DECLTYPE_ASSIGN(dst,src) \ argument 52 char **_da_dst = (char**)(&(dst)); \ 56 #define DECLTYPE_ASSIGN(dst,src) \ argument 58 (dst) = DECLTYPE(dst)(src); \ 825 #define HASH_SELECT(hh_dst, dst, hh_src, src, cond) \ argument 830 ptrdiff_t _dst_hho = ((char*)(&(dst)->hh_dst) - (char*)(dst)); \ 845 if (!dst) { \ 846 DECLTYPE_ASSIGN(dst,_elt); \ 847 HASH_MAKE_TABLE(hh_dst,dst); \ 849 _dst_hh->tbl = (dst)->hh_dst.tbl; \ [all …]
|
/net-tools-3.5.0/tinydtls-0.8.2/tests/ |
D | dtls-client.c | 170 try_send(struct dtls_context_t *ctx, session_t *dst) { in try_send() argument 172 res = dtls_write(ctx, dst, (uint8 *)buf, len); in try_send() 241 resolve_address(const char *server, struct sockaddr *dst) { in resolve_address() argument 271 memcpy(dst, ainfo->ai_addr, ainfo->ai_addrlen); in resolve_address() 350 session_t dst; local 416 memset(&dst, 0, sizeof(session_t)); 418 res = resolve_address(argv[optind++], &dst.addr.sa); 423 dst.size = res; 427 dst.addr.sin.sin_port = htons(atoi(optind < argc ? argv[optind++] : port_str)); 431 fd = socket(dst.addr.sa.sa_family, SOCK_DGRAM, 0); [all …]
|
/net-tools-3.5.0/mbedtls-2.4.0/programs/test/ |
D | udp_proxy.c | 293 mbedtls_net_context *dst; member 315 mbedtls_net_context *dst = p->dst; in send_packet() local 326 if( ( ret = mbedtls_net_send( dst, buf, p->len ) ) <= 0 ) in send_packet() 334 if( ( ret = mbedtls_net_send( dst, p->buf, p->len ) ) <= 0 ) in send_packet() 347 if( ( ret = mbedtls_net_send( dst, p->buf, p->len ) ) <= 0 ) in send_packet() 402 mbedtls_net_context *dst, in handle_message() argument 419 cur.dst = dst; in handle_message() 443 prev.dst == NULL && in handle_message() 457 if( prev.dst != NULL ) in handle_message()
|
/net-tools-3.5.0/libcoap/examples/contiki/ |
D | coap-observer.c | 44 static coap_address_t dst; variable 129 coap_address_init(&dst); in PROCESS_THREAD() 130 dst.port = uip_htons(COAP_DEFAULT_PORT); in PROCESS_THREAD() 131 uip_ip6addr(&dst.addr, 0xaaaa, 0, 0, 0, 0x206, 0x98ff, 0xfe00, 0x232); in PROCESS_THREAD() 172 if (COAP_INVALID_TID == coap_send_confirmed(coap_context, &dst, request)) in PROCESS_THREAD()
|
/net-tools-3.5.0/mbedtls-2.4.0/include/mbedtls/ |
D | base64.h | 54 int mbedtls_base64_encode( unsigned char *dst, size_t dlen, size_t *olen, 74 int mbedtls_base64_decode( unsigned char *dst, size_t dlen, size_t *olen,
|
D | md2.h | 74 void mbedtls_md2_clone( mbedtls_md2_context *dst,
|
D | ripemd160.h | 74 void mbedtls_ripemd160_clone( mbedtls_ripemd160_context *dst,
|
/net-tools-3.5.0/tinydtls-0.8.2/ |
D | uthash.h | 46 #define DECLTYPE_ASSIGN(dst,src) \ argument 48 char **_da_dst = (char**)(&(dst)); \ 52 #define DECLTYPE_ASSIGN(dst,src) \ argument 54 (dst) = DECLTYPE(dst)(src); \ 842 #define HASH_SELECT(hh_dst, dst, hh_src, src, cond) \ argument 847 ptrdiff_t _dst_hho = ((char*)(&(dst)->hh_dst) - (char*)(dst)); \ 862 if (!dst) { \ 863 DECLTYPE_ASSIGN(dst,_elt); \ 864 HASH_MAKE_TABLE(hh_dst,dst); \ 866 _dst_hh->tbl = (dst)->hh_dst.tbl; \ [all …]
|
D | dtls.h | 276 int dtls_connect(dtls_context_t *ctx, const session_t *dst); 296 int dtls_renegotiate(dtls_context_t *ctx, const session_t *dst);
|