/Zephyr-latest/samples/net/mdns_responder/src/ |
D | service.c | 69 net_sin(&server_addr)->sin_family = AF_INET; in service() 70 net_sin(&server_addr)->sin_addr.s_addr = htonl(INADDR_ANY); in service() 71 net_sin(&server_addr)->sin_port = sys_cpu_to_be16(DEFAULT_PORT); in service() 96 addrp = &net_sin(&server_addr)->sin_addr; in service() 97 portp = &net_sin(&server_addr)->sin_port; in service()
|
/Zephyr-latest/subsys/net/lib/shell/ |
D | tcp.c | 53 memcpy(&net_sin(myaddr)->sin_addr, in get_my_ipv4_addr() 57 net_sin(myaddr)->sin_port = 0U; /* let the IP stack to select */ in get_my_ipv4_addr() 70 net_sprint_ipv4_addr(&net_sin(myaddr)->sin_addr), in print_connect_info() 71 ntohs(net_sin(myaddr)->sin_port)); in print_connect_info() 73 net_sprint_ipv4_addr(&net_sin(addr)->sin_addr), in print_connect_info() 74 ntohs(net_sin(addr)->sin_port)); in print_connect_info() 135 ret = net_addr_pton(AF_INET, host, &net_sin(&addr)->sin_addr); in tcp_connect() 142 net_sin(&addr)->sin_port = htons(port); in tcp_connect() 151 &net_sin(&addr)->sin_addr); in tcp_connect() 157 net_sin(&addr)->sin_port = htons(port); in tcp_connect()
|
D | net_shell.c | 107 net_sin(&context->remote)->sin_family == AF_INET6 && in get_addresses() 116 &net_sin(&context->remote)->sin_addr), in get_addresses() 117 ntohs(net_sin(&context->remote)->sin_port)); in get_addresses()
|
D | conn.c | 84 &net_sin(&conn->local_addr)->sin_addr), in conn_handler_cb() 85 ntohs(net_sin(&conn->local_addr)->sin_port)); in conn_handler_cb() 88 &net_sin(&conn->remote_addr)->sin_addr), in conn_handler_cb() 89 ntohs(net_sin(&conn->remote_addr)->sin_port)); in conn_handler_cb()
|
D | udp.c | 114 net_sin(&addr)->sin_port = htons(port); in cmd_net_udp_bind() 118 &net_sin(&addr)->sin_addr); in cmd_net_udp_bind() 241 net_sin(&addr)->sin_port = htons(port); in cmd_net_udp_send() 245 &net_sin(&addr)->sin_addr); in cmd_net_udp_send()
|
D | dns.c | 33 &net_sin(&info->ai_addr)->sin_addr, in dns_result_cb() 98 &net_sin(&ctx->servers[i].dns_server)-> in print_dns_info() 100 ntohs(net_sin(&ctx->servers[i].dns_server)->sin_port), in print_dns_info()
|
D | capture.c | 31 net_sprint_ipv4_addr(&net_sin(addr)->sin_addr), in get_address_str() 32 ntohs(net_sin(addr)->sin_port)); in get_address_str()
|
/Zephyr-latest/subsys/net/lib/capture/ |
D | capture.c | 226 ifaddr = net_if_ipv4_addr_add(iface, &net_sin(addr)->sin_addr, in setup_iface() 238 &net_sin(addr)->sin_addr, in setup_iface() 265 ret = net_if_ipv4_addr_rm(iface, &net_sin(addr)->sin_addr); in cleanup_iface() 268 net_sprint_ipv4_addr(&net_sin(addr)->sin_addr), in cleanup_iface() 325 &net_sin(&remote)->sin_addr); in net_capture_setup() 328 &net_sin(&remote)->sin_addr); in net_capture_setup() 414 if (net_sin(&ctx->peer)->sin_port == 0) { in net_capture_setup() 415 net_sin(&ctx->peer)->sin_port = htons(DEFAULT_PORT); in net_capture_setup() 418 if (net_sin(&ctx->local)->sin_port == 0) { in net_capture_setup() 419 net_sin(&ctx->local)->sin_port = htons(DEFAULT_PORT); in net_capture_setup() [all …]
|
/Zephyr-latest/subsys/net/ip/ |
D | connection.c | 83 net_sprint_ipv4_addr(&net_sin(&conn->remote_addr)->sin_addr)); in conn_register_debug() 99 net_sprint_ipv4_addr(&net_sin(&conn->local_addr)->sin_addr)); in conn_register_debug() 199 &net_sin(local_addr)->sin_addr, in conn_find_handler() 200 &net_sin(&conn->local_addr)-> in conn_find_handler() 211 if (net_sin(&conn->local_addr)->sin_port != in conn_find_handler() 236 &net_sin(remote_addr)->sin_addr, in conn_find_handler() 237 &net_sin(&conn->remote_addr)-> in conn_find_handler() 251 if (net_sin(&conn->remote_addr)->sin_port != in conn_find_handler() 304 if (net_sin(remote_addr)->sin_addr.s_addr) { in net_conn_change_remote() 320 net_sin(&conn->remote_addr)->sin_port = htons(remote_port); in net_conn_change_remote() [all …]
|
D | net_context.c | 196 net_sin((struct sockaddr *)& in check_used_port() 279 &net_sin(local_addr)->sin_addr))) { in check_used_port() 291 &net_sin(local_addr)->sin_addr))) { in check_used_port() 808 net_sin(addr)->sin_port, in recheck_port() 818 ntohs(net_sin(addr)->sin_port)); in recheck_port() 827 net_sin(addr)->sin_port = re_port; in recheck_port() 829 NET_ERR("Port %d is in use!", ntohs(net_sin(addr)->sin_port)); in recheck_port() 835 net_sin_ptr(&context->local)->sin_port = net_sin(addr)->sin_port; in recheck_port() 1006 &net_sin(&context->remote)->sin_addr); in net_context_bind() 1432 memcpy(&addr4->sin_addr, &net_sin(addr)->sin_addr, in net_context_connect() [all …]
|
/Zephyr-latest/drivers/wifi/esp_at/ |
D | esp_offload.c | 53 &net_sin(&dst)->sin_addr, in _sock_connect() 63 ntohs(net_sin(&dst)->sin_port)); in _sock_connect() 65 if (src.sa_family == AF_INET && net_sin(&src)->sin_port != 0) { in _sock_connect() 67 &net_sin(&src)->sin_addr, in _sock_connect() 86 if ((net_sin(&dst)->sin_addr.s_addr == 0) && in _sock_connect() 87 (ntohs(net_sin(&dst)->sin_port) == 0)) { in _sock_connect() 92 net_sin(&dst)->sin_port = 65535; in _sock_connect() 100 ntohs(net_sin(&dst)->sin_port), ntohs(net_sin(&src)->sin_port), in _sock_connect() 106 ntohs(net_sin(&dst)->sin_port)); in _sock_connect() 294 &net_sin(&dst)->sin_addr, in _sock_send() [all …]
|
/Zephyr-latest/tests/net/virtual/src/ |
D | main.c | 457 &net_sin(&virtual_addr)->sin_addr, in test_address_setup() 462 &net_sin(&virtual_addr)->sin_addr)); in test_address_setup() 466 net_sin(&virtual_addr)->sin_port = htons(4242); in test_address_setup() 469 &net_sin(&virtual_addr)->sin_addr, in test_address_setup() 712 &net_sin(&peer_addr)->sin_addr); in ZTEST() 766 &net_sin(&peer_addr)->sin_addr, in ZTEST() 828 &net_sin(&peer_addr)->sin_addr); in ZTEST() 833 &net_sin(&peer_addr)->sin_addr); in ZTEST() 868 net_sin(&dst_addr)->sin_addr.s4_addr[3] = 2; in ZTEST() 961 net_sin(&dst_addr)->sin_addr.s4_addr[3] = 1; in test_virtual_recv_data_from_tunnel() [all …]
|
/Zephyr-latest/samples/net/sockets/echo_server/src/ |
D | tunnel.c | 69 &net_sin(&addr)->sin_addr, in setup_iface() 119 &net_sin(&peer)->sin_addr); in init_tunnel() 123 &net_sin(&peer)->sin_addr); in init_tunnel()
|
/Zephyr-latest/drivers/modem/ |
D | modem_context.c | 43 if (net_addr_ntop(AF_INET, &net_sin(addr)->sin_addr, in modem_context_sprint_ip_addr() 69 *port = ntohs(net_sin(addr)->sin_port); in modem_context_get_addr_port()
|
D | wncm14a2a.c | 296 return net_addr_ntop(AF_INET, &net_sin(addr)->sin_addr, in wncm14a2a_sprint_ip_addr() 458 src_port = ntohs(net_sin(&sock->src)->sin_port); in pkt_setup_ip_data() 459 dst_port = ntohs(net_sin(&sock->dst)->sin_port); in pkt_setup_ip_data() 1511 net_ipaddr_copy(&net_sin(&sock->src)->sin_addr, in offload_bind() 1512 &net_sin(addr)->sin_addr); in offload_bind() 1513 net_sin(&sock->src)->sin_port = net_sin(addr)->sin_port; in offload_bind() 1573 net_ipaddr_copy(&net_sin(&sock->dst)->sin_addr, in offload_connect() 1574 &net_sin(addr)->sin_addr); in offload_connect() 1575 dst_port = ntohs(net_sin(addr)->sin_port); in offload_connect() 1576 net_sin(&sock->dst)->sin_port = dst_port; in offload_connect()
|
/Zephyr-latest/subsys/net/lib/dns/ |
D | resolve.c | 108 if (net_ipv4_is_addr_mcast(&net_sin(addr)->sin_addr) && in server_is_mdns() 109 net_sin(addr)->sin_addr.s4_addr[3] == 251U) { in server_is_mdns() 131 if (net_ipv4_is_addr_mcast(&net_sin(addr)->sin_addr) && in server_is_llmnr() 132 net_sin(addr)->sin_addr.s4_addr[3] == 252U) { in server_is_llmnr() 162 if (net_sin(addr)->sin_port == 0U) { in dns_postprocess_server() 170 net_sin(addr)->sin_port = htons(5353); in dns_postprocess_server() 178 net_sin(addr)->sin_port = htons(5355); in dns_postprocess_server() 180 net_sin(addr)->sin_port = htons(53); in dns_postprocess_server() 341 net_sprint_addr(addr->sa_family, &net_sin(addr)->sin_addr), in bind_to_iface() 516 &net_sin(&ctx->servers[i].dns_server)->sin_addr), in dns_resolve_init_locked() [all …]
|
D | dispatcher.c | 106 iface = net_if_ipv4_select_src_iface(&net_sin(addr)->sin_addr); in dns_dispatch() 219 if (net_sin(&entry->local_addr)->sin_port == in dns_dispatcher_register() 220 net_sin(&ctx->local_addr)->sin_port) { in dns_dispatcher_register() 234 if (net_sin(&entry->local_addr)->sin_port == in dns_dispatcher_register() 235 net_sin(&ctx->local_addr)->sin_port) { in dns_dispatcher_register()
|
D | mdns_responder.c | 117 &net_sin(&v4_ctx[i].dispatcher.local_addr)->sin_addr, in mdns_iface_event_handler() 139 create_ipv4_addr(net_sin(dst)); in setup_dst_addr() 295 iface = net_if_ipv4_select_src_iface(&net_sin(src_addr)->sin_addr); in send_response() 303 &net_sin(src_addr)->sin_addr); in send_response() 404 iface = net_if_ipv4_select_src_iface(&net_sin(src_addr)->sin_addr); in send_sd_response() 411 &net_sin(src_addr)->sin_addr); in send_sd_response() 551 (const void *)&net_sin(src_addr)->sin_addr : in dns_read()
|
/Zephyr-latest/samples/net/sockets/txtime/src/ |
D | main.c | 249 addr = net_if_ipv4_select_src_addr(iface, &net_sin(peer)->sin_addr); in get_local_ipv4() 255 memcpy(&net_sin(local)->sin_addr, addr, sizeof(*addr)); in get_local_ipv4() 317 net_addr_ntop(AF_INET, &net_sin(&local)->sin_addr, in create_socket() 364 if (net_sin(&peer_data.peer)->sin_port == 0) { in get_peer_address() 365 net_sin(&peer_data.peer)->sin_port = htons(4242); in get_peer_address() 381 &net_sin(&peer_data.peer)->sin_addr); in get_peer_address() 384 &net_sin(&peer_data.peer)->sin_addr, addr_str, in get_peer_address() 613 ntohs(net_sin(&peer_data.peer)->sin_port), in main()
|
/Zephyr-latest/tests/net/socket/misc/src/ |
D | main.c | 373 net_sin(&srv_addr)->sin_port = htons(DST_PORT); in test_getpeername() 375 &net_sin(&srv_addr)->sin_addr); in test_getpeername() 462 net_sin(&srv_addr)->sin_port = htons(DST_PORT); in test_getsockname_tcp() 464 &net_sin(&srv_addr)->sin_addr); in test_getsockname_tcp() 531 net_sin(&srv_addr)->sin_port = htons(DST_PORT); in test_getsockname_udp() 533 &net_sin(&srv_addr)->sin_addr); in test_getsockname_udp() 598 net_sin(&srv_addr4)->sin_port = htons(MAPPING_PORT); in test_ipv4_mapped_to_ipv6_disabled() 600 &net_sin(&srv_addr4)->sin_addr); in test_ipv4_mapped_to_ipv6_disabled() 647 net_sin(&srv_addr4)->sin_port = htons(MAPPING_PORT); in test_ipv4_mapped_to_ipv6_enabled() 649 &net_sin(&srv_addr4)->sin_addr); in test_ipv4_mapped_to_ipv6_enabled() [all …]
|
/Zephyr-latest/subsys/tracing/ctf/ |
D | ctf_top.c | 376 (void)net_addr_ntop(addr->sa_family, &net_sin(addr)->sin_addr, in sys_trace_socket_bind_enter() 379 ctf_top_socket_bind_enter(sock, addr_str, addrlen, ntohs(net_sin(addr)->sin_port)); in sys_trace_socket_bind_enter() 391 (void)net_addr_ntop(addr->sa_family, &net_sin(addr)->sin_addr, in sys_trace_socket_connect_enter() 425 (void)net_addr_ntop(addr->sa_family, &net_sin(addr)->sin_addr, in sys_trace_socket_accept_exit() 427 port = net_sin(addr)->sin_port; in sys_trace_socket_accept_exit() 443 (void)net_addr_ntop(dest_addr->sa_family, &net_sin(dest_addr)->sin_addr, in sys_trace_socket_sendto_enter() 466 &net_sin((struct sockaddr *)msg->msg_name)->sin_addr, in sys_trace_socket_sendmsg_enter() 493 (void)net_addr_ntop(src_addr->sa_family, &net_sin(src_addr)->sin_addr, in sys_trace_socket_recvfrom_exit() 526 &net_sin((struct sockaddr *)msg->msg_name)->sin_addr, in sys_trace_socket_recvmsg_exit() 610 (void)net_addr_ntop(addr->sa_family, &net_sin(addr)->sin_addr, in sys_trace_socket_getpeername_exit() [all …]
|
/Zephyr-latest/drivers/wifi/eswifi/ |
D | eswifi_socket.c | 88 socket->port = sys_be16_to_cpu(net_sin(addr)->sin_port); in __eswifi_bind() 199 struct in_addr *sin_addr = &net_sin(addr)->sin_addr; in __eswifi_off_start_client() 243 (uint16_t)sys_be16_to_cpu(net_sin(addr)->sin_port)); in __eswifi_off_start_client()
|
/Zephyr-latest/samples/net/sockets/http_client/src/ |
D | main.c | 46 net_sin(addr)->sin_family = AF_INET; in setup_socket() 47 net_sin(addr)->sin_port = htons(port); in setup_socket() 48 inet_pton(family, server, &net_sin(addr)->sin_addr); in setup_socket()
|
/Zephyr-latest/samples/net/sockets/websocket_client/src/ |
D | main.c | 60 net_sin(addr)->sin_family = AF_INET; in setup_socket() 61 net_sin(addr)->sin_port = htons(port); in setup_socket() 62 inet_pton(family, server, &net_sin(addr)->sin_addr); in setup_socket()
|
/Zephyr-latest/subsys/net/lib/zperf/ |
D | zperf_tcp_receiver.c | 251 port = ntohs(net_sin(address)->sin_port); in tcp_bind_listen_connection() 299 addr = &net_sin(&tcp_server_addr)->sin_addr; in zperf_tcp_receiver_init() 322 memcpy(net_sin(&sock_addr[SOCK_ID_IPV4_LISTEN]), in4_addr, in zperf_tcp_receiver_init()
|