Home
last modified time | relevance | path

Searched refs:AF_INET (Results 1 – 25 of 189) sorted by relevance

12345678

/Zephyr-latest/tests/net/lib/dns_cache/src/
Dmain.c24 struct dns_addrinfo info_write = {.ai_family = AF_INET}; in ZTEST()
31 zassert_equal(AF_INET, info_read.ai_family); in ZTEST()
45 struct dns_addrinfo info_write = {.ai_family = AF_INET}; in ZTEST()
56 zassert_equal(AF_INET, info_read[TEST_DNS_CACHE_SIZE - 1].ai_family); in ZTEST()
61 struct dns_addrinfo info_write = {.ai_family = AF_INET}; in ZTEST()
77 struct dns_addrinfo info_write = {.ai_family = AF_INET}; in ZTEST()
88 zassert_equal(AF_INET, info_read[TEST_DNS_CACHE_SIZE - 2].ai_family); in ZTEST()
93 struct dns_addrinfo info_write = {.ai_family = AF_INET}; in ZTEST()
112 struct dns_addrinfo info_write = {.ai_family = AF_INET}; in ZTEST()
125 zassert_equal(AF_INET, info_read[0].ai_family); in ZTEST()
[all …]
/Zephyr-latest/tests/net/socket/
Dsocket_helpers.h25 ret = zsock_socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); in prepare_listen_sock_udp_v4()
30 zassert_equal(addr->sin_family, AF_INET, "Invalid family"); in prepare_listen_sock_udp_v4()
66 *sock = zsock_socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); in prepare_sock_udp_v4()
69 sockaddr->sin_family = AF_INET; in prepare_sock_udp_v4()
71 rv = zsock_inet_pton(AF_INET, addr, &sockaddr->sin_addr); in prepare_sock_udp_v4()
103 *sock = zsock_socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); in prepare_sock_tcp_v4()
106 sockaddr->sin_family = AF_INET; in prepare_sock_tcp_v4()
108 rv = zsock_inet_pton(AF_INET, addr, &sockaddr->sin_addr); in prepare_sock_tcp_v4()
140 *sock = zsock_socket(AF_INET, SOCK_STREAM, proto); in prepare_sock_tls_v4()
143 sockaddr->sin_family = AF_INET; in prepare_sock_tls_v4()
[all …]
/Zephyr-latest/tests/net/utils/src/
Dmain.c53 .family = AF_INET,
60 .family = AF_INET,
67 .family = AF_INET,
74 .family = AF_INET,
81 .family = AF_INET,
88 .family = AF_INET,
95 .family = AF_INET,
102 .family = AF_INET,
164 .family = AF_INET,
171 .family = AF_INET,
[all …]
/Zephyr-latest/tests/net/socket/reuseaddr_reuseport/src/
Dmain.c38 if (family == AF_INET) { in test_add_local_ip_address()
42 zsock_inet_pton(AF_INET, ip, &addr.sin_addr); in test_add_local_ip_address()
68 test_add_local_ip_address(AF_INET, TEST_MY_IPV4_ADDR); in setup()
77 if (family == AF_INET) { in prepare_sock_tcp()
93 if (family == AF_INET) { in prepare_sock_udp()
262 server_sock = zsock_socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); in ZTEST_USER()
335 test_reuseaddr_unspecified_specified_common(AF_INET, in ZTEST_USER()
351 test_reuseaddr_unspecified_specified_common(AF_INET, in ZTEST_USER()
367 test_reuseaddr_unspecified_specified_common(AF_INET, in ZTEST_USER()
414 test_reuseaddr_tcp_listening_common(AF_INET, in ZTEST_USER()
[all …]
/Zephyr-latest/tests/net/socket/misc/src/
Dmain.c37 res = zsock_inet_pton(AF_INET, "127.0.0.1", buf); in ZTEST_USER()
40 res = zsock_inet_pton(AF_INET, "127.0.0.1a", buf); in ZTEST_USER()
301 .sin_family = AF_INET, in test_ipv4_so_bindtodevice()
306 .sin_family = AF_INET, in test_ipv4_so_bindtodevice()
311 .sin_family = AF_INET, in test_ipv4_so_bindtodevice()
316 sock_c = zsock_socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); in test_ipv4_so_bindtodevice()
318 sock_s = zsock_socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); in test_ipv4_so_bindtodevice()
358 #define ADDR_SIZE(family) ((family == AF_INET) ? \
372 if (family == AF_INET) { in test_getpeername()
374 ret = zsock_inet_pton(AF_INET, TEST_MY_IPV4_ADDR, in test_getpeername()
[all …]
/Zephyr-latest/tests/net/socket/register/src/
Dmain.c31 .test_case.family = AF_INET,
54 .test_case.family = AF_INET,
68 .test_case.family = AF_INET,
82 .test_case.family = AF_INET,
125 .test_case.family = AF_INET,
140 .test_case.family = AF_INET,
193 if ((family == AF_INET || family == AF_INET6) && in is_tls()
225 if (family != AF_INET && family != AF_INET6) { in is_ip()
234 NET_SOCKET_REGISTER(af_inet, TEST_SOCKET_PRIO, AF_INET, is_ip, socket_test);
/Zephyr-latest/samples/net/dhcpv4_client/src/
Dmain.c59 net_addr_ntop(AF_INET, in handler()
63 net_addr_ntop(AF_INET, in handler()
67 net_addr_ntop(AF_INET, in handler()
83 net_addr_ntop(AF_INET, cb->data, buf, sizeof(buf))); in option_handler()
/Zephyr-latest/samples/net/cloud/tagoio_http_post/src/
Dsockets.c51 hints.ai_family = AF_INET; in tagoio_connect()
69 (addr->ai_family == AF_INET ? "IPv4" : "IPv6"), in tagoio_connect()
79 (addr->ai_family == AF_INET ? "IPv4" : "IPv6"), in tagoio_connect()
88 (addr->ai_family == AF_INET ? "IPv4" : "IPv6"), in tagoio_connect()
/Zephyr-latest/tests/net/lib/http_server/crime/src/
Dmain.c76 ret = zsock_socket(AF_INET, SOCK_STREAM, proto); in test_crime()
80 sa.sin_family = AF_INET; in test_crime()
83 ret = zsock_inet_pton(AF_INET, MY_IPV4_ADDR, &sa.sin_addr.s_addr); in test_crime()
89 ptr = (char *)zsock_inet_ntop(AF_INET, &sa.sin_addr, buf, sizeof(buf)); in test_crime()
/Zephyr-latest/tests/boards/espressif/ethernet/src/
Dmain.c44 net_addr_ntop(AF_INET, &iface->config.ip.ipv4->unicast[0].ipv4.address.in_addr, buf, in ipv4_event()
47 net_addr_ntop(AF_INET, &iface->config.ip.ipv4->unicast[0].netmask, buf, in ipv4_event()
50 net_addr_ntop(AF_INET, &iface->config.ip.ipv4->gw, buf, sizeof(buf))); in ipv4_event()
76 net_addr_ntop(AF_INET, cb->data, buf, sizeof(buf))); in option_handler()
103 dst4.sin_family = AF_INET; in ZTEST()
/Zephyr-latest/subsys/net/lib/zperf/
Dzperf_session.c42 addr->sa_family == AF_INET && in get_session()
43 ptr->ip.family == AF_INET && in get_session()
74 if (IS_ENABLED(CONFIG_NET_IPV4) && addr->sa_family == AF_INET) { in get_session()
76 active->ip.family = AF_INET; in get_session()
Dzperf_tcp_receiver.c144 family == AF_INET ? 4 : 6, sock_error); in tcp_recv_data()
167 family == AF_INET ? 4 : 6, ret); in tcp_recv_data()
197 family == AF_INET ? 4 : 6, in tcp_recv_data()
250 if (address->sa_family == AF_INET) { in tcp_bind_listen_connection()
259 address->sa_family == AF_INET ? 4 : 6, port, errno); in tcp_bind_listen_connection()
266 address->sa_family == AF_INET ? 4 : 6, errno); in tcp_bind_listen_connection()
287 if (IS_ENABLED(CONFIG_NET_IPV4) && (family == AF_INET || family == AF_UNSPEC)) { in zperf_tcp_receiver_init()
291 fds[SOCK_ID_IPV4_LISTEN].fd = zsock_socket(AF_INET, SOCK_STREAM, in zperf_tcp_receiver_init()
Dzperf_common.c30 .sin_family = AF_INET,
97 ret = net_addr_pton(AF_INET, host, addr); in zperf_get_ipv4_addr()
123 case AF_INET: in zperf_prepare_upload_sock()
129 sock = zsock_socket(AF_INET, type, proto); in zperf_prepare_upload_sock()
/Zephyr-latest/drivers/modem/
Dmodem_context.c39 if (addr->sa_family == AF_INET) { in modem_context_sprint_ip_addr()
43 if (net_addr_ntop(AF_INET, &net_sin(addr)->sin_addr, in modem_context_sprint_ip_addr()
68 } else if (addr->sa_family == AF_INET) { in modem_context_get_addr_port()
/Zephyr-latest/samples/net/sockets/tcp/src/
Dmain.c46 int fd = socket(AF_INET, SOCK_DGRAM, 0); in udp()
55 sin.sin_family = AF_INET; in udp()
/Zephyr-latest/samples/net/ipv4_autoconf/src/
Dmain.c51 net_addr_ntop(AF_INET, in handler()
55 net_addr_ntop(AF_INET, in handler()
/Zephyr-latest/tests/net/context/src/
Dmain.c165 ret = net_context_get(AF_INET, SOCK_DGRAM, IPPROTO_UDP, in net_ctx_create()
176 ret = net_context_get(AF_INET, SOCK_STREAM, IPPROTO_TCP, in net_ctx_create()
218 .sin_family = AF_INET, in net_ctx_bind_uni_success_v4()
307 .sin_family = AF_INET, in net_ctx_connect_v4()
315 K_NO_WAIT, INT_TO_POINTER(AF_INET)); in net_ctx_connect_v4()
322 K_NO_WAIT, INT_TO_POINTER(AF_INET)); in net_ctx_connect_v4()
365 INT_TO_POINTER(AF_INET)); in net_ctx_accept_v4()
447 send_cb, K_FOREVER, INT_TO_POINTER(AF_INET)); in net_ctx_send_v4()
478 .sin_family = AF_INET, in net_ctx_sendto_v4()
488 K_NO_WAIT, INT_TO_POINTER(AF_INET)); in net_ctx_sendto_v4()
[all …]
/Zephyr-latest/subsys/net/lib/shell/
Dipv4.c39 ipv4->unicast[i].ipv4.address.family != AF_INET) { in ip_address_lifetime_cb()
121 if (net_addr_pton(AF_INET, argv[2], &addr)) { in cmd_net_ip_add()
151 if (net_addr_pton(AF_INET, argv[3], &netmask)) { in cmd_net_ip_add()
188 if (net_addr_pton(AF_INET, argv[2], &addr)) { in cmd_net_ip_del()
237 if (net_addr_pton(AF_INET, argv[2], &addr)) { in cmd_net_ip_gateway()
/Zephyr-latest/samples/net/sockets/echo_client/src/
Dtcp.c111 if (family == AF_INET) { in start_tcp_proto()
115 proxy4->sin_family = AF_INET; in start_tcp_proto()
117 inet_pton(AF_INET, SOCKS5_PROXY_V4_ADDR, in start_tcp_proto()
254 addr4.sin_family = AF_INET; in start_tcp()
256 inet_pton(AF_INET, CONFIG_NET_CONFIG_PEER_IPV4_ADDR, in start_tcp()
259 ret = start_tcp_proto(&conf.ipv4, AF_INET, in start_tcp()
/Zephyr-latest/subsys/net/lib/mqtt_sn/
Dmqtt_sn_transport_udp.c27 case AF_INET: in get_ip_str()
28 inet_ntop(AF_INET, &(((struct sockaddr_in *)sa)->sin_addr), s, maxlen); in get_ip_str()
71 case AF_INET: in tp_udp_init()
87 case AF_INET: in tp_udp_init()
89 addrm.sa_family = AF_INET; in tp_udp_init()
116 if (udp->bcaddr.sa_family == AF_INET && IS_ENABLED(CONFIG_NET_IPV4)) { in tp_udp_init()
/Zephyr-latest/tests/net/socket/tls_ext/src/
Dmain.c172 addrstrp = (char *)inet_ntop(AF_INET, &sa.sin_addr, in server_thread_fn()
218 r = socket(AF_INET, SOCK_STREAM, proto); in test_common()
276 sa.sin_family = AF_INET; in test_common()
286 addrstrp = (char *)inet_ntop(AF_INET, &sa.sin_addr, in test_common()
309 r = socket(AF_INET, SOCK_STREAM, proto); in test_common()
354 r = inet_pton(AF_INET, MY_IPV4_ADDR, &sa.sin_addr.s_addr); in test_common()
360 addrstrp = (char *)inet_ntop(AF_INET, &sa.sin_addr, in test_common()
/Zephyr-latest/samples/net/sockets/coap_download/src/
Dmain.c66 LOG_INF("Starting CoAP download using %s", (AF_INET == sa->sa_family) ? "IPv4" : "IPv6"); in do_coap_download()
106 addr4->sin_family = AF_INET; in main()
108 zsock_inet_pton(AF_INET, CONFIG_NET_CONFIG_PEER_IPV4_ADDR, &addr4->sin_addr); in main()
/Zephyr-latest/subsys/net/l2/virtual/ipip/
Dipip.c146 if (net_pkt_family(pkt) == AF_INET) { in interface_send()
196 } else if (IS_ENABLED(CONFIG_NET_IPV4) && ctx->family == AF_INET) { in interface_send()
199 AF_INET, IPPROTO_IP, in interface_send()
247 net_pkt_set_family(pkt, AF_INET); in interface_send()
276 if (ctx->family == AF_INET) { in verify_remote_addr()
311 net_pkt_set_family(pkt, AF_INET); in interface_recv()
380 if (IS_ENABLED(CONFIG_NET_IPV4) && net_pkt_family(pkt) == AF_INET) { in interface_recv()
491 if (IS_ENABLED(CONFIG_NET_IPV4) && config->family == AF_INET) { in interface_set_config()
497 addr_str = net_addr_ntop(AF_INET, &ctx->peer.in_addr, in interface_set_config()
500 ctx->family = AF_INET; in interface_set_config()
[all …]
/Zephyr-latest/subsys/net/ip/
Dpmtu.c47 case AF_INET: in get_pmtu_entry()
49 pmtu_entries[i].dst.family == AF_INET && in get_pmtu_entry()
121 if (IS_ENABLED(CONFIG_NET_IPV4_PMTU) && entry->dst.family == AF_INET) { in update_pmtu_entry()
189 case AF_INET: in add_entry()
191 entry->dst.family = AF_INET; in add_entry()
/Zephyr-latest/tests/net/shell/src/
Dmain.c117 AF_INET && in if_get_addr()
182 any_addr4.sin_family = AF_INET; in test_setup()
185 my_addr4.sin_family = AF_INET; in test_setup()
188 peer_addr4.sin_family = AF_INET; in test_setup()

12345678