Home
last modified time | relevance | path

Searched full:socket (Results 1 – 25 of 508) sorted by relevance

12345678910>>...21

/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.c32 /* Default socket context (50CE) */
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()
[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.
112 Secure Socket Creation
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
[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.
/Zephyr-latest/drivers/modem/
Dmodem_socket.h2 * @brief Modem socket header file.
4 * Generic modem socket and packet size implementation for modem context
18 #include <zephyr/net/socket.h>
33 /** The number identifying the socket handle inside the modem */
36 /** The file descriptor identifying the socket in the fdtable */
48 /** socket state */
52 /** temporary socket data */
60 /* beginning socket id (modems can set this to 0 or 1 as needed) */
63 /* dynamically assign id when modem socket is allocated */
91 * @brief Initialize modem socket config struct and associated modem sockets
[all …]
/Zephyr-latest/subsys/net/lib/ptp/
Dtransport.c12 #include <zephyr/net/socket.h>
34 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()
51 LOG_ERR("Failed to bind socket"); in transport_socket_open()
56 if (cnt > 0 && zsock_setsockopt(socket, in transport_socket_open()
61 LOG_ERR("Failed to set socket binding to an interface"); 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()
[all …]
/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
80 bool "Socket service support"
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.
[all …]
/Zephyr-latest/tests/net/socket/udp/
Dtestcase.yaml5 - socket
11 net.socket.udp:
14 net.socket.udp.preempt:
17 net.socket.udp.ipv6_fragment:
20 net.socket.udp.pktinfo:
23 net.socket.udp.port_range:
26 net.socket.udp.ttl:
35 net.socket.udp.tracing:
/Zephyr-latest/drivers/net/
Dnsos_socket.h13 * @name Socket level options (NSOS_MID_SOL_SOCKET)
16 /** Socket-level option */
19 /* Socket options for NSOS_MID_SOL_SOCKET level */
25 /** Type of the socket */
34 /** Size of socket send buffer */
36 /** Size of socket recv buffer */
43 /** Socket priority */
45 /** Socket lingers on close (ignored, for compatibility) */
63 /** Bind a socket to an interface */
66 /** Socket accepts incoming connections (ignored, for compatibility) */
[all …]
/Zephyr-latest/include/zephyr/net/
Dsocket_service.h3 * @brief BSD Socket service API
6 * if there is data received to a socket.
19 * @brief BSD socket service API
20 * @defgroup bsd_socket_service BSD socket service API
29 #include <zephyr/net/socket.h>
37 /** @brief The signature for a net socket service handler function.
39 * The function will be invoked by the socket service.
41 * @param pev the socket service event that provided the handler.
46 * This struct contains information which socket triggered
50 /** Callback to be called for desired socket activity */
[all …]
Dsocket.h58 /** zsock_poll: Invalid socket (output value only) */
66 /** zsock_recv: Read data without removing it from socket input queue */
98 * @defgroup secure_sockets_options Socket options for TLS
104 * @name Socket options for TLS
109 * Here, the same socket protocol level for TLS as in Linux was used.
113 /** Socket option to select TLS credentials to use. It accepts and returns an
115 * specific socket.
118 /** Write-only socket option to set hostname. It accepts a string containing
123 /** Socket option to select ciphersuites to use. It accepts and returns an array
125 * If not set, socket will allow all ciphersuites available in the system
[all …]
Dsocket_net_mgmt.h2 * @brief NET_MGMT socket definitions.
4 * Definitions for NET_MGMT socket support.
26 * @brief Socket NET_MGMT library
27 * @defgroup socket_net_mgmt Socket NET_MGMT library
39 /* Socket NET_MGMT options */
52 * The socket domain (address family) is AF_NET_MGMT, and the type of socket
56 * The protocol (protocol type) selects for which feature the socket is used.
60 * address of this net_mgmt socket. The application is responsible for picking
Dsocket_offload.h9 * @brief Socket Offload Redirect API
16 #include <zephyr/net/socket.h>
23 * @brief An offloaded Socket DNS API interface
26 * POSIX socket API standard for arguments, return values and setting of errno.
38 * @brief Register an offloaded socket DNS API interface.
40 * @param ops A pointer to the offloaded socket DNS API interface.
/Zephyr-latest/tests/net/socket/offload_dispatcher/src/
Dmain.c12 #include <zephyr/net/socket.h>
424 zassert_true(test_sock >= 0, "Failed to create socket"); in test_socket_setup_udp()
426 "Socket should'nt have been dispatched yet"); in test_socket_setup_udp()
435 zassert_true(test_sock >= 0, "Failed to create socket"); in test_socket_setup_tls()
437 "Socket should'nt have been dispatched yet"); in test_socket_setup_tls()
451 /* Verify that socket is not dispatched when close() is called immediately after
452 * creating dispatcher socket.
462 "Socket should'nt have been dispatched"); in ZTEST()
467 /* Verify that socket is automatically dispatched to a default socket
477 "Socket should've been dispatched"); in ZTEST()
[all …]
/Zephyr-latest/subsys/net/lib/mqtt/
DKconfig1 # Socket MQTT Library for Zephyr
7 bool "Socket MQTT Library Support"
28 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.c28 /* We do not need <socket/include/socket.h>
30 * and all, ASF will not need to define it. Unfortunately its socket.h does
38 #include <socket/include/m2m_socket_host_if.h>
41 typedef void (*tpfAppSocketCb) (SOCKET sock, uint8 u8Msg, void *pvMsg);
45 NMI_API SOCKET socket(uint16 u16Domain, uint8 u8Type, uint8 u8Flags);
46 NMI_API sint8 bind(SOCKET sock, struct sockaddr *pstrAddr, uint8 u8AddrLen);
47 NMI_API sint8 listen(SOCKET sock, uint8 backlog);
48 NMI_API sint8 accept(SOCKET sock, struct sockaddr *addr, uint8 *addrlen);
49 NMI_API sint8 connect(SOCKET sock, struct sockaddr *pstrAddr, uint8 u8AddrLen);
50 NMI_API sint16 recv(SOCKET sock, void *pvRecvBuf,
[all …]
/Zephyr-latest/tests/net/socket/misc/
Dtestcase.yaml7 - socket
10 net.socket.misc:
13 net.socket.misc.userspace:
16 net.socket.misc.v4_mapping_to_v6_enabled:
19 net.socket.misc.v4_mapping_to_v6_disabled:
/Zephyr-latest/modules/thrift/src/thrift/transport/
DTSSLServerSocket.h22 * Server socket that accepts SSL connections.
31 * @param factory SSL socket factory implementation
40 * @param factory SSL socket factory implementation
49 * @param sendTimeout Socket send timeout
50 * @param recvTimeout Socket receive timeout
51 * @param factory SSL socket factory implementation
60 std::shared_ptr<TSocket> createSocket(THRIFT_SOCKET socket) override;
DTSSLSocket.h16 #include <zephyr/posix/sys/socket.h>
59 * OpenSSL implementation for SSL socket interface.
79 * Determine whether the SSL socket is server or client mode.
102 * Determines whether SSL Socket is libevent safe or not.
124 * Constructor, create an instance of TSSLSocket given an existing socket.
126 * @param socket An existing socket
128 TSSLSocket(std::shared_ptr<SSLContext> ctx, THRIFT_SOCKET socket,
131 * Constructor, create an instance of TSSLSocket given an existing socket that can be
134 * @param socket An existing socket
136 TSSLSocket(std::shared_ptr<SSLContext> ctx, THRIFT_SOCKET socket,
[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/tests/net/socket/socketpair/
Dtestcase.yaml4 - socket
15 net.socket.socketpair: {}
16 net.socket.socketpair.newlib:
20 net.socket.socketpair.picolibc:
24 net.socket.socketpair.high_mem:
/Zephyr-latest/tests/net/socket/register/
Dtestcase.yaml5 - socket
6 - socket.register
8 net.socket.register:
11 net.socket.register.tls:
/Zephyr-latest/tests/net/socket/tls/
Dtestcase.yaml7 - socket
14 net.socket.tls:
17 net.socket.tls.preempt:
21 net.socket.tls.sendmsg_no_buf:
/Zephyr-latest/include/zephyr/tracing/
Dtracing.h2119 * @brief Network Socket Tracing APIs
2120 * @defgroup subsys_tracing_apis_socket Network Socket Tracing APIs
2126 * @param socket Network socket is returned
2127 * @param family Socket address family
2128 * @param type Socket type
2129 * @param proto Socket protocol
2131 #define sys_port_trace_socket_init(socket, family, type, proto) argument
2135 * @param socket Socket object
2137 #define sys_port_trace_socket_close_enter(socket) argument
2140 * @brief Trace network socket close attempt
[all …]

12345678910>>...21