Home
last modified time | relevance | path

Searched refs:sock_fd (Results 1 – 18 of 18) sorted by relevance

/Zephyr-latest/subsys/net/lib/lwm2m/
Dlwm2m_engine.c137 if (client_ctx->sock_fd < 0) { in lwm2m_open_socket()
141 client_ctx->sock_fd = zsock_socket(client_ctx->remote_addr.sa_family, in lwm2m_open_socket()
144 client_ctx->sock_fd = in lwm2m_open_socket()
149 if (client_ctx->sock_fd < 0) { in lwm2m_open_socket()
164 if (client_ctx->sock_fd >= 0) { in lwm2m_close_socket()
165 int ret = zsock_close(client_ctx->sock_fd); in lwm2m_close_socket()
174 client_ctx->sock_fd = -1; in lwm2m_close_socket()
189 if (client_ctx->sock_fd >= 0 && !client_ctx->connection_suspended) { in lwm2m_socket_suspend()
190 int socket_temp_id = client_ctx->sock_fd; in lwm2m_socket_suspend()
193 client_ctx->sock_fd = -1; in lwm2m_socket_suspend()
[all …]
Dlwm2m_rd_client.c597 if (client.ctx->sock_fd > -1) { in do_update_timeout_cb()
802 if (client.ctx->sock_fd > -1) { in sm_do_bootstrap_reg()
1051 if (client.ctx->sock_fd > -1) { in sm_do_registration()
1423 if (client.ctx->sock_fd > -1) { in lwm2m_rd_client_service()
1555 if (client.ctx && (client.engine_state != ENGINE_IDLE || client.ctx->sock_fd != -1)) { in lwm2m_rd_client_start()
1566 client.ctx->sock_fd = -1; in lwm2m_rd_client_start()
Dlwm2m_pull_context.c450 context.firmware_ctx.sock_fd = -1; in lwm2m_pull_context_start_transfer()
Dlwm2m_message_handling.c798 ret = zsock_send(client_ctx->sock_fd, msg->cpkt.data, msg->cpkt.offset, 0); in lwm2m_send_empty_ack()
/Zephyr-latest/subsys/net/lib/coap/
Dcoap_server.c124 static int coap_server_process(int sock_fd) in coap_server_process() argument
139 received = zsock_recvfrom(sock_fd, buf, sizeof(buf), ZSOCK_MSG_DONTWAIT, &client_addr, in coap_server_process()
161 if (svc->data->sock_fd == sock_fd) { in coap_server_process()
266 if (service->data->sock_fd < 0) { in coap_server_retransmit()
283 ret = zsock_sendto(service->data->sock_fd, pending->data, pending->len, 0, in coap_server_retransmit()
310 if (svc->data->sock_fd < -1) { in coap_server_poll_timeout()
385 if (service->data->sock_fd >= 0) { in coap_service_start()
426 service->data->sock_fd = zsock_socket(af, SOCK_DGRAM, IPPROTO_UDP); in coap_service_start()
427 if (service->data->sock_fd < 0) { in coap_service_start()
432 ret = zsock_fcntl(service->data->sock_fd, F_SETFL, O_NONBLOCK); in coap_service_start()
[all …]
Dcoap_server_shell.c28 service->data->sock_fd < 0 ? "INACTIVE" : "ACTIVE", in cmd_list()
/Zephyr-latest/drivers/modem/
Dmodem_socket.h37 int sock_fd; member
76 struct modem_socket *modem_socket_from_fd(struct modem_socket_config *cfg, int sock_fd);
79 void modem_socket_put(struct modem_socket_config *cfg, int sock_fd);
Dmodem_socket.c167 cfg->sockets[i].sock_fd = zvfs_reserve_fd(); in modem_socket_get()
168 if (cfg->sockets[i].sock_fd < 0) { in modem_socket_get()
178 zvfs_finalize_typed_fd(cfg->sockets[i].sock_fd, &cfg->sockets[i], in modem_socket_get()
182 return cfg->sockets[i].sock_fd; in modem_socket_get()
185 struct modem_socket *modem_socket_from_fd(struct modem_socket_config *cfg, int sock_fd) in modem_socket_from_fd() argument
192 if (cfg->sockets[i].sock_fd == sock_fd) { in modem_socket_from_fd()
230 void modem_socket_put(struct modem_socket_config *cfg, int sock_fd) in modem_socket_put() argument
232 struct modem_socket *sock = modem_socket_from_fd(cfg, sock_fd); in modem_socket_put()
241 sock->sock_fd = -1; in modem_socket_put()
Dquectel-bg9x.c212 modem_socket_put(&mdata.socket_config, sock->sock_fd); in socket_close()
386 return on_cmd_sockread_common(mdata.sock_fd, data, len); in MODEM_CMD_DEFINE()
393 int sock_fd; in MODEM_CMD_DEFINE() local
395 sock_fd = ATOI(argv[0], 0, "sock_fd"); in MODEM_CMD_DEFINE()
398 sock = modem_socket_from_fd(&mdata.socket_config, sock_fd); in MODEM_CMD_DEFINE()
404 LOG_INF("Data Receive Indication for socket: %d", sock_fd); in MODEM_CMD_DEFINE()
414 int sock_fd; in MODEM_CMD_DEFINE() local
416 sock_fd = ATOI(argv[0], 0, "sock_fd"); in MODEM_CMD_DEFINE()
417 sock = modem_socket_from_fd(&mdata.socket_config, sock_fd); in MODEM_CMD_DEFINE()
422 LOG_INF("Socket Close Indication for socket: %d", sock_fd); in MODEM_CMD_DEFINE()
[all …]
Dquectel-bg9x.h111 int sock_fd; member
Dsimcom-sim7080.c148 LOG_ERR("Invalid socket id %d from fd %d", sock->id, sock->sock_fd); in offload_connect()
154 LOG_ERR("Socket is already connected! id: %d, fd: %d", sock->id, sock->sock_fd); in offload_connect()
179 LOG_ERR("Failed to build connect command. ID: %d, FD: %d", sock->id, sock->sock_fd); in offload_connect()
420 mdata.current_sock_fd = sock->sock_fd; in offload_recvfrom()
513 modem_socket_put(&mdata.socket_config, sock->sock_fd); in socket_close()
870 int sock_fd; in MODEM_CMD_DEFINE() local
872 sock_fd = atoi(argv[0]); in MODEM_CMD_DEFINE()
874 sock = modem_socket_from_fd(&mdata.socket_config, sock_fd); in MODEM_CMD_DEFINE()
882 LOG_INF("Data available on socket: %d", sock_fd); in MODEM_CMD_DEFINE()
Dublox-sara-r4.c750 modem_socket_put(&mdata.socket_config, sock->sock_fd); in MODEM_CMD_DEFINE()
1464 modem_socket_put(&mdata.socket_config, sock->sock_fd); in create_socket()
1512 modem_socket_put(&mdata.socket_config, sock->sock_fd); in offload_close()
1551 sock->id, sock->sock_fd); in offload_connect()
/Zephyr-latest/tests/net/lib/lwm2m/lwm2m_engine/src/
Dmain.c104 ctx.sock_fd = -1; in ZTEST()
134 ctx.sock_fd = -1; in ZTEST()
180 ctx.sock_fd = -1; in ZTEST()
195 ctx.sock_fd = -1; in ZTEST()
213 ctx.sock_fd = -1; in ZTEST()
236 ctx.sock_fd = -1; in ZTEST()
348 ctx.sock_fd = -1; in ZTEST()
380 ctx.sock_fd = -1; in ZTEST()
403 ctx.sock_fd = -1; in ZTEST()
434 ctx.sock_fd = -1; in ZTEST()
[all …]
/Zephyr-latest/tests/net/lib/lwm2m/interop/src/
Dlwm2m-client.c70 ret = zsock_setsockopt(ctx->sock_fd, SOL_TLS, TLS_DTLS_CID, &cid, in set_socketoptions()
83 zsock_setsockopt(ctx->sock_fd, SOL_TLS, TLS_DTLS_HANDSHAKE_TIMEOUT_MIN, &min, in set_socketoptions()
85 zsock_setsockopt(ctx->sock_fd, SOL_TLS, TLS_DTLS_HANDSHAKE_TIMEOUT_MAX, &max, in set_socketoptions()
251 client.sock_fd = -1; in main()
/Zephyr-latest/include/zephyr/net/
Dcoap_service.h46 int sock_fd; member
63 .sock_fd = -1, \
Dlwm2m.h297 int sock_fd; member
/Zephyr-latest/tests/net/lib/lwm2m/lwm2m_rd_client/src/
Dmain.c402 ctx.sock_fd = 100; in ZTEST()
/Zephyr-latest/doc/releases/
Drelease-notes-2.0.rst700 * :github:`18238` - drivers/modem/modem_socket: modem_socket_put() sock_fd parameter not handled co…