/Zephyr-latest/samples/net/sockets/echo_client/src/ |
D | tcp.c | 55 data->tcp.expecting = sys_rand32_get() % ipsum_len; in send_tcp_data() 56 } while (data->tcp.expecting == 0U); in send_tcp_data() 58 data->tcp.received = 0U; in send_tcp_data() 60 ret = sendall(data->tcp.sock, lorem_ipsum, data->tcp.expecting); in send_tcp_data() 68 data->tcp.expecting); in send_tcp_data() 77 if (data->tcp.received + received > data->tcp.expecting) { in compare_tcp_data() 82 if (memcmp(buf, lorem_ipsum + data->tcp.received, received) != 0) { in compare_tcp_data() 97 data->tcp.sock = socket(family, SOCK_STREAM, IPPROTO_TLS_1_2); in start_tcp_proto() 99 data->tcp.sock = socket(family, SOCK_STREAM, IPPROTO_TCP); in start_tcp_proto() 101 if (data->tcp.sock < 0) { in start_tcp_proto() [all …]
|
D | echo-client.c | 63 .tcp.sock = INVALID_SOCK, 68 .tcp.sock = INVALID_SOCK, 98 if (conf.ipv4.tcp.sock >= 0) { in prepare_fds() 99 fds[nfds].fd = conf.ipv4.tcp.sock; in prepare_fds() 110 if (conf.ipv6.tcp.sock >= 0) { in prepare_fds() 111 fds[nfds].fd = conf.ipv6.tcp.sock; in prepare_fds() 286 (void)check_our_ipv6_sockets(conf.ipv6.tcp.sock, in ipv6_event_handler()
|
D | common.h | 61 } tcp; member
|
/Zephyr-latest/samples/net/sockets/echo_server/src/ |
D | tcp.c | 75 data->tcp.sock = socket(bind_addr->sa_family, SOCK_STREAM, in start_tcp_proto() 78 data->tcp.sock = socket(bind_addr->sa_family, SOCK_STREAM, in start_tcp_proto() 81 if (data->tcp.sock < 0) { in start_tcp_proto() 95 ret = setsockopt(data->tcp.sock, SOL_TLS, TLS_SEC_TAG_LIST, in start_tcp_proto() 107 (void)setsockopt(data->tcp.sock, IPPROTO_IPV6, in start_tcp_proto() 116 (void)setsockopt(data->tcp.sock, IPPROTO_IPV6, IPV6_V6ONLY, in start_tcp_proto() 120 ret = bind(data->tcp.sock, bind_addr, bind_addrlen); in start_tcp_proto() 127 ret = listen(data->tcp.sock, MAX_CLIENT_QUEUE); in start_tcp_proto() 147 client = data->tcp.accepted[slot].sock; in handle_data() 151 data->tcp.accepted[slot].recv_buffer + offset, in handle_data() [all …]
|
D | common.h | 58 } tcp; member
|
/Zephyr-latest/subsys/net/lib/mqtt/ |
D | mqtt_transport_socket_tcp.c | 26 client->transport.tcp.sock = zsock_socket(broker->sa_family, SOCK_STREAM, in mqtt_client_tcp_connect() 28 if (client->transport.tcp.sock < 0) { in mqtt_client_tcp_connect() 34 ret = setsockopt(client->transport.tcp.sock, in mqtt_client_tcp_connect() 44 NET_DBG("Created socket %d", client->transport.tcp.sock); in mqtt_client_tcp_connect() 52 ret = zsock_connect(client->transport.tcp.sock, client->broker, in mqtt_client_tcp_connect() 62 (void)zsock_close(client->transport.tcp.sock); in mqtt_client_tcp_connect() 73 ret = zsock_send(client->transport.tcp.sock, data + offset, in mqtt_client_tcp_write() 98 ret = zsock_sendmsg(client->transport.tcp.sock, message, 0); in mqtt_client_tcp_write_msg() 135 ret = zsock_recv(client->transport.tcp.sock, data, buflen, flags); in mqtt_client_tcp_read() 147 NET_INFO("Closing socket %d", client->transport.tcp.sock); in mqtt_client_tcp_disconnect() [all …]
|
/Zephyr-latest/samples/net/stats/src/ |
D | main.c | 103 GET_STAT(iface, tcp.bytes.received), in print_stats() 104 GET_STAT(iface, tcp.bytes.sent)); in print_stats() 106 GET_STAT(iface, tcp.recv), in print_stats() 107 GET_STAT(iface, tcp.sent), in print_stats() 108 GET_STAT(iface, tcp.drop)); in print_stats() 110 GET_STAT(iface, tcp.resent), in print_stats() 111 GET_STAT(iface, tcp.chkerr), in print_stats() 112 GET_STAT(iface, tcp.ackerr)); in print_stats() 114 GET_STAT(iface, tcp.rsterr), in print_stats() 115 GET_STAT(iface, tcp.rst), in print_stats() [all …]
|
/Zephyr-latest/subsys/net/ip/ |
D | tcp.c | 76 K_MEM_SLAB_DEFINE_STATIC(tcp_conns_slab, sizeof(struct tcp), 82 static enum net_verdict tcp_in(struct tcp *conn, struct net_pkt *pkt); 84 static void tcp_out(struct tcp *conn, uint8_t flags); 88 size_t (*tcp_recv_cb)(struct tcp *conn, struct net_pkt *pkt) = NULL; 248 const struct tcp *conn = ctx->tcp; in net_tcp_endpoint_copy() 422 static void tcp_derive_rto(struct tcp *conn) in tcp_derive_rto() 448 static void tcp_new_reno_log(struct tcp *conn, char *step) in tcp_new_reno_log() 455 static void tcp_new_reno_init(struct tcp *conn) in tcp_new_reno_init() 463 static void tcp_new_reno_fast_retransmit(struct tcp *conn) in tcp_new_reno_fast_retransmit() 474 static void tcp_new_reno_timeout(struct tcp *conn) in tcp_new_reno_timeout() [all …]
|
D | net_stats.c | 156 GET_STAT(iface, tcp.bytes.received), in stats() 157 GET_STAT(iface, tcp.bytes.sent)); in stats() 159 GET_STAT(iface, tcp.recv), in stats() 160 GET_STAT(iface, tcp.sent), in stats() 161 GET_STAT(iface, tcp.drop)); in stats() 163 GET_STAT(iface, tcp.resent), in stats() 164 GET_STAT(iface, tcp.chkerr), in stats() 165 GET_STAT(iface, tcp.ackerr)); in stats() 167 GET_STAT(iface, tcp.rsterr), in stats() 168 GET_STAT(iface, tcp.rst), in stats() [all …]
|
D | net_stats.h | 239 UPDATE_STAT(iface, stats.tcp.bytes.sent += bytes); in net_stats_update_tcp_sent() 244 UPDATE_STAT(iface, stats.tcp.bytes.received += bytes); in net_stats_update_tcp_recv() 250 UPDATE_STAT(iface, stats.tcp.resent += bytes); in net_stats_update_tcp_resent() 255 UPDATE_STAT(iface, stats.tcp.drop++); in net_stats_update_tcp_drop() 260 UPDATE_STAT(iface, stats.tcp.sent++); in net_stats_update_tcp_seg_sent() 265 UPDATE_STAT(iface, stats.tcp.recv++); in net_stats_update_tcp_seg_recv() 270 UPDATE_STAT(iface, stats.tcp.seg_drop++); in net_stats_update_tcp_seg_drop() 275 UPDATE_STAT(iface, stats.tcp.rst++); in net_stats_update_tcp_seg_rst() 280 UPDATE_STAT(iface, stats.tcp.conndrop++); in net_stats_update_tcp_seg_conndrop() 285 UPDATE_STAT(iface, stats.tcp.connrst++); in net_stats_update_tcp_seg_connrst() [all …]
|
D | tcp_internal.h | 49 uint16_t net_tcp_get_supported_mss(const struct tcp *conn); 51 static inline uint16_t net_tcp_get_supported_mss(const struct tcp *conn) in net_tcp_get_supported_mss() 66 static inline enum tcp_state net_tcp_get_state(const struct tcp *conn) in net_tcp_get_state() 71 static inline enum tcp_state net_tcp_get_state(const struct tcp *conn) in net_tcp_get_state()
|
D | tcp_private.h | 253 struct tcp; 254 typedef void (*net_tcp_closed_cb_t)(struct tcp *conn, void *user_data); 256 struct tcp { /* TCP connection */ struct 266 struct tcp *accepted_conn; argument 359 typedef void (*net_tcp_cb_t)(struct tcp *conn, void *user_data); argument
|
/Zephyr-latest/subsys/net/lib/shell/ |
D | stats.c | 534 GET_STAT(iface, tcp.bytes.received), in net_shell_print_statistics() 535 GET_STAT(iface, tcp.bytes.sent), in net_shell_print_statistics() 536 GET_STAT(iface, tcp.resent)); in net_shell_print_statistics() 538 GET_STAT(iface, tcp.recv), in net_shell_print_statistics() 539 GET_STAT(iface, tcp.sent), in net_shell_print_statistics() 540 GET_STAT(iface, tcp.seg_drop)); in net_shell_print_statistics() 542 GET_STAT(iface, tcp.rexmit), in net_shell_print_statistics() 543 GET_STAT(iface, tcp.chkerr), in net_shell_print_statistics() 544 GET_STAT(iface, tcp.ackerr)); in net_shell_print_statistics() 546 GET_STAT(iface, tcp.rsterr), in net_shell_print_statistics() [all …]
|
D | CMakeLists.txt | 34 zephyr_library_sources_ifdef(CONFIG_NET_SHELL_TCP_SUPPORTED tcp.c)
|
/Zephyr-latest/samples/subsys/modbus/tcp_server/ |
D | CMakeLists.txt | 6 project(modbus-tcp-server)
|
D | README.rst | 1 .. zephyr:code-sample:: modbus-tcp-server 45 # pymodbus.console tcp --host 192.0.2.1 --port 502
|
/Zephyr-latest/samples/net/sockets/tcp/ |
D | CMakeLists.txt | 6 project(tcp) project
|
D | README.rst | 1 .. zephyr:code-sample:: sockets-tcp-sample 28 cd samples/net/sockets/tcp
|
/Zephyr-latest/tests/net/tcp/ |
D | CMakeLists.txt | 5 project(tcp) project
|
/Zephyr-latest/include/zephyr/net/ |
D | net_stats.h | 404 struct net_stats_tcp tcp; member 1076 &(iface)->stats.tcp.bytes.sent); \ 1083 &(iface)->stats.tcp.bytes.received); \ 1090 &(iface)->stats.tcp.resent); \ 1097 &(iface)->stats.tcp.sent); \ 1104 &(iface)->stats.tcp.recv); \ 1111 &(iface)->stats.tcp.drop); \ 1118 &(iface)->stats.tcp.chkerr); \ 1125 &(iface)->stats.tcp.ackerr); \ 1132 &(iface)->stats.tcp.rsterr); \ [all …]
|
/Zephyr-latest/doc/connectivity/networking/api/ |
D | zperf.rst | 55 zperf tcp upload 2001:db8::2 5001 10 1K 1M 70 zperf tcp upload2 v6 10 1K 1M 84 zperf tcp download 5001
|
/Zephyr-latest/subsys/logging/backends/ |
D | Kconfig.net | 92 If you want to use TCP, add "tcp://" in front of the address 94 tcp://192.0.2.1:514 95 tcp://192.0.2.42 96 tcp://[2001:db8::1]:514
|
/Zephyr-latest/tests/bsim/net/sockets/echo_test/src/ |
D | echo_test.c | 57 packet_count = conf.ipv6.tcp.counter; in test_echo_client_tick()
|
/Zephyr-latest/samples/net/sockets/echo_client/ |
D | CMakeLists.txt | 23 target_sources_ifdef(CONFIG_NET_TCP app PRIVATE src/tcp.c)
|
/Zephyr-latest/tests/bsim/net/sockets/echo_test/ |
D | CMakeLists.txt | 31 target_sources_ifdef(CONFIG_NET_TCP app PRIVATE ${echo_client_path}/src/tcp.c)
|