/Zephyr-latest/tests/net/pm/src/ |
D | main.c | 125 struct sockaddr_in addr4; in ZTEST() local 129 addr4.sin_family = AF_INET; in ZTEST() 130 addr4.sin_port = htons(12345); in ZTEST() 131 zsock_inet_pton(AF_INET, "192.168.0.1", &addr4.sin_addr); in ZTEST() 140 (struct sockaddr *)&addr4, sizeof(struct sockaddr_in)); in ZTEST() 161 (struct sockaddr *)&addr4, sizeof(struct sockaddr_in)); in ZTEST() 174 (struct sockaddr *)&addr4, sizeof(struct sockaddr_in)); in ZTEST()
|
/Zephyr-latest/subsys/net/lib/zperf/ |
D | zperf_session.c | 29 const struct sockaddr_in *addr4 = (const struct sockaddr_in *)addr; in get_session() local 44 ptr->port == addr4->sin_port && in get_session() 45 net_ipv4_addr_cmp(&ptr->ip.in_addr, &addr4->sin_addr)) { in get_session() 75 active->port = addr4->sin_port; in get_session() 77 net_ipaddr_copy(&active->ip.in_addr, &addr4->sin_addr); in get_session()
|
/Zephyr-latest/samples/boards/nxp/s32/netc/src/ |
D | main.c | 24 struct in_addr addr4; in setup_iface() local 44 if (net_addr_pton(AF_INET, ipv4_addr, &addr4)) { in setup_iface() 49 ifaddr = net_if_ipv4_addr_add(iface, &addr4, NET_ADDR_MANUAL, 0); in setup_iface() 64 net_if_ipv4_set_netmask_by_addr(iface, &addr4, &nm); in setup_iface()
|
/Zephyr-latest/drivers/wifi/simplelink/ |
D | simplelink_support.c | 100 struct in_addr addr4; in configure_simplelink() local 144 if (net_addr_pton(AF_INET, CONFIG_NET_CONFIG_MY_IPV4_ADDR, &addr4) in configure_simplelink() 149 ipV4.Ip = (_u32)SL_IPV4_VAL(addr4.s4_addr[0], in configure_simplelink() 150 addr4.s4_addr[1], in configure_simplelink() 151 addr4.s4_addr[2], in configure_simplelink() 152 addr4.s4_addr[3]); in configure_simplelink() 157 &addr4) < 0) { in configure_simplelink() 161 ipV4.IpGateway = (_u32)SL_IPV4_VAL(addr4.s4_addr[0], in configure_simplelink() 162 addr4.s4_addr[1], in configure_simplelink() 163 addr4.s4_addr[2], in configure_simplelink() [all …]
|
/Zephyr-latest/samples/net/mdns_responder/src/ |
D | vlan.c | 47 struct in_addr addr4; in setup_iface() local 72 if (net_addr_pton(AF_INET, ipv4_addr, &addr4)) { in setup_iface() 77 ifaddr = net_if_ipv4_addr_add(iface, &addr4, in setup_iface() 93 net_if_ipv4_set_netmask_by_addr(iface, &addr4, &nm); in setup_iface()
|
/Zephyr-latest/samples/net/sockets/echo_server/src/ |
D | vlan.c | 50 struct in_addr addr4; in setup_iface() local 75 if (net_addr_pton(AF_INET, ipv4_addr, &addr4)) { in setup_iface() 80 ifaddr = net_if_ipv4_addr_add(vlan, &addr4, in setup_iface() 96 net_if_ipv4_set_netmask_by_addr(vlan, &addr4, &nm); in setup_iface()
|
D | udp.c | 157 struct sockaddr_in addr4; in process_udp4() local 159 (void)memset(&addr4, 0, sizeof(addr4)); in process_udp4() 160 addr4.sin_family = AF_INET; in process_udp4() 161 addr4.sin_port = htons(MY_PORT); in process_udp4() 163 ret = start_udp_proto(&conf.ipv4, (struct sockaddr *)&addr4, in process_udp4() 164 sizeof(addr4)); in process_udp4()
|
D | tcp.c | 309 struct sockaddr_in addr4; in process_tcp4() local 311 (void)memset(&addr4, 0, sizeof(addr4)); in process_tcp4() 312 addr4.sin_family = AF_INET; in process_tcp4() 313 addr4.sin_port = htons(MY_PORT); in process_tcp4() 315 ret = start_tcp_proto(&conf.ipv4, (struct sockaddr *)&addr4, in process_tcp4() 316 sizeof(addr4)); in process_tcp4()
|
/Zephyr-latest/samples/net/sockets/coap_download/src/ |
D | main.c | 104 struct sockaddr_in *addr4 = (struct sockaddr_in *)&sa; in main() local 106 addr4->sin_family = AF_INET; in main() 107 addr4->sin_port = htons(CONFIG_NET_SAMPLE_COAP_SERVER_PORT); in main() 108 zsock_inet_pton(AF_INET, CONFIG_NET_CONFIG_PEER_IPV4_ADDR, &addr4->sin_addr); in main()
|
/Zephyr-latest/samples/net/vlan/src/ |
D | main.c | 44 struct in_addr addr4; in setup_iface() local 83 if (net_addr_pton(AF_INET, ipv4_addr, &addr4)) { in setup_iface() 88 ifaddr = net_if_ipv4_addr_add(vlan, &addr4, in setup_iface() 104 net_if_ipv4_set_netmask_by_addr(vlan, &addr4, &nm); in setup_iface()
|
/Zephyr-latest/samples/net/sockets/echo_client/src/ |
D | vlan.c | 46 struct in_addr addr4; in setup_iface() local 66 if (net_addr_pton(AF_INET, ipv4_addr, &addr4)) { in setup_iface() 71 ifaddr = net_if_ipv4_addr_add(iface, &addr4, NET_ADDR_MANUAL, 0); in setup_iface()
|
D | tcp.c | 236 struct sockaddr_in addr4; in start_tcp() local 254 addr4.sin_family = AF_INET; in start_tcp() 255 addr4.sin_port = htons(PEER_PORT); in start_tcp() 257 &addr4.sin_addr); in start_tcp() 260 (struct sockaddr *)&addr4, in start_tcp() 261 sizeof(addr4)); in start_tcp()
|
D | udp.c | 306 struct sockaddr_in addr4; in start_udp() local 324 addr4.sin_family = AF_INET; in start_udp() 325 addr4.sin_port = htons(PEER_PORT); in start_udp() 327 &addr4.sin_addr); in start_udp() 330 (struct sockaddr *)&addr4, in start_udp() 331 sizeof(addr4)); in start_udp()
|
/Zephyr-latest/subsys/net/lib/dns/ |
D | dns_sd.h | 140 const struct in_addr *addr4, const struct in6_addr *addr6, 158 const struct in_addr *addr4, const struct in6_addr *addr6,
|
D | dns_sd.c | 671 const struct in_addr *addr4, in port_in_use() argument 676 if (addr4 != NULL) { in port_in_use() 680 sa.sin_addr = *addr4; in port_in_use() 706 static inline bool port_in_use(uint16_t proto, uint16_t port, const struct in_addr *addr4, in port_in_use() argument 710 ARG_UNUSED(addr4); in port_in_use() 717 int dns_sd_handle_ptr_query(const struct dns_sd_rec *inst, const struct in_addr *addr4, in dns_sd_handle_ptr_query() argument 766 if (!port_in_use(proto, ntohs(*(inst->port)), addr4, addr6)) { in dns_sd_handle_ptr_query() 810 if (addr4 != NULL) { in dns_sd_handle_ptr_query() 811 tmp = htonl(*(addr4->s4_addr32)); in dns_sd_handle_ptr_query() 831 const struct in_addr *addr4, const struct in6_addr *addr6, in dns_sd_handle_service_type_enum() argument [all …]
|
/Zephyr-latest/samples/net/sockets/txtime/src/ |
D | vlan.c | 46 struct in_addr addr4; in setup_iface() local 76 if (net_addr_pton(AF_INET, ipv4_addr, &addr4)) { in setup_iface() 81 ifaddr = net_if_ipv4_addr_add(iface, &addr4, in setup_iface()
|
/Zephyr-latest/samples/net/sockets/dumb_http_server_mt/src/ |
D | main.c | 338 struct sockaddr_in addr4; in process_tcp4() local 341 (void)memset(&addr4, 0, sizeof(addr4)); in process_tcp4() 342 addr4.sin_family = AF_INET; in process_tcp4() 343 addr4.sin_port = htons(MY_PORT); in process_tcp4() 345 ret = setup(&tcp4_listen_sock, (struct sockaddr *)&addr4, in process_tcp4() 346 sizeof(addr4)); in process_tcp4()
|
/Zephyr-latest/subsys/mgmt/mcumgr/transport/src/ |
D | smp_udp.c | 170 struct sockaddr_in addr4; in create_socket() local 180 memset(&addr4, 0, sizeof(addr4)); in create_socket() 181 addr4.sin_family = AF_INET; in create_socket() 182 addr4.sin_port = htons(CONFIG_MCUMGR_TRANSPORT_UDP_PORT); in create_socket() 183 addr4.sin_addr.s_addr = htonl(INADDR_ANY); in create_socket() 184 addr = (struct sockaddr *)&addr4; in create_socket()
|
/Zephyr-latest/samples/net/sockets/http_client/src/ |
D | main.c | 155 struct sockaddr_in addr4; in run_queries() local 177 &sock4, (struct sockaddr *)&addr4, in run_queries() 178 sizeof(addr4)); in run_queries() 233 &sock4, (struct sockaddr *)&addr4, in run_queries() 234 sizeof(addr4)); in run_queries() 295 &sock4, (struct sockaddr *)&addr4, in run_queries() 296 sizeof(addr4)); in run_queries()
|
/Zephyr-latest/samples/net/virtual/src/ |
D | main.c | 233 struct in_addr addr4; in setup_iface() local 291 if (net_addr_pton(AF_INET, ipv4_addr, &addr4)) { in setup_iface() 296 ifaddr = net_if_ipv4_addr_add(iface, &addr4, in setup_iface() 312 net_if_ipv4_set_netmask_by_addr(iface, &addr4, &nm); in setup_iface() 321 if (net_addr_pton(AF_INET, peer4addr, &addr4)) { in setup_iface() 325 net_ipaddr_copy(¶ms.peer4addr, &addr4); in setup_iface()
|
/Zephyr-latest/samples/net/lldp/src/ |
D | main.c | 67 struct in_addr addr4; in setup_iface() local 87 if (net_addr_pton(AF_INET, ipv4_addr, &addr4)) { in setup_iface() 92 ifaddr = net_if_ipv4_addr_add(iface, &addr4, NET_ADDR_MANUAL, 0); in setup_iface()
|
/Zephyr-latest/subsys/net/ip/ |
D | utils.c | 303 struct in_addr addr4; in z_vrfy_net_addr_ntop() local 310 K_OOPS(k_usermode_from_copy(&addr4, (const void *)src, in z_vrfy_net_addr_ntop() 311 sizeof(addr4))); in z_vrfy_net_addr_ntop() 312 addr = &addr4; in z_vrfy_net_addr_ntop() 472 struct in_addr addr4; in z_vrfy_net_addr_pton() local 479 addr = &addr4; in z_vrfy_net_addr_pton() 826 struct in_addr *addr4; in parse_ipv4() local 854 addr4 = &net_sin(addr)->sin_addr; in parse_ipv4() 856 ret = net_addr_pton(AF_INET, ipaddr, addr4); in parse_ipv4() 878 net_addr_ntop(AF_INET, addr4, ipaddr, sizeof(ipaddr) - 1), in parse_ipv4()
|
D | net_context.c | 736 struct sockaddr_in addr4; in bind_default() local 742 addr4.sin_family = AF_INET; in bind_default() 743 addr4.sin_addr.s_addr = INADDR_ANY; in bind_default() 744 addr4.sin_port = in bind_default() 746 (struct sockaddr *)&addr4); in bind_default() 748 return net_context_bind(context, (struct sockaddr *)&addr4, in bind_default() 749 sizeof(addr4)); in bind_default() 968 struct sockaddr_in *addr4 = (struct sockaddr_in *)addr; in net_context_bind() local 981 if (net_ipv4_is_addr_mcast(&addr4->sin_addr)) { in net_context_bind() 995 maddr = net_if_ipv4_maddr_lookup(&addr4->sin_addr, in net_context_bind() [all …]
|
/Zephyr-latest/tests/net/ip-addr/src/ |
D | main.c | 470 struct in_addr addr4 = { { { 192, 168, 0, 1 } } }; in ZTEST() local 491 &addr4, in ZTEST() 496 zassert_true(net_ipv4_is_my_addr(&addr4), in ZTEST() 499 net_if_ipv4_set_netmask_by_addr(default_iface, &addr4, &netmask); in ZTEST() 519 out = net_if_ipv4_select_src_addr(iface, &addr4); in ZTEST() 526 zassert_equal(out->s_addr, addr4.s_addr, in ZTEST() 550 zassert_equal(out->s_addr, addr4.s_addr, in ZTEST() 562 zassert_equal(out->s_addr, addr4.s_addr, in ZTEST() 583 zassert_false(net_ipv4_is_addr_mcast(&addr4), "IPv4 address"); in ZTEST() 642 net_if_ipv4_set_netmask_by_addr(iface, &addr4, &netmask2); in ZTEST()
|
/Zephyr-latest/subsys/net/lib/http/ |
D | http_server_core.c | 84 struct sockaddr_in *addr4; in http_server_init() member 125 zsock_inet_pton(AF_INET, svc->host, &addr.addr4->sin_addr) == 1) { in http_server_init() 127 len = sizeof(*addr.addr4); in http_server_init() 129 addr.addr4->sin_family = AF_INET; in http_server_init() 130 addr.addr4->sin_port = htons(*svc->port); in http_server_init() 140 len = sizeof(*addr.addr4); in http_server_init() 142 addr.addr4->sin_family = AF_INET; in http_server_init() 143 addr.addr4->sin_port = htons(*svc->port); in http_server_init() 227 *svc->port = ntohs(addr.addr4->sin_port); in http_server_init()
|