/Zephyr-Core-3.4.0/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() 67 data->tcp.expecting); in send_tcp_data() 75 if (data->tcp.received + received > data->tcp.expecting) { in compare_tcp_data() 80 if (memcmp(buf, lorem_ipsum + data->tcp.received, received) != 0) { in compare_tcp_data() 94 data->tcp.sock = socket(addr->sa_family, SOCK_STREAM, IPPROTO_TLS_1_2); in start_tcp_proto() 96 data->tcp.sock = socket(addr->sa_family, SOCK_STREAM, IPPROTO_TCP); in start_tcp_proto() 98 if (data->tcp.sock < 0) { in start_tcp_proto() [all …]
|
D | echo-client.c | 81 .tcp.sock = INVALID_SOCK, 86 .tcp.sock = INVALID_SOCK, 106 if (conf.ipv4.tcp.sock >= 0) { in prepare_fds() 107 fds[nfds].fd = conf.ipv4.tcp.sock; in prepare_fds() 118 if (conf.ipv6.tcp.sock >= 0) { in prepare_fds() 119 fds[nfds].fd = conf.ipv6.tcp.sock; in prepare_fds()
|
D | common.h | 56 } tcp; member
|
/Zephyr-Core-3.4.0/samples/net/sockets/echo_server/src/ |
D | tcp.c | 74 data->tcp.sock = socket(bind_addr->sa_family, SOCK_STREAM, in start_tcp_proto() 77 data->tcp.sock = socket(bind_addr->sa_family, SOCK_STREAM, in start_tcp_proto() 80 if (data->tcp.sock < 0) { in start_tcp_proto() 94 ret = setsockopt(data->tcp.sock, SOL_TLS, TLS_SEC_TAG_LIST, in start_tcp_proto() 103 ret = bind(data->tcp.sock, bind_addr, bind_addrlen); in start_tcp_proto() 110 ret = listen(data->tcp.sock, MAX_CLIENT_QUEUE); in start_tcp_proto() 130 client = data->tcp.accepted[slot].sock; in handle_data() 134 data->tcp.accepted[slot].recv_buffer + offset, in handle_data() 135 sizeof(data->tcp.accepted[slot].recv_buffer) - offset, in handle_data() 148 atomic_add(&data->tcp.bytes_received, received); in handle_data() [all …]
|
D | common.h | 58 } tcp; member
|
/Zephyr-Core-3.4.0/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-Core-3.4.0/samples/net/stats/src/ |
D | main.c | 90 GET_STAT(iface, tcp.bytes.received), in print_stats() 91 GET_STAT(iface, tcp.bytes.sent)); in print_stats() 93 GET_STAT(iface, tcp.recv), in print_stats() 94 GET_STAT(iface, tcp.sent), in print_stats() 95 GET_STAT(iface, tcp.drop)); in print_stats() 97 GET_STAT(iface, tcp.resent), in print_stats() 98 GET_STAT(iface, tcp.chkerr), in print_stats() 99 GET_STAT(iface, tcp.ackerr)); in print_stats() 101 GET_STAT(iface, tcp.rsterr), in print_stats() 102 GET_STAT(iface, tcp.rst), in print_stats() [all …]
|
/Zephyr-Core-3.4.0/subsys/net/ip/ |
D | net_stats.c | 138 GET_STAT(iface, tcp.bytes.received), in stats() 139 GET_STAT(iface, tcp.bytes.sent)); in stats() 141 GET_STAT(iface, tcp.recv), in stats() 142 GET_STAT(iface, tcp.sent), in stats() 143 GET_STAT(iface, tcp.drop)); in stats() 145 GET_STAT(iface, tcp.resent), in stats() 146 GET_STAT(iface, tcp.chkerr), in stats() 147 GET_STAT(iface, tcp.ackerr)); in stats() 149 GET_STAT(iface, tcp.rsterr), in stats() 150 GET_STAT(iface, tcp.rst), in stats() [all …]
|
D | tcp.c | 69 K_MEM_SLAB_DEFINE_STATIC(tcp_conns_slab, sizeof(struct tcp), 75 static enum net_verdict tcp_in(struct tcp *conn, struct net_pkt *pkt); 77 static void tcp_out(struct tcp *conn, uint8_t flags); 81 size_t (*tcp_recv_cb)(struct tcp *conn, struct net_pkt *pkt) = NULL; 373 static void tcp_derive_rto(struct tcp *conn) in tcp_derive_rto() 395 static void tcp_send_queue_flush(struct tcp *conn) in tcp_send_queue_flush() 408 static int tcp_conn_unref(struct tcp *conn) in tcp_conn_unref() 451 conn->context->tcp = NULL; in tcp_conn_unref() 484 static int tcp_conn_close_debug(struct tcp *conn, int status, in tcp_conn_close_debug() 487 static int tcp_conn_close(struct tcp *conn, int status) in tcp_conn_close_debug() [all …]
|
D | net_stats.h | 193 UPDATE_STAT(iface, stats.tcp.bytes.sent += bytes); in net_stats_update_tcp_sent() 198 UPDATE_STAT(iface, stats.tcp.bytes.received += bytes); in net_stats_update_tcp_recv() 204 UPDATE_STAT(iface, stats.tcp.resent += bytes); in net_stats_update_tcp_resent() 209 UPDATE_STAT(iface, stats.tcp.drop++); in net_stats_update_tcp_drop() 214 UPDATE_STAT(iface, stats.tcp.sent++); in net_stats_update_tcp_seg_sent() 219 UPDATE_STAT(iface, stats.tcp.recv++); in net_stats_update_tcp_seg_recv() 224 UPDATE_STAT(iface, stats.tcp.seg_drop++); in net_stats_update_tcp_seg_drop() 229 UPDATE_STAT(iface, stats.tcp.rst++); in net_stats_update_tcp_seg_rst() 234 UPDATE_STAT(iface, stats.tcp.conndrop++); in net_stats_update_tcp_seg_conndrop() 239 UPDATE_STAT(iface, stats.tcp.connrst++); in net_stats_update_tcp_seg_connrst() [all …]
|
D | tcp_internal.h | 45 uint16_t net_tcp_get_supported_mss(const struct tcp *conn); 47 static inline uint16_t net_tcp_get_supported_mss(const struct tcp *conn) in net_tcp_get_supported_mss() 62 static inline enum tcp_state net_tcp_get_state(const struct tcp *conn) in net_tcp_get_state() 67 static inline enum tcp_state net_tcp_get_state(const struct tcp *conn) in net_tcp_get_state()
|
D | tcp_private.h | 226 struct tcp { /* TCP connection */ struct 236 struct tcp *accepted_conn; argument 304 typedef void (*net_tcp_cb_t)(struct tcp *conn, void *user_data); argument
|
D | CMakeLists.txt | 39 zephyr_library_sources_ifdef(CONFIG_NET_TCP tcp.c)
|
/Zephyr-Core-3.4.0/samples/net/sockets/tcp/ |
D | README.rst | 1 .. _sockets-tcp-sample: 27 cd samples/net/sockets/tcp
|
D | CMakeLists.txt | 6 project(tcp) project
|
/Zephyr-Core-3.4.0/samples/subsys/modbus/tcp_server/ |
D | CMakeLists.txt | 6 project(modbus-tcp-server)
|
D | README.rst | 1 .. _modbus-tcp-server-sample: 44 # pymodbus.console tcp --host 192.0.2.1 --port 502
|
/Zephyr-Core-3.4.0/tests/net/tcp/ |
D | CMakeLists.txt | 5 project(tcp) project
|
/Zephyr-Core-3.4.0/samples/subsys/debug/gdbstub/ |
D | CMakeLists.txt | 6 list(APPEND QEMU_EXTRA_FLAGS -serial tcp:127.0.0.1:5678,server)
|
/Zephyr-Core-3.4.0/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-Core-3.4.0/tests/bsim/net/sockets/echo_test/src/ |
D | echo_test.c | 57 packet_count = conf.ipv6.tcp.counter; in test_echo_client_tick()
|
/Zephyr-Core-3.4.0/samples/net/sockets/echo_client/ |
D | CMakeLists.txt | 22 target_sources_ifdef(CONFIG_NET_TCP app PRIVATE src/tcp.c)
|
/Zephyr-Core-3.4.0/samples/net/sockets/echo_server/ |
D | CMakeLists.txt | 22 target_sources_ifdef(CONFIG_NET_TCP app PRIVATE src/tcp.c)
|
/Zephyr-Core-3.4.0/tests/bsim/net/sockets/echo_test/ |
D | CMakeLists.txt | 31 target_sources_ifdef(CONFIG_NET_TCP app PRIVATE ${echo_client_path}/src/tcp.c)
|
/Zephyr-Core-3.4.0/tests/net/tcp/src/ |
D | main.c | 1294 rsterr_before = GET_STAT(iface, tcp.rsterr); in check_rst_fail() 1307 rsterr_after = GET_STAT(iface, tcp.rsterr); in check_rst_fail() 1331 rsterr_before = GET_STAT(iface, tcp.rsterr); in check_rst_succeed() 1339 rsterr_after = GET_STAT(iface, tcp.rsterr); in check_rst_succeed() 1352 struct tcp *conn; in ZTEST() 1357 conn = ctx->tcp; in ZTEST()
|