Home
last modified time | relevance | path

Searched refs:udp (Results 1 – 25 of 56) sorted by relevance

123

/Zephyr-Core-3.7.0/subsys/net/lib/mqtt_sn/
Dmqtt_sn_transport_udp.c44 struct mqtt_sn_transport_udp *udp = UDP_TRANSPORT(transport); in tp_udp_init() local
47 udp->sock = zsock_socket(udp->gwaddr.sa_family, SOCK_DGRAM, 0); in tp_udp_init()
48 if (udp->sock < 0) { in tp_udp_init()
52 LOG_DBG("Socket %d", udp->sock); in tp_udp_init()
57 out = get_ip_str((struct sockaddr *)&udp->gwaddr, ip, sizeof(ip)); in tp_udp_init()
60 ntohs(((struct sockaddr_in *)&udp->gwaddr)->sin_port)); in tp_udp_init()
64 err = zsock_connect(udp->sock, (struct sockaddr *)&udp->gwaddr, udp->gwaddrlen); in tp_udp_init()
74 struct mqtt_sn_transport_udp *udp = UDP_TRANSPORT(transport); in tp_udp_deinit() local
76 zsock_close(udp->sock); in tp_udp_deinit()
81 struct mqtt_sn_transport_udp *udp = UDP_TRANSPORT(client->transport); in tp_udp_msg_send() local
[all …]
/Zephyr-Core-3.7.0/samples/net/sockets/echo_server/src/
Dudp.c43 data->udp.sock = socket(bind_addr->sa_family, SOCK_DGRAM, in start_udp_proto()
46 data->udp.sock = socket(bind_addr->sa_family, SOCK_DGRAM, IPPROTO_UDP); in start_udp_proto()
48 if (data->udp.sock < 0) { in start_udp_proto()
63 ret = setsockopt(data->udp.sock, SOL_TLS, TLS_SEC_TAG_LIST, in start_udp_proto()
72 ret = setsockopt(data->udp.sock, SOL_TLS, TLS_DTLS_ROLE, in start_udp_proto()
97 ret = bind(data->udp.sock, bind_addr, bind_addrlen); in start_udp_proto()
119 received = recvfrom(data->udp.sock, data->udp.recv_buffer, in process_udp()
120 sizeof(data->udp.recv_buffer), 0, in process_udp()
130 atomic_add(&data->udp.bytes_received, received); in process_udp()
133 ret = sendto(data->udp.sock, data->udp.recv_buffer, received, 0, in process_udp()
[all …]
Dcommon.h46 } udp; member
/Zephyr-Core-3.7.0/samples/net/sockets/echo_client/src/
Dudp.c113 conf.ipv4.udp.ctrl = &udp4_ctrl; in init_udp()
118 conf.ipv6.udp.ctrl = &udp6_ctrl; in init_udp()
144 data->udp.expecting = sys_rand32_get() % ipsum_len; in send_udp_data()
145 } while (data->udp.expecting == 0U || in send_udp_data()
146 data->udp.expecting > data->udp.mtu); in send_udp_data()
148 ret = send(data->udp.sock, lorem_ipsum, data->udp.expecting, 0); in send_udp_data()
151 LOG_DBG("%s UDP: Sent %d bytes", data->proto, data->udp.expecting); in send_udp_data()
154 k_timer_start(&data->udp.ctrl->rx_timer, UDP_WAIT, K_NO_WAIT); in send_udp_data()
161 if (received != data->udp.expecting) { in compare_udp_data()
178 struct data *data = (ctrl == conf.ipv4.udp.ctrl) ? &conf.ipv4 : &conf.ipv6; in wait_reply()
[all …]
Decho-client.c62 .udp.sock = INVALID_SOCK,
67 .udp.sock = INVALID_SOCK,
92 if (conf.ipv4.udp.sock >= 0) { in prepare_fds()
93 fds[nfds].fd = conf.ipv4.udp.sock; in prepare_fds()
104 if (conf.ipv6.udp.sock >= 0) { in prepare_fds()
105 fds[nfds].fd = conf.ipv6.udp.sock; in prepare_fds()
288 (void)check_our_ipv6_sockets(conf.ipv6.udp.sock, in ipv6_event_handler()
310 conf.ipv4.udp.mtu = net_if_get_mtu(iface); in event_handler()
311 conf.ipv6.udp.mtu = conf.ipv4.udp.mtu; in event_handler()
Dcommon.h54 } udp; member
/Zephyr-Core-3.7.0/tests/net/ieee802154/6lo_fragment/src/
Dmain.c156 struct net_udp_hdr udp; member
269 data->udp.len = htons(len); in create_pkt()
314 .udp.src_port = htons(udp_src_port_4bit),
315 .udp.dst_port = htons(udp_dst_port_4bit),
316 .udp.len = 0x00,
317 .udp.chksum = 0x00,
331 .udp.src_port = htons(udp_src_port_8bit_y),
332 .udp.dst_port = htons(udp_dst_port_8bit),
333 .udp.len = 0x00,
334 .udp.chksum = 0x00,
[all …]
/Zephyr-Core-3.7.0/tests/net/6lo/src/
Dmain.c241 struct net_udp_hdr udp; member
319 res = memcmp((uint8_t *)udp_hdr, (uint8_t *)&data->nh.udp, in compare_udp_hdr()
524 data->nh.udp.len = htons(len); in create_pkt()
561 .nh.udp.src_port = htons(udp_src_port_4bit),
562 .nh.udp.dst_port = htons(udp_dst_port_4bit),
563 .nh.udp.len = 0x00,
564 .nh.udp.chksum = 0x00,
583 .nh.udp.src_port = htons(udp_src_port_8bit_y),
584 .nh.udp.dst_port = htons(udp_dst_port_8bit),
585 .nh.udp.len = 0x00,
[all …]
/Zephyr-Core-3.7.0/subsys/net/ip/
D6lo.c593 static inline uint8_t *compress_nh_udp(struct net_udp_hdr *udp, uint8_t *inline_ptr, in compress_nh_udp() argument
620 inline_ptr_udp -= sizeof(udp->chksum); in compress_nh_udp()
621 memmove(inline_ptr_udp, &udp->chksum, sizeof(udp->chksum)); in compress_nh_udp()
624 if ((((htons(udp->src_port) >> 4) & 0xFFF) == in compress_nh_udp()
626 (((htons(udp->dst_port) >> 4) & 0xFFF) == in compress_nh_udp()
635 tmp = (uint8_t)(htons(udp->src_port)); in compress_nh_udp()
638 tmp |= (((uint8_t)(htons(udp->dst_port))) & 0x0F); in compress_nh_udp()
642 } else if (((htons(udp->dst_port) >> 8) & 0xFF) == in compress_nh_udp()
652 *inline_ptr_udp = (uint8_t)(htons(udp->dst_port)); in compress_nh_udp()
654 inline_ptr_udp -= sizeof(udp->src_port); in compress_nh_udp()
[all …]
Dnet_stats.c129 GET_STAT(iface, udp.recv), in stats()
130 GET_STAT(iface, udp.sent), in stats()
131 GET_STAT(iface, udp.drop)); in stats()
133 GET_STAT(iface, udp.chkerr)); in stats()
291 src = GET_STAT_ADDR(iface, udp); in net_stats_get()
DCMakeLists.txt49 zephyr_library_sources_ifdef(CONFIG_NET_UDP udp.c)
/Zephyr-Core-3.7.0/samples/net/stats/src/
Dmain.c81 GET_STAT(iface, udp.recv), in print_stats()
82 GET_STAT(iface, udp.sent), in print_stats()
83 GET_STAT(iface, udp.drop)); in print_stats()
85 GET_STAT(iface, udp.chkerr)); in print_stats()
/Zephyr-Core-3.7.0/tests/net/shell/
DCMakeLists.txt5 project(udp) project
/Zephyr-Core-3.7.0/tests/net/udp/
DCMakeLists.txt5 project(udp) project
/Zephyr-Core-3.7.0/samples/net/mqtt_sn_publisher/
DCMakeLists.txt10 src/udp.c
/Zephyr-Core-3.7.0/doc/connectivity/networking/api/
Dzperf.rst48 zperf udp upload 2001:db8::2 5001 10 1K 1M
63 zperf udp upload2 v6 10 1K 1M
77 zperf udp download 5001
/Zephyr-Core-3.7.0/samples/net/sockets/tcp/src/
Dmain.c44 void udp(void) in udp() function
/Zephyr-Core-3.7.0/tests/bsim/net/sockets/echo_test/src/
Decho_test.c59 packet_count = conf.ipv6.udp.counter; in test_echo_client_tick()
/Zephyr-Core-3.7.0/subsys/net/lib/shell/
DCMakeLists.txt32 zephyr_library_sources(udp.c)
/Zephyr-Core-3.7.0/samples/net/sockets/echo_client/
DCMakeLists.txt22 target_sources_ifdef(CONFIG_NET_UDP app PRIVATE src/udp.c)
/Zephyr-Core-3.7.0/subsys/net/l2/ieee802154/
Dieee802154_6lo_fragment.c247 struct net_udp_hdr *udp; in update_protocol_header_lengths() local
249 udp = (struct net_udp_hdr *)net_pkt_get_data(pkt, &udp_access); in update_protocol_header_lengths()
250 if (udp) { in update_protocol_header_lengths()
251 udp->len = htons(size - NET_IPV6H_LEN); in update_protocol_header_lengths()
/Zephyr-Core-3.7.0/samples/net/sockets/echo_server/
DCMakeLists.txt22 target_sources_ifdef(CONFIG_NET_UDP app PRIVATE src/udp.c)
/Zephyr-Core-3.7.0/tests/bsim/net/sockets/echo_test/
DCMakeLists.txt30 target_sources_ifdef(CONFIG_NET_UDP app PRIVATE ${echo_client_path}/src/udp.c)
/Zephyr-Core-3.7.0/tests/net/lib/lwm2m/interop/
DREADME.md38 …ls --ip=192.0.2.2 --ip6=2001:db8::2 -p 8080:8080 -p 8081:8081 -p 5683:5683/udp --rm -dit --network…
57 * udp/5683 Leshan non-secure CoAP
58 * udp/5684 Leshan DTLS CoAP
59 * udp/5783 non-secure Bootstrap CoAP
60 * udp/5684 DTLS Bootstrap CoAP
/Zephyr-Core-3.7.0/samples/net/sockets/coap_client/
DREADME.rst3 :relevant-api: coap udp

123