Home
last modified time | relevance | path

Searched refs:tcp (Results 1 – 25 of 79) sorted by relevance

1234

/Zephyr-Core-3.5.0/samples/net/sockets/echo_client/src/
Dtcp.c55 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 …]
Decho-client.c81 .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()
Dcommon.h56 } tcp; member
/Zephyr-Core-3.5.0/samples/net/sockets/echo_server/src/
Dtcp.c74 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 …]
Dcommon.h58 } tcp; member
/Zephyr-Core-3.5.0/subsys/net/lib/mqtt/
Dmqtt_transport_socket_tcp.c26 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.5.0/samples/net/stats/src/
Dmain.c90 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.5.0/subsys/net/ip/
Dnet_stats.c138 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 …]
Dtcp.c73 K_MEM_SLAB_DEFINE_STATIC(tcp_conns_slab, sizeof(struct tcp),
79 static enum net_verdict tcp_in(struct tcp *conn, struct net_pkt *pkt);
81 static void tcp_out(struct tcp *conn, uint8_t flags);
85 size_t (*tcp_recv_cb)(struct tcp *conn, struct net_pkt *pkt) = NULL;
377 static void tcp_derive_rto(struct tcp *conn) in tcp_derive_rto()
403 static void tcp_new_reno_log(struct tcp *conn, char *step) in tcp_new_reno_log()
410 static void tcp_new_reno_init(struct tcp *conn) in tcp_new_reno_init()
418 static void tcp_new_reno_fast_retransmit(struct tcp *conn) in tcp_new_reno_fast_retransmit()
429 static void tcp_new_reno_timeout(struct tcp *conn) in tcp_new_reno_timeout()
437 static void tcp_new_reno_dup_ack(struct tcp *conn) in tcp_new_reno_dup_ack()
[all …]
Dnet_stats.h193 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 …]
Dtcp_internal.h45 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()
Dtcp_private.h235 struct tcp { /* TCP connection */ struct
245 struct tcp *accepted_conn; argument
316 typedef void (*net_tcp_cb_t)(struct tcp *conn, void *user_data); argument
DCMakeLists.txt46 zephyr_library_sources_ifdef(CONFIG_NET_TCP tcp.c)
/Zephyr-Core-3.5.0/samples/subsys/modbus/tcp_server/
DCMakeLists.txt6 project(modbus-tcp-server)
DREADME.rst1 .. zephyr:code-sample:: modbus-tcp-server
45 # pymodbus.console tcp --host 192.0.2.1 --port 502
/Zephyr-Core-3.5.0/samples/net/sockets/tcp/
DREADME.rst1 .. zephyr:code-sample:: sockets-tcp-sample
28 cd samples/net/sockets/tcp
DCMakeLists.txt6 project(tcp) project
/Zephyr-Core-3.5.0/tests/net/tcp/
DCMakeLists.txt5 project(tcp) project
/Zephyr-Core-3.5.0/samples/subsys/debug/gdbstub/
DCMakeLists.txt6 list(APPEND QEMU_EXTRA_FLAGS -serial tcp:127.0.0.1:5678,server)
/Zephyr-Core-3.5.0/doc/connectivity/networking/api/
Dzperf.rst55 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.5.0/tests/bsim/net/sockets/echo_test/src/
Decho_test.c57 packet_count = conf.ipv6.tcp.counter; in test_echo_client_tick()
/Zephyr-Core-3.5.0/samples/net/sockets/echo_client/
DCMakeLists.txt23 target_sources_ifdef(CONFIG_NET_TCP app PRIVATE src/tcp.c)
/Zephyr-Core-3.5.0/samples/net/sockets/echo_server/
DCMakeLists.txt23 target_sources_ifdef(CONFIG_NET_TCP app PRIVATE src/tcp.c)
/Zephyr-Core-3.5.0/tests/bsim/net/sockets/echo_test/
DCMakeLists.txt31 target_sources_ifdef(CONFIG_NET_TCP app PRIVATE ${echo_client_path}/src/tcp.c)
/Zephyr-Core-3.5.0/doc/services/modbus/
Dindex.rst30 * :zephyr:code-sample:`modbus-tcp-server` sample is a simple Modbus TCP server.

1234