Home
last modified time | relevance | path

Searched refs:sa_family (Results 1 – 25 of 78) sorted by relevance

1234

/Zephyr-Core-3.6.0/drivers/modem/
Dmodem_context.c27 if (addr->sa_family == AF_INET6) { in modem_context_sprint_ip_addr()
39 if (addr->sa_family == AF_INET) { in modem_context_sprint_ip_addr()
50 LOG_ERR("Unknown IP address family:%d", addr->sa_family); in modem_context_sprint_ip_addr()
65 if (addr->sa_family == AF_INET6) { in modem_context_get_addr_port()
68 } else if (addr->sa_family == AF_INET) { in modem_context_get_addr_port()
Dwncm14a2a.c289 if (addr->sa_family == AF_INET6) { in wncm14a2a_sprint_ip_addr()
295 if (addr->sa_family == AF_INET) { in wncm14a2a_sprint_ip_addr()
301 LOG_ERR("Unknown IP address family:%d", addr->sa_family); in wncm14a2a_sprint_ip_addr()
1501 sock->src.sa_family = addr->sa_family; in offload_bind()
1503 if (addr->sa_family == AF_INET6) { in offload_bind()
1510 if (addr->sa_family == AF_INET) { in offload_bind()
1561 sock->dst.sa_family = addr->sa_family; in offload_connect()
1564 if (addr->sa_family == AF_INET6) { in offload_connect()
1572 if (addr->sa_family == AF_INET) { in offload_connect()
/Zephyr-Core-3.6.0/subsys/net/ip/
Dconnection.c185 local_addr->sa_family == AF_INET6 && in conn_find_handler()
186 local_addr->sa_family == in conn_find_handler()
187 conn->local_addr.sa_family) { in conn_find_handler()
195 local_addr->sa_family == AF_INET && in conn_find_handler()
196 local_addr->sa_family == in conn_find_handler()
197 conn->local_addr.sa_family) { in conn_find_handler()
222 remote_addr->sa_family == AF_INET6 && in conn_find_handler()
223 remote_addr->sa_family == in conn_find_handler()
224 conn->remote_addr.sa_family) { in conn_find_handler()
232 remote_addr->sa_family == AF_INET && in conn_find_handler()
[all …]
/Zephyr-Core-3.6.0/subsys/net/lib/capture/
Dcapture.c201 if (IS_ENABLED(CONFIG_NET_IPV6) && addr->sa_family == AF_INET6) { in setup_iface()
216 } else if (IS_ENABLED(CONFIG_NET_IPV4) && addr->sa_family == AF_INET) { in setup_iface()
247 if (IS_ENABLED(CONFIG_NET_IPV6) && addr->sa_family == AF_INET6) { in cleanup_iface()
258 } else if (IS_ENABLED(CONFIG_NET_IPV4) && addr->sa_family == AF_INET) { in cleanup_iface()
308 if (IS_ENABLED(CONFIG_NET_IPV6) && remote.sa_family == AF_INET6) { in net_capture_setup()
317 } else if (IS_ENABLED(CONFIG_NET_IPV4) && remote.sa_family == AF_INET) { in net_capture_setup()
327 NET_ERR("Invalid address family %d", remote.sa_family); in net_capture_setup()
383 if (peer.sa_family != local.sa_family) { in net_capture_setup()
385 "(%d vs %d)", peer.sa_family, local.sa_family); in net_capture_setup()
586 if (ctx->local.sa_family == AF_INET) { in capture_send()
[all …]
/Zephyr-Core-3.6.0/samples/net/sockets/echo_server/src/
Dtunnel.c54 if (IS_ENABLED(CONFIG_NET_IPV6) && addr.sa_family == AF_INET6) { in setup_iface()
65 if (IS_ENABLED(CONFIG_NET_IPV4) && addr.sa_family == AF_INET) { in setup_iface()
102 if (IS_ENABLED(CONFIG_NET_IPV6) && peer.sa_family == AF_INET6) { in init_tunnel()
113 } else if (IS_ENABLED(CONFIG_NET_IPV4) && peer.sa_family == AF_INET) { in init_tunnel()
125 LOG_ERR("Invalid address family %d", peer.sa_family); in init_tunnel()
/Zephyr-Core-3.6.0/subsys/logging/backends/
Dlog_backend_net.c76 if (IS_ENABLED(CONFIG_NET_IPV4) && server_addr.sa_family == AF_INET) { in do_net_init()
82 if (IS_ENABLED(CONFIG_NET_IPV6) && server_addr.sa_family == AF_INET6) { in do_net_init()
93 local_addr->sa_family = server_addr.sa_family; in do_net_init()
95 ret = zsock_socket(server_addr.sa_family, SOCK_DGRAM, IPPROTO_UDP); in do_net_init()
108 server_addr.sa_family == AF_INET6) { in do_net_init()
123 server_addr.sa_family == AF_INET) { in do_net_init()
/Zephyr-Core-3.6.0/subsys/net/lib/shell/
Dcapture.c23 if (IS_ENABLED(CONFIG_NET_IPV6) && addr->sa_family == AF_INET6) { in get_address_str()
28 } else if (IS_ENABLED(CONFIG_NET_IPV4) && addr->sa_family == AF_INET) { in get_address_str()
34 addr->sa_family == AF_PACKET) { in get_address_str()
37 addr->sa_family == AF_CAN) { in get_address_str()
39 } else if (addr->sa_family == AF_UNSPEC) { in get_address_str()
42 snprintk(str, str_len, "AF_UNK(%d)", addr->sa_family); in get_address_str()
Dtcp.c129 family = addr.sa_family = myaddr.sa_family = AF_INET6; in tcp_connect()
144 family = addr.sa_family = myaddr.sa_family = AF_INET; in tcp_connect()
161 family = addr.sa_family = myaddr.sa_family = AF_INET; in tcp_connect()
173 family = addr.sa_family = myaddr.sa_family = AF_INET6; in tcp_connect()
Dudp.c95 ret = net_context_get(addr.sa_family, SOCK_DGRAM, IPPROTO_UDP, in cmd_net_udp_bind()
104 if (IS_ENABLED(CONFIG_NET_IPV6) && addr.sa_family == AF_INET6) { in cmd_net_udp_bind()
110 } else if (IS_ENABLED(CONFIG_NET_IPV4) && addr.sa_family == AF_INET) { in cmd_net_udp_bind()
222 ret = net_context_get(addr.sa_family, SOCK_DGRAM, IPPROTO_UDP, in cmd_net_udp_send()
231 if (IS_ENABLED(CONFIG_NET_IPV6) && addr.sa_family == AF_INET6) { in cmd_net_udp_send()
237 } else if (IS_ENABLED(CONFIG_NET_IPV4) && addr.sa_family == AF_INET) { in cmd_net_udp_send()
Dconn.c71 if (IS_ENABLED(CONFIG_NET_IPV6) && conn->local_addr.sa_family == AF_INET6) { in conn_handler_cb()
81 } else if (IS_ENABLED(CONFIG_NET_IPV4) && conn->local_addr.sa_family == AF_INET) { in conn_handler_cb()
91 } else if (conn->local_addr.sa_family == AF_UNSPEC) { in conn_handler_cb()
95 conn->local_addr.sa_family); in conn_handler_cb()
100 net_proto2str(conn->local_addr.sa_family, conn->proto), in conn_handler_cb()
Ddns.c71 if (ctx->servers[i].dns_server.sa_family == AF_INET) { in print_dns_info()
78 } else if (ctx->servers[i].dns_server.sa_family == AF_INET6) { in print_dns_info()
/Zephyr-Core-3.6.0/samples/net/mdns_responder/src/
Dservice.c76 r = socket(server_addr.sa_family, SOCK_STREAM, 0); in service()
92 if (server_addr.sa_family == AF_INET6) { in service()
100 inet_ntop(server_addr.sa_family, addrp, addrstr, sizeof(addrstr)); in service()
121 inet_ntop(server_addr.sa_family, addrp, addrstr, sizeof(addrstr)); in service()
/Zephyr-Core-3.6.0/subsys/net/lib/zperf/
Dzperf_session.c42 addr->sa_family == AF_INET && in get_session()
52 addr->sa_family == AF_INET6 && in get_session()
74 if (IS_ENABLED(CONFIG_NET_IPV4) && addr->sa_family == AF_INET) { in get_session()
79 addr->sa_family == AF_INET6) { in get_session()
Dzperf_common.c115 socklen_t addrlen = peer_addr->sa_family == AF_INET6 ? in zperf_prepare_upload_sock()
122 switch (peer_addr->sa_family) { in zperf_prepare_upload_sock()
170 LOG_ERR("Invalid address family (%d)", peer_addr->sa_family); in zperf_prepare_upload_sock()
/Zephyr-Core-3.6.0/samples/net/sockets/txtime/src/
Dmain.c223 if (peer->sa_family != AF_INET6) { in get_local_ipv6()
234 local->sa_family = AF_INET6; in get_local_ipv6()
245 if (peer->sa_family != AF_INET) { in get_local_ipv4()
256 local->sa_family = AF_INET; in get_local_ipv4()
295 sock = socket(peer->sa_family, SOCK_DGRAM, IPPROTO_UDP); in create_socket()
302 peer->sa_family == AF_INET6) { in create_socket()
311 peer->sa_family == AF_INET) { in create_socket()
320 LOG_ERR("Invalid socket family %d", peer->sa_family); in create_socket()
369 peer_data.peer.sa_family == AF_INET6) { in get_peer_address()
373 net_addr_ntop(peer_data.peer.sa_family, in get_peer_address()
[all …]
/Zephyr-Core-3.6.0/tests/net/virtual/src/
Dmain.c451 if (virtual_addr.sa_family == AF_INET) { in test_address_setup()
463 } else if (virtual_addr.sa_family == AF_INET6) { in test_address_setup()
477 virtual_addr.sa_family); in test_address_setup()
700 params.family = peer_addr.sa_family; in ZTEST()
746 zassert_equal(params.family, peer_addr.sa_family, in ZTEST()
748 peer_addr.sa_family, params.family); in ZTEST()
798 params.family = peer_addr.sa_family; in ZTEST()
843 if (dst_addr.sa_family == AF_INET) { in ZTEST()
851 } else if (dst_addr.sa_family == AF_INET6) { in ZTEST()
859 zassert_true(false, "Invalid family (%d)", dst_addr.sa_family); in ZTEST()
[all …]
/Zephyr-Core-3.6.0/tests/net/lib/lwm2m/lwm2m_engine/src/
Dmain.c100 ctx.remote_addr.sa_family = AF_INET; in ZTEST()
131 ctx.remote_addr.sa_family = AF_INET; in ZTEST()
156 ctx.remote_addr.sa_family = AF_INET; in ZTEST()
195 ctx.remote_addr.sa_family = AF_INET; in ZTEST()
213 ctx.remote_addr.sa_family = AF_INET; in ZTEST()
236 ctx.remote_addr.sa_family = AF_INET; in ZTEST()
348 ctx.remote_addr.sa_family = AF_INET; in ZTEST()
377 ctx.remote_addr.sa_family = AF_INET; in ZTEST()
400 ctx.remote_addr.sa_family = AF_INET; in ZTEST()
431 ctx.remote_addr.sa_family = AF_INET; in ZTEST()
[all …]
/Zephyr-Core-3.6.0/samples/net/cellular_modem/src/
Dmain.c149 if (ai_addr->sa_family == AF_INET) { in sample_echo_packet()
151 } else if (ai_addr->sa_family == AF_INET6) { in sample_echo_packet()
227 if (ai_addr->sa_family == AF_INET) { in sample_transmit_packets()
229 } else if (ai_addr->sa_family == AF_INET6) { in sample_transmit_packets()
/Zephyr-Core-3.6.0/samples/net/sockets/echo_client/src/
Dtcp.c94 data->tcp.sock = socket(addr->sa_family, SOCK_STREAM, IPPROTO_TLS_1_2); in start_tcp_proto()
96 data->tcp.sock = socket(addr->sa_family, SOCK_STREAM, IPPROTO_TCP); in start_tcp_proto()
108 if (addr->sa_family == AF_INET) { in start_tcp_proto()
117 } else if (addr->sa_family == AF_INET6) { in start_tcp_proto()
/Zephyr-Core-3.6.0/tests/net/socket/misc/src/
Dmain.c365 srv_addr.sa_family = family; in test_getpeername()
454 srv_addr.sa_family = family; in test_getsockname_tcp()
501 zassert_equal(local_addr.sa_family, family, "wrong family"); in test_getsockname_tcp()
523 srv_addr.sa_family = family; in test_getsockname_udp()
567 zassert_equal(local_addr.sa_family, family, "wrong family"); in test_getsockname_udp()
591 srv_addr4.sa_family = AF_INET; in test_ipv4_mapped_to_ipv6_disabled()
597 srv_addr6.sa_family = AF_INET6; in test_ipv4_mapped_to_ipv6_disabled()
640 srv_addr4.sa_family = AF_INET; in test_ipv4_mapped_to_ipv6_enabled()
646 srv_addr6.sa_family = AF_INET6; in test_ipv4_mapped_to_ipv6_enabled()
724 srv_addr.sa_family = AF_INET; in test_ipv4_mapped_to_ipv6_server()
[all …]
/Zephyr-Core-3.6.0/tests/posix/headers/src/
Dsys_socket_h.c30 zassert_not_equal(-1, offsetof(struct sockaddr, sa_family)); in ZTEST()
39 zassert_equal(offsetof(struct sockaddr, sa_family), in ZTEST()
/Zephyr-Core-3.6.0/subsys/net/lib/mqtt_sn/
Dmqtt_sn_transport_udp.c29 switch (sa->sa_family) { in get_ip_str()
51 udp->sock = zsock_socket(udp->gwaddr.sa_family, SOCK_DGRAM, 0); in tp_udp_init()
/Zephyr-Core-3.6.0/subsys/net/lib/dns/
Dresolve.c137 if (addr->sa_family == AF_INET) { in dns_postprocess_server()
252 i < SERVER_COUNT && ctx->servers[i].dns_server.sa_family; i++) { in dns_resolve_init_locked()
254 if (ctx->servers[i].dns_server.sa_family == AF_INET6) { in dns_resolve_init_locked()
268 if (ctx->servers[i].dns_server.sa_family == AF_INET) { in dns_resolve_init_locked()
288 ret = net_context_get(ctx->servers[i].dns_server.sa_family, in dns_resolve_init_locked()
589 info.ai_addr.sa_family = AF_INET; in dns_validate_msg()
609 info.ai_addr.sa_family = AF_INET6; in dns_validate_msg()
924 if (server->sa_family == AF_INET) { in dns_write()
1154 info.ai_addr.sa_family = AF_INET; in dns_resolve_name()
1171 info.ai_addr.sa_family = AF_INET6; in dns_resolve_name()
[all …]
/Zephyr-Core-3.6.0/subsys/net/lib/mqtt/
Dmqtt_transport_socket_tcp.c26 client->transport.tcp.sock = zsock_socket(broker->sa_family, SOCK_STREAM, in mqtt_client_tcp_connect()
48 if (broker->sa_family == AF_INET) { in mqtt_client_tcp_connect()
/Zephyr-Core-3.6.0/subsys/net/lib/socks/
Dsocks.c125 if (proxy->sa_family == AF_INET) { in socks5_tcp_connect()
139 } else if (proxy->sa_family == AF_INET6) { in socks5_tcp_connect()

1234