Home
last modified time | relevance | path

Searched refs:s_addr (Results 1 – 25 of 327) sorted by relevance

12345678910>>...14

/third_party/iptables/
Dbugfix-add-check-fw-in-entry.patch87 fw->ip.src.s_addr = saddrs[i].s_addr;
88 fw->ip.smsk.s_addr = smasks[i].s_addr;
97 fw->ip.src.s_addr = saddr->s_addr;
98 fw->ip.dst.s_addr = daddr->s_addr;
99 fw->ip.smsk.s_addr = smask->s_addr;
109 fw->ip.src.s_addr = saddrs[i].s_addr;
110 fw->ip.smsk.s_addr = smasks[i].s_addr;
121 fw->ip.src.s_addr = saddrs[i].s_addr;
132 fw->ip.src.s_addr = saddrs[i].s_addr;
/third_party/musl/libc-test/src/functionalext/supplement/network/network_gtest/
Darpa_inet_test.cpp48 addr.s_addr = 0;
51 EXPECT_EQ((htonl)(0x7f090807), addr.s_addr);
63 addr.s_addr = 0;
66 EXPECT_EQ((htonl)(0x7f090008), addr.s_addr);
78 addr.s_addr = 0;
81 EXPECT_EQ((htonl)(0x7f000009), addr.s_addr);
93 addr.s_addr = 0;
96 EXPECT_EQ((htonl)(0xff000009), addr.s_addr);
108 addr.s_addr = 0;
111 EXPECT_EQ((htonl)(0xff000009), addr.s_addr);
[all …]
/third_party/musl/libc-test/src/functionalext/supplement/network/
Dinet_aton.c27 a.s_addr = 0; in inet_aton_0100()
32 if (a.s_addr != (htonl)(0x7f010203)) { in inet_aton_0100()
45 a.s_addr = 0; in inet_aton_0200()
50 if (a.s_addr != (htonl)(0x7f010002)) { in inet_aton_0200()
63 a.s_addr = 0; in inet_aton_0300()
68 if (a.s_addr != (htonl)(0x7f000001)) { in inet_aton_0300()
81 a.s_addr = 0; in inet_aton_0400()
86 if (a.s_addr != (htonl)(0x7f000001)) { in inet_aton_0400()
99 a.s_addr = 0; in inet_aton_0500()
104 if (a.s_addr != (htonl)(0xff000001)) { in inet_aton_0500()
Dinet_makeaddr.c32 EXPECT_EQ("inet_makeaddr_0100", htonl(IP), a.s_addr); in inet_makeaddr_0100()
45 EXPECT_EQ("inet_makeaddr_0200", htonl(ip), a.s_addr); in inet_makeaddr_0200()
58 EXPECT_EQ("inet_makeaddr_0200", htonl(ip), a.s_addr); in inet_makeaddr_0300()
/third_party/pulseaudio/src/pulsecore/
Darpa-inet.c47 (int)(in->s_addr >> 24) & 0xff, in inet_ntop()
48 (int)(in->s_addr >> 16) & 0xff, in inet_ntop()
49 (int)(in->s_addr >> 8) & 0xff, in inet_ntop()
50 (int)(in->s_addr >> 0) & 0xff); in inet_ntop()
52 (int)(in->s_addr >> 0) & 0xff, in inet_ntop()
53 (int)(in->s_addr >> 8) & 0xff, in inet_ntop()
54 (int)(in->s_addr >> 16) & 0xff, in inet_ntop()
55 (int)(in->s_addr >> 24) & 0xff); in inet_ntop()
90 in->s_addr = inet_addr(src); in inet_pton()
91 if (in->s_addr == INADDR_NONE) in inet_pton()
/third_party/selinux/libsepol/cil/test/unit/
Dtest_cil_post.c412 anodecon->addr->ip.v4.s_addr = 103; in test_cil_post_nodecon_compare_aipv4_bipv6()
413 anodecon->mask->ip.v4.s_addr = 100; in test_cil_post_nodecon_compare_aipv4_bipv6()
416 bnodecon->addr->ip.v4.s_addr = 100; in test_cil_post_nodecon_compare_aipv4_bipv6()
417 bnodecon->mask->ip.v4.s_addr = 100; in test_cil_post_nodecon_compare_aipv4_bipv6()
435 anodecon->addr->ip.v4.s_addr = 103; in test_cil_post_nodecon_compare_aipv6_bipv4()
436 anodecon->mask->ip.v4.s_addr = 100; in test_cil_post_nodecon_compare_aipv6_bipv4()
439 bnodecon->addr->ip.v4.s_addr = 100; in test_cil_post_nodecon_compare_aipv6_bipv4()
440 bnodecon->mask->ip.v4.s_addr = 100; in test_cil_post_nodecon_compare_aipv6_bipv4()
458 anodecon->addr->ip.v4.s_addr = 103; in test_cil_post_nodecon_compare_aipv4_greaterthan_bipv4()
459 anodecon->mask->ip.v4.s_addr = 100; in test_cil_post_nodecon_compare_aipv4_greaterthan_bipv4()
[all …]
/third_party/toybox/toys/pending/
Darping.c69 *oip = ntohl(ip->sin_addr.s_addr); in get_interface()
148 memcpy(&s_ip.s_addr, p + arp_hdr->ar_hln, 4); in recv_from()
149 memcpy(&d_ip.s_addr, p + arp_hdr->ar_hln + 4 + arp_hdr->ar_hln, 4); in recv_from()
151 if (dest_addr.s_addr != s_ip.s_addr) return; in recv_from()
153 if (src_addr.s_addr && src_addr.s_addr != d_ip.s_addr) return; in recv_from()
155 } else if (src_addr.s_addr != d_ip.s_addr ) return; in recv_from()
233 && !src_addr.s_addr) src_addr = dest_addr; in arping_main()
234 if (!(toys.optflags & FLAG_D) || src_addr.s_addr) { in arping_main()
243 if (src_addr.s_addr) { in arping_main()
253 src_addr.s_addr = htonl(oip); in arping_main()
Ddhcp.c298 *oip = ntohl(ip->sin_addr.s_addr); in get_interface()
511 if (res->ipaddr.s_addr) { in fill_envp()
512 temp.s_addr = htonl(res->ipaddr.s_addr); in fill_envp()
638 addr.sin_addr.s_addr = INADDR_ANY ; in mode_app()
783 cli.sin_addr.s_addr = state->pdhcp.ciaddr; in send_app()
791 cli.sin_addr.s_addr = state->serverid.s_addr; in send_app()
873 memcpy(optptr, &serverid->s_addr, 4); in dhcpc_addserverid()
882 memcpy(optptr, &ipaddr->s_addr, 4); in dhcpc_addreqipaddr()
953 state->serverid.s_addr = var; in get_option_serverid()
954 presult->serverid.s_addr = state->serverid.s_addr; in get_option_serverid()
[all …]
/third_party/ltp/testcases/network/multicast/mc_commo/
Dmc_send.c46 imr.imr_multiaddr.s_addr = in main()
50 memcpy(&imr.imr_interface.s_addr, hp->h_addr, hp->h_length); in main()
56 imr.imr_interface.s_addr = in main()
65 mcast_out.sin_addr.s_addr = imr.imr_multiaddr.s_addr; in main()
75 &imr.imr_interface.s_addr, in main()
76 sizeof(imr.imr_interface.s_addr)) != 0) { in main()
/third_party/ltp/testcases/lib/
Dtst_net_vars.c97 mask.s_addr = htonl(~((1 << (32 - prefix)) - 1)); in prefix2mask()
99 mask.s_addr = htonl(0); in prefix2mask()
115 network.s_addr = ip->s_addr & mask->s_addr; in calc_network()
122 return (ip->s_addr & mask->s_addr) == in is_in_subnet_ipv4()
123 (network->s_addr & mask->s_addr); in is_in_subnet_ipv4()
195 broadcast.s_addr = (ip.s_addr & mask.s_addr) | ~mask.s_addr; in get_ipv4_broadcast()
230 (rand() % 128) + (((ip->s_addr >> 8) & 0xff) < 128 ? 128 : 0)); in get_ipv4_net16_unused()
239 sprintf(net_unused, "%d.%d", (rand() % 128) + (((ip->s_addr) & 0xff) in get_ipv4_net16_unused()
516 vars.ipv4_lnetwork = get_ipv4_network(lip.s_addr, lprefix_round); in get_ipv4_info()
517 vars.ipv4_rnetwork = get_ipv4_network(rip.s_addr, rprefix_round); in get_ipv4_info()
/third_party/ltp/testcases/network/sockets/
DltpClient.c129 memcpy((char *)&udpRemoteServerAddr.sin_addr.s_addr, in main()
136 memcpy((char *)&tcpRemoteServerAddr.sin_addr.s_addr, in main()
143 memcpy((char *)&mcastRemoteServerAddr.sin_addr.s_addr, in main()
161 udpClientAddr.sin_addr.s_addr = htonl(INADDR_ANY); in main()
166 tcpClientAddr.sin_addr.s_addr = htonl(INADDR_ANY); in main()
198 if (!IN_MULTICAST(ntohl(mcastRemoteServerAddr.sin_addr.s_addr))) { in main()
216 mcastClientAddr.sin_addr.s_addr = htonl(INADDR_ANY); in main()
322 rawTraceAddr.sin_addr.s_addr = *(long *)hostEntry->h_addr; in ltp_run_traceroute_tests()
349 rawAddr.sin_addr.s_addr = *(long *)hostEntry->h_addr; in ltp_run_ping_tests()
460 tmp_addr.s_addr = ip->saddr; in output_to_display()
[all …]
DltpServer.c101 if (!IN_MULTICAST(ntohl(multiCastAddr.s_addr))) { in main()
117 multiServerAddr.sin_addr.s_addr = htonl(INADDR_ANY); in main()
129 multiCastReq.imr_multiaddr.s_addr = in main()
130 multiCastAddr.s_addr; in main()
131 multiCastReq.imr_interface.s_addr = in main()
174 udpServerAddr.sin_addr.s_addr = htonl(INADDR_ANY); in main()
191 tcpServerAddr.sin_addr.s_addr = htonl(INADDR_ANY); in main()
/third_party/musl/porting/liteos_a/user/src/misc/
Dgethostid.c28 memcpy(&in.s_addr, *p, sizeof(in.s_addr)); in gethostid()
30 return (long)((in.s_addr << HOSTID_NUM) | (in.s_addr >> HOSTID_NUM)); in gethostid()
/third_party/ltp/utils/sctp/func_tests/
Dtest_connectx.c96 svr_loop[i].sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i); in main()
99 svr_test[i].v4.sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i); in main()
103 svr_try[i].sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i); in main()
106 svr_try[i].sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i + 0x400); in main()
110 clt_loop1[i].sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i + 0x100); in main()
113 clt_test1[i].v4.sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i + 0x100); in main()
116 clt_loop2[i].sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i + 0x200); in main()
119 clt_test2[i].v4.sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i + 0x200); in main()
122 clt_loop3[i].sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i + 0x300); in main()
Dtest_getname.c90 svr_loop.v4.sin_addr.s_addr = INADDR_ANY; in main()
127 svr_loop.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK; in main()
195 if (svr_local_addr.v4.sin_addr.s_addr != in main()
196 clt_peer_addr.v4.sin_addr.s_addr) in main()
199 if (svr_peer_addr.v4.sin_addr.s_addr != in main()
200 clt_local_addr.v4.sin_addr.s_addr) in main()
Dtest_1_to_1_addrs.c120 conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK; in main()
124 lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK; in main()
221 addr->sin_addr.s_addr != lstn_addr.sin_addr.s_addr) in main()
278 addr->sin_addr.s_addr != acpt_addr.sin_addr.s_addr) in main()
/third_party/rust/crates/rustix/src/backend/libc/net/
Dext.rs19 addr.s_addr in in_addr_s_addr()
42 pub(crate) const fn in_addr_new(s_addr: u32) -> c::in_addr { in in_addr_new()
43 c::in_addr { s_addr } in in_addr_new()
49 pub(crate) const fn in_addr_new(s_addr: u32) -> c::in_addr { in in_addr_new()
50 unsafe { core::mem::transmute(s_addr) } in in_addr_new()
58 pub(crate) fn in_addr_new(s_addr: u32) -> c::in_addr { in in_addr_new()
59 unsafe { core::mem::transmute(s_addr) } in in_addr_new()
/third_party/musl/libc-test/src/functionalext/supplement/manual/network/
Dgetnameinfo.c43 inet_pton(AF_INET, "127.0.0.1", &sa.sin_addr.s_addr); in getnameinfo_0100()
90 inet_pton(AF_INET, "127.0.0.1", &sa.sin_addr.s_addr); in getnameinfo_0300()
109 inet_pton(AF_INET, "127.0.0.1", &sa.sin_addr.s_addr); in getnameinfo_0400()
127 inet_pton(AF_INET, "127.0.0.1", &sa.sin_addr.s_addr); in getnameinfo_0500()
184 addrDst.sin_addr.s_addr = inet_addr(ptr); in getnameinfo_0900()
204 addrDst.sin_addr.s_addr = inet_addr(ptr); in getnameinfo_1000()
225 addrDst.sin_addr.s_addr = inet_addr(ptr); in getnameinfo_1100()
245 addrDst.sin_addr.s_addr = inet_addr(ptr); in getnameinfo_1200()
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/ap/
Dfils_hlp.c130 addr.sin_addr.s_addr = hapd->conf->dhcp_server.u.v4.s_addr; in fils_dhcp_request()
183 if (dhcp->relay_ip != hapd->conf->own_ip_addr.u.v4.s_addr) { in fils_dhcp_handler()
267 iph->ip_src.s_addr = hapd->conf->dhcp_server.u.v4.s_addr; in fils_dhcp_handler()
268 iph->ip_dst.s_addr = dhcp->client_ip; in fils_dhcp_handler()
388 hapd->conf->dhcp_server.u.v4.s_addr == 0) { in fils_process_hlp_dhcp()
395 hapd->conf->own_ip_addr.u.v4.s_addr == 0) { in fils_process_hlp_dhcp()
415 addr.sin_addr.s_addr = in fils_process_hlp_dhcp()
416 hapd->conf->own_ip_addr.u.v4.s_addr; in fils_process_hlp_dhcp()
440 dhcp_msg->relay_ip = hapd->conf->own_ip_addr.u.v4.s_addr; in fils_process_hlp_dhcp()
443 addr.sin_addr.s_addr = hapd->conf->dhcp_server.u.v4.s_addr; in fils_process_hlp_dhcp()
[all …]
/third_party/ltp/testcases/network/multicast/mc_member/
Dmc_member_test.c77 memcpy(&imr.imr_interface.s_addr, hp->h_addr, hp->h_length); in main()
82 imr.imr_interface.s_addr = in main()
87 &imr.imr_interface.s_addr, in main()
88 sizeof(imr.imr_interface.s_addr)) != 0) { in main()
126 imr->imr_multiaddr.s_addr = in join_group()
161 imr->imr_multiaddr.s_addr = in leave_group()
/third_party/ltp/testcases/network/multicast/mc_opts/
Dmc_verify_opts.c44 memcpy(&simr.imr_interface.s_addr, hp->h_addr, hp->h_length); in main()
49 simr.imr_interface.s_addr = in main()
55 &simr.imr_interface.s_addr, in main()
56 sizeof(simr.imr_interface.s_addr)) != 0) { in main()
/third_party/ltp/testcases/network/stress/ns-tools/
Dns-igmp_querier.c202 query->group = ip.s_addr; in create_query()
219 query->srcs[idx] = ip.s_addr; in create_query()
375 req_p->imr_multiaddr.s_addr = info_p->query->group; in create_socket()
376 req_p->imr_address.s_addr = htonl(INADDR_ANY); in create_socket()
418 to.sin_addr.s_addr = IGMP_ALL_HOSTS; in send_query()
420 to.sin_addr.s_addr = info_p->query->group; in send_query()
/third_party/node/deps/cares/src/tools/
Dacountry.c167 if (addr.s_addr == INADDR_NONE) in main()
176 (unsigned int)(addr.s_addr >> 24), in main()
177 (unsigned int)((addr.s_addr >> 16) & 255), in main()
178 (unsigned int)((addr.s_addr >> 8) & 255), in main()
179 (unsigned int)(addr.s_addr & 255)); in main()
576 ip = ntohl(addr.s_addr); in find_country_from_cname()
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/wps/
Dwps_upnp_ssdp.c239 dest.sin_addr.s_addr = inet_addr(UPNP_MULTICAST_ADDRESS); in advertisement_state_machine_stop()
288 dest.sin_addr.s_addr = inet_addr(UPNP_MULTICAST_ADDRESS); in advertisement_state_machine_handler()
743 addr.sin_addr.s_addr = htonl(INADDR_ANY); in ssdp_listener_open()
748 mcast_addr.imr_interface.s_addr = htonl(INADDR_ANY); in ssdp_listener_open()
749 mcast_addr.imr_multiaddr.s_addr = inet_addr(UPNP_MULTICAST_ADDRESS); in ssdp_listener_open()
821 sin->sin_addr.s_addr = inet_addr(SSDP_TARGET); in add_ssdp_network()
825 sin->sin_addr.s_addr = inet_addr(SSDP_NETMASK); in add_ssdp_network()
904 mreq.imr_multiaddr.s_addr = inet_addr(UPNP_MULTICAST_ADDRESS); in ssdp_open_multicast_sock()
905 mreq.imr_interface.s_addr = ip_addr; in ssdp_open_multicast_sock()
908 mreq.imr_multiaddr.s_addr, in ssdp_open_multicast_sock()
[all …]
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/ap/
Dfils_hlp.c130 addr.sin_addr.s_addr = hapd->conf->dhcp_server.u.v4.s_addr; in fils_dhcp_request()
183 if (dhcp->relay_ip != hapd->conf->own_ip_addr.u.v4.s_addr) { in fils_dhcp_handler()
267 iph->saddr = hapd->conf->dhcp_server.u.v4.s_addr; in fils_dhcp_handler()
388 hapd->conf->dhcp_server.u.v4.s_addr == 0) { in fils_process_hlp_dhcp()
395 hapd->conf->own_ip_addr.u.v4.s_addr == 0) { in fils_process_hlp_dhcp()
415 addr.sin_addr.s_addr = in fils_process_hlp_dhcp()
416 hapd->conf->own_ip_addr.u.v4.s_addr; in fils_process_hlp_dhcp()
440 dhcp_msg->relay_ip = hapd->conf->own_ip_addr.u.v4.s_addr; in fils_process_hlp_dhcp()
443 addr.sin_addr.s_addr = hapd->conf->dhcp_server.u.v4.s_addr; in fils_process_hlp_dhcp()

12345678910>>...14