/net-tools-3.6.0/mbedtls-2.4.0/library/ |
D | net_sockets.c | 66 #define read(fd,buf,len) recv(fd,(char*)buf,(int) len,0) argument 67 #define write(fd,buf,len) send(fd,(char*)buf,(int) len,0) argument 68 #define close(fd) closesocket(fd) argument 130 ctx->fd = -1; in mbedtls_net_init() 157 ctx->fd = (int) socket( cur->ai_family, cur->ai_socktype, in mbedtls_net_connect() 159 if( ctx->fd < 0 ) in mbedtls_net_connect() 165 if( connect( ctx->fd, cur->ai_addr, MSVC_INT_CAST cur->ai_addrlen ) == 0 ) in mbedtls_net_connect() 171 close( ctx->fd ); in mbedtls_net_connect() 206 ctx->fd = (int) socket( cur->ai_family, cur->ai_socktype, in mbedtls_net_bind() 208 if( ctx->fd < 0 ) in mbedtls_net_bind() [all …]
|
/net-tools-3.6.0/ |
D | monitor_15_4.c | 54 int fd; member 117 if (pcap->fd >= 0) in monitor_pcap_free() 118 close(pcap->fd); in monitor_pcap_free() 129 pcap->fd = open(pathname, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, in monitor_pcap_create() 131 if (pcap->fd < 0) { in monitor_pcap_create() 150 len = write(pcap->fd, &hdr, PCAP_FILE_HDR_SIZE); in monitor_pcap_create() 186 len = write(pcap->fd, &frame, PCAP_FRAME_SIZE); in monitor_pcap_write() 192 fsync(pcap->fd); in monitor_pcap_write() 194 len = write(pcap->fd, data, size); in monitor_pcap_write() 200 fsync(pcap->fd); in monitor_pcap_write() [all …]
|
D | tunslip6.c | 81 void stty_telos(int fd); 84 void slip_send(int fd, unsigned char c); 85 void slip_send_char(int fd, unsigned char c); 387 int status, i, fd = -1; in get_slipfd() local 419 if((fd = socket(p->ai_family, p->ai_socktype, in get_slipfd() 425 if(connect(fd, p->ai_addr, p->ai_addrlen) == -1) { in get_slipfd() 426 close(fd); in get_slipfd() 438 fcntl(fd, F_SETFL, O_NONBLOCK); in get_slipfd() 449 fd = devopen(siodev, O_RDWR | O_NONBLOCK); in get_slipfd() 450 if(fd == -1) { in get_slipfd() [all …]
|
D | echo-server.c | 81 int fd; in get_socket() local 83 fd = socket(family, proto == IPPROTO_TCP ? SOCK_STREAM : SOCK_DGRAM, in get_socket() 85 if (fd < 0) { in get_socket() 89 return fd; in get_socket() 92 static int bind_device(int fd, const char *interface, void *addr, int len, in bind_device() argument 101 if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, in bind_device() 107 setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); in bind_device() 116 printf("Socket %d binding to %s\n", fd, in bind_device() 122 printf("Socket %d binding to %s\n", fd, in bind_device() 128 ret = bind(fd, (struct sockaddr *)addr, len); in bind_device() [all …]
|
D | echo-client.c | 395 int c, ret, fd, i = 0, timeout = -1, port = SERVER_PORT; in main() local 503 fd = socket(family, tcp ? SOCK_STREAM : SOCK_DGRAM, in main() 505 if (fd < 0) { in main() 517 if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, in main() 548 ret = setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, in main() 554 ret = bind(fd, addr_recv, addr_len); in main() 561 ret = connect(fd, addr_send, addr_len); in main() 608 ret = write(fd, &buf_ptr[pos], in main() 617 ret = sendto(fd, buf_ptr, len, 0, addr_send, in main() 630 FD_SET(fd, &rfds); in main() [all …]
|
D | throughput-client.c | 342 int c, ret, fd, i = 0, timeout = -1, port = SERVER_PORT; in main() local 432 fd = socket(family, SOCK_DGRAM, IPPROTO_UDP); in main() 433 if (fd < 0) { in main() 445 if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, in main() 476 ret = setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, in main() 482 ret = bind(fd, addr_recv, addr_len); in main() 513 ret = sendto(fd, data[i].buf, len, 0, in main() 529 FD_SET(fd, &rfds); in main() 538 ret = select(fd + 1, &rfds, NULL, NULL, &tv); in main() 552 } else if (!FD_ISSET(fd, &rfds)) { in main() [all …]
|
D | coap-client.c | 370 int fd; member 1003 return sendto(user_data->fd, data, len, 0, in send_to_peer() 1013 if (!user_data || !user_data->fd) in dtls_handle_read() 1018 user_data->len = recvfrom(user_data->fd, user_data->buf, MAX_READ_BUF, in dtls_handle_read() 1076 if (!user_data || !user_data->fd) in read_data_from_net() 1567 int c, ret, fd, timeout = 0; local 1670 fd = socket(family, SOCK_DGRAM, IPPROTO_UDP); 1671 if (fd < 0) { 1683 if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, 1716 close(coap_ctx->endpoint->handle.fd); [all …]
|
/net-tools-3.6.0/tinydtls-0.8.2/tests/ |
D | dtls-server.c | 151 int fd = *(int *)dtls_get_app_data(ctx); in send_to_peer() local 152 return sendto(fd, data, len, MSG_DONTWAIT, in send_to_peer() 158 int *fd; in dtls_handle_read() local 163 fd = dtls_get_app_data(ctx); in dtls_handle_read() 165 assert(fd); in dtls_handle_read() 169 len = recvfrom(*fd, buf, sizeof(buf), MSG_TRUNC, in dtls_handle_read() 279 int fd, opt, result; local 317 fd = socket(listen_addr.sin6_family, SOCK_DGRAM, 0); 319 if (fd < 0) { 324 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on) ) < 0) { [all …]
|
D | dtls-client.c | 198 int fd = *(int *)dtls_get_app_data(ctx); in send_to_peer() local 199 return sendto(fd, data, len, MSG_DONTWAIT, in send_to_peer() 205 int fd; in dtls_handle_read() local 211 fd = *(int *)dtls_get_app_data(ctx); in dtls_handle_read() 213 if (!fd) in dtls_handle_read() 218 len = recvfrom(fd, buf, MAX_READ_BUF, 0, in dtls_handle_read() 347 int fd, result; local 431 fd = socket(dst.addr.sa.sa_family, SOCK_DGRAM, 0); 433 if (fd < 0) { 438 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on) ) < 0) { [all …]
|
/net-tools-3.6.0/virtual-hub/src/ |
D | graphs.c | 46 FILE *fd; in read_lines() local 50 fd = fopen(file, "r"); in read_lines() 52 while ((c = getc(fd)) != '\n') { in read_lines() 76 FILE *fd; in read_csv() local 81 fd = fopen(file, "r"); in read_csv() 83 while (fscanf(fd, "%f", &m[lines][cols++]) != EOF) { in read_csv() 84 char separator = getc(fd); in read_csv() 94 fclose(fd); in read_csv()
|
D | hub.c | 139 int fd; in fifo_handler() local 148 fd = g_io_channel_unix_get_fd(channel); in fifo_handler() 150 result = read(fd, buf, 1); in fifo_handler() 257 int fd; in setup_fifofd() local 262 fd = open(pipe_new, O_RDONLY); in setup_fifofd() 263 if (fd < 0) { in setup_fifofd() 264 return fd; in setup_fifofd() 267 channel = g_io_channel_unix_new(fd); in setup_fifofd()
|
/net-tools-3.6.0/tinydtls-0.8.2/sha2/ |
D | sha2prog.c | 51 int kl, l, fd, ac; in main() local 65 fd = fileno(stdin); in main() 94 fd = fileno(IN); in main() 101 while ((l = read(fd,buf,BUFLEN)) > 0) { in main()
|
/net-tools-3.6.0/mbedtls-2.4.0/programs/test/ |
D | udp_proxy.c | 556 nb_fds = client_fd.fd; in main() 557 if( nb_fds < server_fd.fd ) in main() 558 nb_fds = server_fd.fd; in main() 559 if( nb_fds < listen_fd.fd ) in main() 560 nb_fds = listen_fd.fd; in main() 566 FD_SET( server_fd.fd, &read_fds ); in main() 567 FD_SET( client_fd.fd, &read_fds ); in main() 568 FD_SET( listen_fd.fd, &read_fds ); in main() 576 if( FD_ISSET( listen_fd.fd, &read_fds ) ) in main() 579 if( FD_ISSET( client_fd.fd, &read_fds ) ) in main() [all …]
|
/net-tools-3.6.0/mbedtls-2.4.0/tests/data_files/ |
D | cert_sha384.crt | 21 fd:3c:fd:3c:fa:24:cf:5d:bf:7c:e4:53:e7:25:b5: 31 ca:01:e3:35:7f:fa:20:f5:dc:fd:69:b2:6a:00:7d: 44 61:c8:f9:66:57:e1:cb:60:7d:cd:8d:0f:66:b0:f2:61:45:fd: 52 0b:fd:e3:9e:8b:a5:4d:88:55:05:ad:6c:63:aa:74:0c:41:0d: 55 9a:e4:d2:fa:c9:d4:fc:62:99:ac:59:fb:fd:04:bc:5a:c0:47:
|
D | cert_sha224.crt | 21 fd:3c:fd:3c:fa:24:cf:5d:bf:7c:e4:53:e7:25:b5: 31 ca:01:e3:35:7f:fa:20:f5:dc:fd:69:b2:6a:00:7d: 43 b8:9b:0a:d1:b4:d1:a4:ce:05:39:42:7a:3b:7b:5e:fd:97:57: 45 48:7a:10:4a:fd:76:ca:42:39:25:3c:fa:19:f8:63:6c:e7:36:
|
D | cert_example_multi.crt | 21 fd:3c:fd:3c:fa:24:cf:5d:bf:7c:e4:53:e7:25:b5: 31 ca:01:e3:35:7f:fa:20:f5:dc:fd:69:b2:6a:00:7d: 58 1e:0a:a2:49:10:76:01:f4:f2:c8:18:fd:cc:63:46:12:8b:09:
|
D | cert_example_wildcard.crt | 21 fd:3c:fd:3c:fa:24:cf:5d:bf:7c:e4:53:e7:25:b5: 31 ca:01:e3:35:7f:fa:20:f5:dc:fd:69:b2:6a:00:7d: 47 7d:3d:0f:81:d0:b4:fd:b6:46:f1:c5:b8:bc:de:74:a2:41:a7:
|
D | cert_md4.crt | 21 fd:3c:fd:3c:fa:24:cf:5d:bf:7c:e4:53:e7:25:b5: 31 ca:01:e3:35:7f:fa:20:f5:dc:fd:69:b2:6a:00:7d: 44 fd:41:0f:5c:de:14:f4:c4:ba:5d:2c:30:2c:a6:dc:2d:e8:87:
|
D | cert_md5.crt | 21 fd:3c:fd:3c:fa:24:cf:5d:bf:7c:e4:53:e7:25:b5: 31 ca:01:e3:35:7f:fa:20:f5:dc:fd:69:b2:6a:00:7d: 56 e0:fd:44:26:3d:ad:ea:af:1d:d0:00:56:41:4e:f4:b0:3b:9d:
|
D | cert_sha1.crt | 21 fd:3c:fd:3c:fa:24:cf:5d:bf:7c:e4:53:e7:25:b5: 31 ca:01:e3:35:7f:fa:20:f5:dc:fd:69:b2:6a:00:7d: 48 7c:8d:a8:4d:2e:70:8c:ac:b5:5d:de:9b:10:5c:98:fd:a1:78:
|
D | cert_sha256.crt | 21 fd:3c:fd:3c:fa:24:cf:5d:bf:7c:e4:53:e7:25:b5: 31 ca:01:e3:35:7f:fa:20:f5:dc:fd:69:b2:6a:00:7d: 48 ca:70:d3:10:c5:2e:fd:9f:d2:0d:65:c4:f2:cc:ef:1b:18:e1:
|
D | cert_sha512.crt | 21 fd:3c:fd:3c:fa:24:cf:5d:bf:7c:e4:53:e7:25:b5: 31 ca:01:e3:35:7f:fa:20:f5:dc:fd:69:b2:6a:00:7d: 44 de:a6:f8:a6:d0:fd:9f:79:f7:e8:02:8a:c3:83:5d:85:45:cc:
|
D | cert_md2.crt | 16 79:b6:58:5c:32:58:b3:d4:14:fd:6c:02:61:9e:0b: 23 98:9d:7a:65:5e:20:52:07:2e:65:a5:31:fd:d9:74: 55 e1:37:aa:b1:e0:31:b3:b6:63:4c:fd:66:c8:e6:cf:f8:d9:97:
|
/net-tools-3.6.0/libcoap/src/ |
D | coap_io.c | 168 ep->handle.fd = sockfd; in coap_new_endpoint() 199 if (ep->handle.fd >= 0) in coap_free_endpoint() 200 close(ep->handle.fd); in coap_free_endpoint() 329 return sendmsg(ep->handle.fd, &mhdr, 0); in coap_network_send() 450 len = recvmsg(ep->handle.fd, &mhdr, 0); in coap_network_read() 458 coap_log(LOG_DEBUG, "received %d bytes on fd %d\n", (int)len, ep->handle.fd); in coap_network_read() 462 if (getsockname(ep->handle.fd, &(*packet)->dst.addr.sa, &(*packet)->dst.size) < 0) { in coap_network_read()
|
/net-tools-3.6.0/mbedtls-2.4.0/programs/ssl/ |
D | mini_client.c | 256 if( ( server_fd.fd = socket( AF_INET, SOCK_STREAM, 0 ) ) < 0 ) in main() 262 if( connect( server_fd.fd, in main()
|