| /Zephyr-latest/include/zephyr/net/ |
| D | net_context.h | 77 struct net_context; 99 typedef void (*net_context_recv_cb_t)(struct net_context *context, 120 typedef void (*net_context_send_cb_t)(struct net_context *context, 140 typedef void (*net_tcp_accept_cb_t)(struct net_context *new_context, 167 typedef void (*net_context_connect_cb_t)(struct net_context *context, 207 __net_socket struct net_context { struct 436 static inline bool net_context_is_used(struct net_context *context) in net_context_is_used() argument 450 static inline bool net_context_is_bound_to_iface(struct net_context *context) in net_context_is_bound_to_iface() 464 static inline bool net_context_is_accepting(struct net_context *context) in net_context_is_accepting() 477 static inline void net_context_set_accepting(struct net_context *context, in net_context_set_accepting() [all …]
|
| D | net_offload.h | 59 struct net_context **context); 64 int (*bind)(struct net_context *context, 72 int (*listen)(struct net_context *context, int backlog); 78 int (*connect)(struct net_context *context, 89 int (*accept)(struct net_context *context, 116 int (*recv)(struct net_context *context, 124 int (*put)(struct net_context *context); 148 struct net_context **context) in net_offload_get() 171 struct net_context *context, in net_offload_bind() 195 struct net_context *context, in net_offload_listen() [all …]
|
| /Zephyr-latest/subsys/net/ip/ |
| D | tcp_internal.h | 103 int net_tcp_get(struct net_context *context); 105 static inline int net_tcp_get(struct net_context *context) in net_tcp_get() 128 int net_tcp_connect(struct net_context *context, 137 static inline int net_tcp_connect(struct net_context *context, in net_tcp_connect() 165 int net_tcp_listen(struct net_context *context); 167 static inline int net_tcp_listen(struct net_context *context) in net_tcp_listen() 185 int net_tcp_accept(struct net_context *context, net_tcp_accept_cb_t cb, 188 static inline int net_tcp_accept(struct net_context *context, in net_tcp_accept() 209 int net_tcp_send_data(struct net_context *context, net_context_send_cb_t cb, 212 static inline int net_tcp_send_data(struct net_context *context, in net_tcp_send_data() [all …]
|
| D | tcp.h | 45 int net_tcp_get(struct net_context *context); 54 int net_tcp_put(struct net_context *context); 63 int net_tcp_listen(struct net_context *context); 74 int net_tcp_accept(struct net_context *context, net_tcp_accept_cb_t cb, 104 int net_tcp_update_recv_wnd(struct net_context *context, int32_t delta);
|
| D | net_private.h | 94 extern const char *net_context_state(struct net_context *context); 95 extern bool net_context_is_reuseaddr_set(struct net_context *context); 96 extern bool net_context_is_reuseport_set(struct net_context *context); 97 extern bool net_context_is_v6only_set(struct net_context *context); 98 extern bool net_context_is_recv_pktinfo_set(struct net_context *context); 99 extern bool net_context_is_timestamping_set(struct net_context *context); 101 int net_context_get_local_addr(struct net_context *context, 107 static inline const char *net_context_state(struct net_context *context) in net_context_state() 112 static inline bool net_context_is_reuseaddr_set(struct net_context *context) in net_context_is_reuseaddr_set() 117 static inline bool net_context_is_reuseport_set(struct net_context *context) in net_context_is_reuseport_set() [all …]
|
| D | net_context.c | 81 static struct net_context contexts[NET_MAX_CONTEXT]; 88 bool net_context_is_reuseaddr_set(struct net_context *context) in net_context_is_reuseaddr_set() 97 bool net_context_is_reuseport_set(struct net_context *context) in net_context_is_reuseport_set() 106 bool net_context_is_v6only_set(struct net_context *context) in net_context_is_v6only_set() 121 bool net_context_is_recv_pktinfo_set(struct net_context *context) in net_context_is_recv_pktinfo_set() 132 bool net_context_is_timestamping_set(struct net_context *context) in net_context_is_timestamping_set() 144 static inline bool is_in_tcp_listen_state(struct net_context *context) in is_in_tcp_listen_state() 158 static inline bool is_in_tcp_time_wait_state(struct net_context *context) in is_in_tcp_time_wait_state() 175 static int check_used_port(struct net_context *context, in check_used_port() 354 static uint16_t find_available_port(struct net_context *context, in find_available_port() [all …]
|
| D | connection.h | 69 struct net_context *context; 111 struct net_context *context, 121 struct net_context *context, in net_conn_register()
|
| D | CMakeLists.txt | 22 zephyr_library_sources(net_context.c net_pkt.c) 28 zephyr_library_sources(net_context.c)
|
| /Zephyr-latest/tests/net/context/src/ |
| D | main.c | 40 static struct net_context *udp_v6_ctx; 41 static struct net_context *udp_v4_ctx; 42 static struct net_context *mcast_v6_ctx; 45 static struct net_context *tcp_v6_ctx; 46 static struct net_context *tcp_v4_ctx; 75 ZTEST(net_context, test_net_ctx_get_fail) in ZTEST() argument 77 struct net_context *context; in ZTEST() 109 ZTEST(net_context, test_net_ctx_get_success) in ZTEST() argument 111 struct net_context *context = NULL; in ZTEST() 127 ZTEST(net_context, test_net_ctx_get_all) in ZTEST() argument [all …]
|
| /Zephyr-latest/subsys/net/lib/socks/ |
| D | socks.h | 23 int net_socks5_connect(struct net_context *ctx, 27 inline int net_socks5_connect(struct net_context *ctx, in net_socks5_connect()
|
| D | socks.c | 19 static void socks5_method_rsp_cb(struct net_context *ctx, in socks5_method_rsp_cb() 43 static void socks5_cmd_rsp_cb(struct net_context *ctx, in socks5_cmd_rsp_cb() 71 static int socks5_tcp_connect(struct net_context *ctx, in socks5_tcp_connect() 188 int net_socks5_connect(struct net_context *ctx, const struct sockaddr *addr, in net_socks5_connect()
|
| /Zephyr-latest/subsys/net/lib/sockets/ |
| D | sockets_can.c | 33 struct net_context *ctx; 57 struct net_context *ctx; in zcan_socket() 89 static void zcan_received_cb(struct net_context *ctx, struct net_pkt *pkt, in zcan_received_cb() 189 static int zcan_bind_ctx(struct net_context *ctx, const struct sockaddr *addr, in zcan_bind_ctx() 225 ssize_t zcan_sendto_ctx(struct net_context *ctx, const void *buf, size_t len, in zcan_sendto_ctx() 275 static ssize_t zcan_recvfrom_ctx(struct net_context *ctx, void *buf, in zcan_recvfrom_ctx() 347 static int zcan_getsockopt_ctx(struct net_context *ctx, int level, int optname, in zcan_getsockopt_ctx() 359 static int zcan_setsockopt_ctx(struct net_context *ctx, int level, int optname, in zcan_setsockopt_ctx() 379 struct net_context *ctx) in is_already_attached() 395 static int close_socket(struct net_context *ctx) in close_socket() [all …]
|
| D | sockets_internal.h | 18 int zsock_close_ctx(struct net_context *ctx, int sock); 21 int zsock_wait_data(struct net_context *ctx, k_timeout_t *timeout); 23 static inline void sock_set_flag(struct net_context *ctx, uintptr_t mask, in sock_set_flag() 32 static inline uintptr_t sock_get_flag(struct net_context *ctx, uintptr_t mask) in sock_get_flag()
|
| D | sockets_packet.c | 45 struct net_context *ctx; in zpacket_socket() 86 static void zpacket_received_cb(struct net_context *ctx, in zpacket_received_cb() 122 static int zpacket_bind_ctx(struct net_context *ctx, in zpacket_bind_ctx() 167 static void zpacket_set_source_addr(struct net_context *ctx, in zpacket_set_source_addr() 237 ssize_t zpacket_sendto_ctx(struct net_context *ctx, const void *buf, size_t len, in zpacket_sendto_ctx() 276 ssize_t zpacket_sendmsg_ctx(struct net_context *ctx, const struct msghdr *msg, in zpacket_sendmsg_ctx() 297 ssize_t zpacket_recvfrom_ctx(struct net_context *ctx, void *buf, size_t max_len, in zpacket_recvfrom_ctx() 363 int zpacket_getsockopt_ctx(struct net_context *ctx, int level, int optname, in zpacket_getsockopt_ctx() 375 int zpacket_setsockopt_ctx(struct net_context *ctx, int level, int optname, in zpacket_setsockopt_ctx()
|
| D | sockets_inet.c | 40 static void zsock_received_cb(struct net_context *ctx, 57 static void zsock_flush_queue(struct net_context *ctx) in zsock_flush_queue() 88 struct net_context *ctx; in zsock_socket_internal() 145 int zsock_close_ctx(struct net_context *ctx, int sock) in zsock_close_ctx() 184 static void zsock_accepted_cb(struct net_context *new_ctx, in zsock_accepted_cb() 188 struct net_context *parent = user_data; in zsock_accepted_cb() 215 static void zsock_received_cb(struct net_context *ctx, in zsock_received_cb() 270 int zsock_shutdown_ctx(struct net_context *ctx, int how) in zsock_shutdown_ctx() 305 int zsock_bind_ctx(struct net_context *ctx, const struct sockaddr *addr, in zsock_bind_ctx() 332 static void zsock_connected_cb(struct net_context *ctx, int status, void *user_data) in zsock_connected_cb() [all …]
|
| /Zephyr-latest/drivers/wifi/siwx91x/ |
| D | siwx91x_wifi_socket.c | 111 static int siwx91x_sock_recv_sync(struct net_context *context, in siwx91x_sock_recv_sync() 170 enum net_ip_protocol ip_proto, struct net_context **context) in siwx91x_sock_get() 184 static int siwx91x_sock_put(struct net_context *context) in siwx91x_sock_put() 201 static int siwx91x_sock_bind(struct net_context *context, in siwx91x_sock_bind() 230 static int siwx91x_sock_connect(struct net_context *context, in siwx91x_sock_connect() 255 static int siwx91x_sock_listen(struct net_context *context, int backlog) in siwx91x_sock_listen() 268 static int siwx91x_sock_accept(struct net_context *context, in siwx91x_sock_accept() 273 struct net_context *newcontext; in siwx91x_sock_accept() 317 struct net_context *context = pkt->context; in siwx91x_sock_sendto() 367 static int siwx91x_sock_recv(struct net_context *context, in siwx91x_sock_recv()
|
| D | siwx91x_wifi.h | 31 struct net_context *context;
|
| /Zephyr-latest/drivers/wifi/eswifi/ |
| D | eswifi_offload.c | 23 static int eswifi_off_bind(struct net_context *context, in eswifi_off_bind() 39 static int eswifi_off_listen(struct net_context *context, int backlog) in eswifi_off_listen() 70 struct net_context *context; in eswifi_off_connect_work() 99 static int eswifi_off_connect(struct net_context *context, in eswifi_off_connect() 152 static int eswifi_off_accept(struct net_context *context, in eswifi_off_accept() 225 struct net_context *context; in eswifi_off_send_work() 352 static int eswifi_off_recv(struct net_context *context, in eswifi_off_recv() 384 static int eswifi_off_put(struct net_context *context) in eswifi_off_put() 410 struct net_context **context) in eswifi_off_get()
|
| D | eswifi_offload.h | 33 struct net_context *context;
|
| /Zephyr-latest/doc/connectivity/networking/api/ |
| D | net_context.rst | 6 The net_context API is not meant for application use. Application should use
|
| D | apis.rst | 16 net_context.rst
|
| /Zephyr-latest/tests/net/context/ |
| D | CMakeLists.txt | 5 project(net_context) project
|
| /Zephyr-latest/tests/net/tcp/src/ |
| D | main.c | 598 struct net_context *ctx; in ZTEST() 660 struct net_context *ctx; in ZTEST() 779 static void test_tcp_recv_cb(struct net_context *context, in test_tcp_recv_cb() 795 static struct net_context *accepted_ctx; 797 static void test_tcp_accept_cb(struct net_context *ctx, in test_tcp_accept_cb() 830 struct net_context *ctx; in ZTEST() 899 struct net_context *ctx; in ZTEST() 968 struct net_context *ctx; in ZTEST() 1043 struct net_context *ctx; in ZTEST() 1105 struct net_context *ctx; in ZTEST() [all …]
|
| /Zephyr-latest/subsys/net/lib/shell/ |
| D | tcp.c | 16 static struct net_context *tcp_ctx; 22 static void tcp_connected(struct net_context *context, in tcp_connected() 102 struct net_context **ctx) in tcp_connect() 217 static void tcp_sent_cb(struct net_context *context, in tcp_sent_cb() 223 static void tcp_recv_cb(struct net_context *context, struct net_pkt *pkt, in tcp_recv_cb()
|
| /Zephyr-latest/drivers/wifi/esp_at/ |
| D | esp_offload.c | 23 static int esp_listen(struct net_context *context, int backlog) in esp_listen() 149 static int esp_bind(struct net_context *context, const struct sockaddr *addr, in esp_bind() 179 static int esp_connect(struct net_context *context, in esp_connect() 223 static int esp_accept(struct net_context *context, in esp_accept() 365 struct net_context *context = sock->context; in esp_socket_send_one_pkt() 422 struct net_context *context; in esp_sendto() 653 static int esp_recv(struct net_context *context, in esp_recv() 696 static int esp_put(struct net_context *context) in esp_put() 734 struct net_context **context) in esp_get()
|