| /Zephyr-4.2.1/drivers/wifi/eswifi/ |
| D | eswifi_offload.c | 27 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 …]
|
| D | eswifi_socket.c | 37 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 …]
|
| D | eswifi_socket_offload.c | 45 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 …]
|
| D | eswifi.h | 77 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-4.2.1/subsys/net/lib/ptp/ |
| D | transport.c | 42 int socket = zsock_socket(addr->sa_family, NET_SOCK_DGRAM, NET_IPPROTO_UDP); in transport_socket_open() local 49 if (socket < 0) { in transport_socket_open() 53 if (zsock_setsockopt(socket, ZSOCK_SOL_SOCKET, ZSOCK_SO_REUSEADDR, in transport_socket_open() 59 if (zsock_bind(socket, addr, sizeof(*addr))) { in transport_socket_open() 65 if (cnt > 0 && zsock_setsockopt(socket, in transport_socket_open() 74 if (zsock_setsockopt(socket, ZSOCK_SOL_SOCKET, ZSOCK_SO_TIMESTAMPING, in transport_socket_open() 80 if (zsock_setsockopt(socket, ZSOCK_SOL_SOCKET, ZSOCK_SO_PRIORITY, in transport_socket_open() 86 return socket; in transport_socket_open() 88 zsock_close(socket); in transport_socket_open() 100 zsock_setsockopt(port->socket[1], NET_IPPROTO_IP, in transport_join_multicast() [all …]
|
| /Zephyr-4.2.1/doc/connectivity/networking/api/ |
| D | sockets.rst | 29 config option and implements the following operations: ``socket()``, ``close()``, 61 what socket types are available: 96 sample applications to learn how to create a simple server or client BSD socket based 104 Zephyr provides an extension of standard POSIX socket API, allowing to create 108 protocols with standard socket calls. See :c:enum:`net_ip_protocol_secure` type 125 later on to reference the credential during secure socket configuration with 126 socket options. 150 A secure socket can be created by specifying secure protocol type, for instance: 154 sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TLS_1_2); 156 Once created, it can be configured with socket options. For instance, the [all …]
|
| D | socket_service.rst | 13 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 …]
|
| D | websocket.rst | 32 First a socket needs to be created and connected to the Websocket server: 36 sock = socket(family, SOCK_STREAM, IPPROTO_TCP); 41 The Websocket transport socket is then created like this: 47 The Websocket socket can then be used to send or receive data, and the 50 BSD socket API functions can be used to send and receive application data. 60 If normal BSD socket functions are used, then currently only TEXT data 64 When done, the Websocket transport socket must be closed. User should handle 65 the lifecycle(close/reuse) of tcp socket after websocket_disconnect.
|
| D | index.rst | 6 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.
|
| D | net_offload.rst | 35 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-4.2.1/samples/net/cellular_modem/server/ |
| D | te_udp_echo.py | 4 import socket 21 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
| D | te_udp_receive.py | 4 import socket 56 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
| /Zephyr-4.2.1/include/zephyr/tracing/ |
| D | tracing.h | 2167 #define sys_port_trace_socket_init(socket, family, type, proto) argument 2173 #define sys_port_trace_socket_close_enter(socket) argument 2180 #define sys_port_trace_socket_close_exit(socket, ret) argument 2187 #define sys_port_trace_socket_shutdown_enter(socket, how) argument 2194 #define sys_port_trace_socket_shutdown_exit(socket, ret) argument 2202 #define sys_port_trace_socket_bind_enter(socket, addr, addrlen) argument 2209 #define sys_port_trace_socket_bind_exit(socket, ret) argument 2217 #define sys_port_trace_socket_connect_enter(socket, addr, addrlen) argument 2224 #define sys_port_trace_socket_connect_exit(socket, ret) argument 2231 #define sys_port_trace_socket_listen_enter(socket, backlog) argument [all …]
|
| /Zephyr-4.2.1/samples/net/sockets/can/ |
| D | README.rst | 1 .. 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-4.2.1/subsys/net/lib/sockets/ |
| D | sockets.c | 126 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 …]
|
| D | Kconfig | 20 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. 83 The maximum time a socket is waiting for a blocked connection before 91 The socket service can monitor multiple sockets and save memory 92 by only having one thread listening socket data. If data is received 93 in the monitored socket, a user supplied work is called. 103 The socket service opens a permanent zvfs_eventfd, which consumes a file [all …]
|
| /Zephyr-4.2.1/scripts/coredump/gdbstubs/ |
| D | gdbstub.py | 20 self.socket = None 36 socket = self.socket 37 if socket is None: 44 ch = socket.recv(1) 50 ch = socket.recv(1) 59 ch = socket.recv(2) 67 socket.send(b'+') 73 socket.send(b'-') 78 socket = self.socket 79 if socket is None: [all …]
|
| /Zephyr-4.2.1/scripts/coredump/ |
| D | coredump_gdbserver.py | 10 import socket 118 gdbserver = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 122 gdbserver.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
| /Zephyr-4.2.1/samples/net/sockets/txtime/ |
| D | Kconfig | 14 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
|
| /Zephyr-4.2.1/drivers/wifi/winc1500/ |
| D | wifi_winc1500.c | 330 SOCKET socket = (intptr_t)context->offload_context; in winc1500_bind() local 346 if (k_sem_take(&w1500_data.socket_data[socket].wait_sem, in winc1500_bind() 352 return w1500_data.socket_data[socket].ret_code; in winc1500_bind() 361 SOCKET socket = (intptr_t)context->offload_context; in winc1500_listen() local 371 if (k_sem_take(&w1500_data.socket_data[socket].wait_sem, in winc1500_listen() 376 return w1500_data.socket_data[socket].ret_code; in winc1500_listen() 390 SOCKET socket = (intptr_t)context->offload_context; in winc1500_connect() local 393 w1500_data.socket_data[socket].connect_cb = cb; in winc1500_connect() 394 w1500_data.socket_data[socket].connect_user_data = user_data; in winc1500_connect() 395 w1500_data.socket_data[socket].ret_code = 0; in winc1500_connect() [all …]
|
| /Zephyr-4.2.1/samples/net/sockets/packet/ |
| D | README.rst | 1 .. 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-4.2.1/samples/net/sockets/net_mgmt/ |
| D | README.rst | 2 :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-4.2.1/doc/connectivity/networking/ |
| D | network_tracing.rst | 10 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-4.2.1/boards/shields/arduino_uno_click/doc/ |
| D | index.rst | 17 ``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-4.2.1/samples/net/latmon/src/ |
| D | main.c | 209 int client, socket = 0; in main() local 244 socket = net_latmon_get_socket(NULL); in main() 245 if (socket < 0) { in main() 246 LOG_ERR("Failed to get a socket to latmon (errno %d)", socket); in main() 253 client = net_latmon_connect(socket, in main() 269 zsock_close(socket); in main()
|