Home
last modified time | relevance | path

Searched refs:socket (Results 1 – 25 of 201) sorted by relevance

123456789

/Zephyr-latest/drivers/wifi/eswifi/
Deswifi_offload.c27 struct eswifi_off_socket *socket = context->offload_context; in eswifi_off_bind() local
33 err = __eswifi_bind(eswifi, socket, addr, addrlen); in eswifi_off_bind()
41 struct eswifi_off_socket *socket = context->offload_context; in eswifi_off_listen() local
49 __select_socket(eswifi, socket->index); in eswifi_off_listen()
59 socket->is_server = true; in eswifi_off_listen()
68 struct eswifi_off_socket *socket; in eswifi_off_connect_work() local
75 socket = CONTAINER_OF(work, struct eswifi_off_socket, connect_work); in eswifi_off_connect_work()
76 eswifi = eswifi_socket_to_dev(socket); in eswifi_off_connect_work()
80 cb = socket->conn_cb; in eswifi_off_connect_work()
81 context = socket->context; in eswifi_off_connect_work()
[all …]
Deswifi_socket.c37 struct eswifi_off_socket *socket) in __stop_socket() argument
42 LOG_DBG("Stopping socket %d", socket->index); in __stop_socket()
43 if (socket->state != ESWIFI_SOCKET_STATE_CONNECTED) { in __stop_socket()
47 socket->state = ESWIFI_SOCKET_STATE_NONE; in __stop_socket()
48 return eswifi_at_cmd(eswifi, socket->is_server ? cmd_srv : cmd_cli); in __stop_socket()
77 int __eswifi_bind(struct eswifi_dev *eswifi, struct eswifi_off_socket *socket, in __eswifi_bind() argument
87 __select_socket(eswifi, socket->index); in __eswifi_bind()
88 socket->port = sys_be16_to_cpu(net_sin(addr)->sin_port); in __eswifi_bind()
91 snprintk(eswifi->buf, sizeof(eswifi->buf), "P2=%d\r", socket->port); in __eswifi_bind()
98 if (socket->type == ESWIFI_TRANSPORT_UDP) { in __eswifi_bind()
[all …]
Deswifi_socket_offload.c45 struct eswifi_off_socket *socket = user_data; in __process_received() local
48 k_fifo_cancel_wait(&socket->fifo); in __process_received()
52 k_fifo_put(&socket->fifo, pkt); in __process_received()
59 struct eswifi_off_socket *socket; in eswifi_socket_connect() local
73 socket = &eswifi->socket[sock]; in eswifi_socket_connect()
75 if (socket->state != ESWIFI_SOCKET_STATE_NONE) { in eswifi_socket_connect()
80 socket->peer_addr = *addr; in eswifi_socket_connect()
81 socket->state = ESWIFI_SOCKET_STATE_CONNECTING; in eswifi_socket_connect()
83 ret = __eswifi_off_start_client(eswifi, socket); in eswifi_socket_connect()
85 socket->state = ESWIFI_SOCKET_STATE_CONNECTED; in eswifi_socket_connect()
[all …]
Deswifi.h77 struct eswifi_off_socket socket[ESWIFI_OFFLOAD_MAX_SOCKETS]; member
120 struct eswifi_dev *eswifi_socket_to_dev(struct eswifi_off_socket *socket) in eswifi_socket_to_dev() argument
122 return CONTAINER_OF(socket - socket->index, struct eswifi_dev, socket[0]); in eswifi_socket_to_dev()
136 struct eswifi_off_socket *socket);
140 struct eswifi_off_socket *socket);
141 int __eswifi_listen(struct eswifi_dev *eswifi, struct eswifi_off_socket *socket, int backlog);
142 int __eswifi_accept(struct eswifi_dev *eswifi, struct eswifi_off_socket *socket);
143 int __eswifi_bind(struct eswifi_dev *eswifi, struct eswifi_off_socket *socket,
/Zephyr-latest/subsys/net/lib/ptp/
Dtransport.c34 int socket = zsock_socket(addr->sa_family, SOCK_DGRAM, IPPROTO_UDP); in transport_socket_open() local
41 if (socket < 0) { in transport_socket_open()
45 if (zsock_setsockopt(socket, SOL_SOCKET, SO_REUSEADDR, &feature_on, sizeof(feature_on))) { in transport_socket_open()
50 if (zsock_bind(socket, addr, sizeof(*addr))) { in transport_socket_open()
56 if (cnt > 0 && zsock_setsockopt(socket, in transport_socket_open()
65 if (zsock_setsockopt(socket, SOL_SOCKET, SO_TIMESTAMPING, &ts_mask, sizeof(ts_mask))) { in transport_socket_open()
70 if (zsock_setsockopt(socket, SOL_SOCKET, SO_PRIORITY, &priority, sizeof(priority))) { in transport_socket_open()
75 return socket; in transport_socket_open()
77 zsock_close(socket); in transport_socket_open()
89 zsock_setsockopt(port->socket[1], IPPROTO_IP, in transport_join_multicast()
[all …]
/Zephyr-latest/doc/connectivity/networking/api/
Dsockets.rst29 config option and implements the following operations: ``socket()``, ``close()``,
61 sample applications to learn how to create a simple server or client BSD socket based
69 Zephyr provides an extension of standard POSIX socket API, allowing to create
73 protocols with standard socket calls. See :c:enum:`net_ip_protocol_secure` type
90 later on to reference the credential during secure socket configuration with
91 socket options.
115 A secure socket can be created by specifying secure protocol type, for instance:
119 sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TLS_1_2);
121 Once created, it can be configured with socket options. For instance, the
139 Once configured, socket can be used just like a regular TCP socket.
[all …]
Dsocket_service.rst13 The socket service API can be used to install a handler that is called if there
14 is data received on a socket. The API helps to avoid creating a dedicated thread
20 to create a simple BSD socket based server application using the sockets service API.
32 Define a network socket service. This socket service is created with extern
37 Define a network socket service with static scope. This socket service can only
53 listening socket.
58 If the socket service API is enabled, an application must create the service like
87 * user data that was stored in the socket service when it was
94 The application needs to create the sockets, then register them to the socket
95 service after which the socket service thread will start to call the callback
[all …]
Dwebsocket.rst33 First a socket needs to be created and connected to the Websocket server:
37 sock = socket(family, SOCK_STREAM, IPPROTO_TCP);
42 The Websocket transport socket is then created like this:
48 The Websocket socket can then be used to send or receive data, and the
51 BSD socket API functions can be used to send and receive application data.
61 If normal BSD socket functions are used, then currently only TEXT data
65 When done, the Websocket transport socket must be closed. User should handle
66 the lifecycle(close/reuse) of tcp socket after websocket_disconnect.
Dindex.rst6 Zephyr provides support for the standard BSD socket APIs (defined in
7 :zephyr_file:`include/zephyr/net/socket.h`) for the applications to
8 use. See :ref:`BSD socket API <bsd_sockets_interface>` for more details.
Dnet_offload.rst35 functionality at the socket API level. With this approach, vendors who provide an
36 alternate implementation of the networking stack, exposing socket API for their
40 implementation on how to integrate network offloading at socket level.
/Zephyr-latest/samples/net/cellular_modem/server/
Dte_udp_echo.py4 import socket
21 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
Dte_udp_receive.py4 import socket
56 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
/Zephyr-latest/include/zephyr/tracing/
Dtracing.h2203 #define sys_port_trace_socket_init(socket, family, type, proto) argument
2209 #define sys_port_trace_socket_close_enter(socket) argument
2216 #define sys_port_trace_socket_close_exit(socket, ret) argument
2223 #define sys_port_trace_socket_shutdown_enter(socket, how) argument
2230 #define sys_port_trace_socket_shutdown_exit(socket, ret) argument
2238 #define sys_port_trace_socket_bind_enter(socket, addr, addrlen) argument
2245 #define sys_port_trace_socket_bind_exit(socket, ret) argument
2253 #define sys_port_trace_socket_connect_enter(socket, addr, addrlen) argument
2260 #define sys_port_trace_socket_connect_exit(socket, ret) argument
2267 #define sys_port_trace_socket_listen_enter(socket, backlog) argument
[all …]
/Zephyr-latest/samples/net/sockets/can/
DREADME.rst1 .. zephyr:code-sample:: socket-can
10 The socket CAN sample is a server/client application that sends and receives
11 raw CAN frames using BSD socket API.
15 * Setup function which creates a CAN socket, binds it to a CAN network
16 interface, and then installs a CAN filter to the socket so that the
18 * Receive function which starts to listen the CAN socket and prints
34 Build the socket CAN sample application like this:
/Zephyr-latest/subsys/net/lib/sockets/
DKconfig20 Default processing priority for socket implementations. This defines
21 the order of processing of particular socket implementations when
22 creating a new socket, lower value indicate earlier processing. This
23 allows to for instance prioritize offloaded socket processing during
24 socket creation over the native one, or vice versa.
76 The maximum time a socket is waiting for a blocked connection before
83 The socket service can monitor multiple sockets and save memory
84 by only having one thread listening socket data. If data is received
85 in the monitored socket, a user supplied work is called.
92 int "Priority of the socket service dispatcher thread"
[all …]
Dsockets.c126 SYS_PORT_TRACING_OBJ_INIT(socket, ret < 0 ? -errno : ret, in z_impl_zsock_socket()
135 SYS_PORT_TRACING_OBJ_INIT(socket, -errno, family, type, proto); in z_impl_zsock_socket()
182 SYS_PORT_TRACING_OBJ_FUNC_ENTER(socket, shutdown, sock, how); in z_impl_zsock_shutdown()
187 SYS_PORT_TRACING_OBJ_FUNC_EXIT(socket, shutdown, sock, -errno); in z_impl_zsock_shutdown()
193 SYS_PORT_TRACING_OBJ_FUNC_EXIT(socket, shutdown, sock, -errno); in z_impl_zsock_shutdown()
205 SYS_PORT_TRACING_OBJ_FUNC_EXIT(socket, shutdown, sock, ret < 0 ? -errno : ret); in z_impl_zsock_shutdown()
222 SYS_PORT_TRACING_OBJ_FUNC_ENTER(socket, bind, sock, addr, addrlen); in z_impl_zsock_bind()
226 SYS_PORT_TRACING_OBJ_FUNC_EXIT(socket, bind, sock, ret < 0 ? -errno : ret); in z_impl_zsock_bind()
251 SYS_PORT_TRACING_OBJ_FUNC_ENTER(socket, connect, sock, addr, addrlen); in z_impl_zsock_connect()
255 SYS_PORT_TRACING_OBJ_FUNC_EXIT(socket, connect, sock, in z_impl_zsock_connect()
[all …]
/Zephyr-latest/scripts/coredump/gdbstubs/
Dgdbstub.py21 self.socket = None
37 socket = self.socket
38 if socket is None:
45 ch = socket.recv(1)
51 ch = socket.recv(1)
60 ch = socket.recv(2)
68 socket.send(b'+')
74 socket.send(b'-')
79 socket = self.socket
80 if socket is None:
[all …]
/Zephyr-latest/scripts/coredump/
Dcoredump_gdbserver.py10 import socket
123 gdbserver = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
127 gdbserver.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
/Zephyr-latest/subsys/net/lib/mqtt/
DKconfig28 bool "TLS support for socket MQTT Library"
30 Enable TLS support for socket MQTT Library
36 Enable ALPN protocol for socket MQTT Library.
39 bool "Websocket support for socket MQTT Library"
41 Enable Websocket support for socket MQTT Library.
44 bool "Custom transport support for socket MQTT Library"
46 Enable custom transport support for socket MQTT Library.
/Zephyr-latest/drivers/wifi/winc1500/
Dwifi_winc1500.c332 SOCKET socket = (intptr_t)context->offload_context; in winc1500_bind() local
348 if (k_sem_take(&w1500_data.socket_data[socket].wait_sem, in winc1500_bind()
354 return w1500_data.socket_data[socket].ret_code; in winc1500_bind()
363 SOCKET socket = (intptr_t)context->offload_context; in winc1500_listen() local
373 if (k_sem_take(&w1500_data.socket_data[socket].wait_sem, in winc1500_listen()
378 return w1500_data.socket_data[socket].ret_code; in winc1500_listen()
392 SOCKET socket = (intptr_t)context->offload_context; in winc1500_connect() local
395 w1500_data.socket_data[socket].connect_cb = cb; in winc1500_connect()
396 w1500_data.socket_data[socket].connect_user_data = user_data; in winc1500_connect()
397 w1500_data.socket_data[socket].ret_code = 0; in winc1500_connect()
[all …]
/Zephyr-latest/samples/net/sockets/packet/
DREADME.rst1 .. zephyr:code-sample:: packet-socket
2 :name: Packet socket
10 This sample is a simple packet socket application showing usage
19 When the application is run, it opens a packet socket and prints
/Zephyr-latest/doc/connectivity/networking/
Dnetwork_tracing.rst10 User can enable network core stack and socket API calls tracing.
21 BSD socket call usage in the system. It is enabled if tracing and BSD socket
22 API support are enabled. The system will start to collect what BSD socket
/Zephyr-latest/samples/net/sockets/net_mgmt/
DREADME.rst2 :name: Network management socket
5 Listen to network management events using a network management socket.
10 The net-mgmt-socket sample application for Zephyr implements a listener
28 Build net-mgmt socket sample application like this:
/Zephyr-latest/boards/shields/arduino_uno_click/doc/
Dindex.rst17 ``mikrobus_header_2``, each corresponding to a socket on the Arduino UNO
20 The first socket (``mikrobus_header_1``) is the default socket which is
35 Connecting shields should use the first socket (``mikrobus_header_1``). This
36 socket is assigned the ``mikrobus_header`` node label.
/Zephyr-latest/samples/net/sockets/txtime/
DKconfig14 when selecting UDP socket type.
26 socket to send data, or if it uses AF_PACKET (raw) socket.
29 bool "UDP socket"
31 Use UDP socket.
34 bool "Packet socket"
37 Use AF_PACKET socket. Note that currently the application sends

123456789