Home
last modified time | relevance | path

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

12345678910>>...19

/external/dnsmasq/src/
Ddhcp.c68 saddr.sin_addr.s_addr = INADDR_ANY; in dhcp_init()
152 if (((struct in_pktinfo*) CMSG_DATA(cmptr))->ipi_addr.s_addr != INADDR_BROADCAST) in dhcp_packet()
212 if (mess->giaddr.s_addr) { in dhcp_packet()
216 } else if (mess->ciaddr.s_addr) { in dhcp_packet()
221 if ((!is_inform && dest.sin_addr.s_addr != mess->ciaddr.s_addr) || dest.sin_port == 0 || in dhcp_packet()
222 dest.sin_addr.s_addr == 0) { in dhcp_packet()
237 pkt->ipi_spec_dst.s_addr = 0; in dhcp_packet()
241 dest.sin_addr.s_addr = INADDR_BROADCAST; in dhcp_packet()
282 if (context->netmask.s_addr != netmask.s_addr && in complete_context()
294 if (context->netmask.s_addr) { in complete_context()
[all …]
Drfc2131.c146 subnet_addr.s_addr = override.s_addr = 0; in dhcp_reply()
184 mess->ciaddr.s_addr = 0; in dhcp_reply()
236 … if (subnet_addr.s_addr == 0 && (opt = option_find(mess, sz, OPTION_SUBNET_SELECT, INADDRSZ))) in dhcp_reply()
274 if (mess->giaddr.s_addr || subnet_addr.s_addr || mess->ciaddr.s_addr) { in dhcp_reply()
279 if (subnet_addr.s_addr) { in dhcp_reply()
282 } else if (mess->giaddr.s_addr) { in dhcp_reply()
289 if (context_tmp->netmask.s_addr && in dhcp_reply()
299 if (context_tmp->netmask.s_addr && in dhcp_reply()
666 mess->ciaddr.s_addr = 0; in dhcp_reply()
667 if (service->server.s_addr != 0) in dhcp_reply()
[all …]
/external/iptables/iptables/
Dnft-ipv4.c51 if (cs->fw.ip.src.s_addr || cs->fw.ip.smsk.s_addr || cs->fw.ip.invflags & IPT_INV_SRCIP) { in nft_ipv4_add()
55 &cs->fw.ip.src.s_addr, &cs->fw.ip.smsk.s_addr, in nft_ipv4_add()
58 if (cs->fw.ip.dst.s_addr || cs->fw.ip.dmsk.s_addr || cs->fw.ip.invflags & IPT_INV_DSTIP) { in nft_ipv4_add()
62 &cs->fw.ip.dst.s_addr, &cs->fw.ip.dmsk.s_addr, in nft_ipv4_add()
102 if (a->fw.ip.src.s_addr != b->fw.ip.src.s_addr in nft_ipv4_is_same()
103 || a->fw.ip.dst.s_addr != b->fw.ip.dst.s_addr in nft_ipv4_is_same()
104 || a->fw.ip.smsk.s_addr != b->fw.ip.smsk.s_addr in nft_ipv4_is_same()
105 || a->fw.ip.dmsk.s_addr != b->fw.ip.dmsk.s_addr in nft_ipv4_is_same()
142 .s_addr = mask, in mask_to_str()
185 mask->s_addr = ctx->bitwise.mask[0]; in parse_mask_ipv4()
[all …]
Dnft-arp.c51 bytep = (const unsigned char *) &(addrp->s_addr); in addr_to_dotted()
73 if ((net = getnetbyaddr((long) ntohl(addr->s_addr), AF_INET)) != NULL) in addr_to_network()
98 maskaddr = ntohl(mask->s_addr); in mask_to_dotted()
189 if (fw->arp.src.s_addr != 0 || in nft_arp_add()
190 fw->arp.smsk.s_addr != 0 || in nft_arp_add()
195 &fw->arp.src.s_addr, &fw->arp.smsk.s_addr, in nft_arp_add()
209 if (fw->arp.tgt.s_addr != 0 || in nft_arp_add()
210 fw->arp.tmsk.s_addr != 0 || in nft_arp_add()
215 &fw->arp.tgt.s_addr, &fw->arp.tmsk.s_addr, in nft_arp_add()
267 mask->s_addr = ctx->bitwise.mask[0]; in parse_mask_ipv4()
[all …]
Dxtables-arp.c365 cs->arp.arp.src.s_addr = saddrs[i].s_addr; in append_entry()
366 cs->arp.arp.smsk.s_addr = smasks[i].s_addr; in append_entry()
368 cs->arp.arp.tgt.s_addr = daddrs[j].s_addr; in append_entry()
369 cs->arp.arp.tmsk.s_addr = dmasks[j].s_addr; in append_entry()
394 cs->arp.arp.src.s_addr = saddr->s_addr; in replace_entry()
395 cs->arp.arp.tgt.s_addr = daddr->s_addr; in replace_entry()
396 cs->arp.arp.smsk.s_addr = smask->s_addr; in replace_entry()
397 cs->arp.arp.tmsk.s_addr = dmask->s_addr; in replace_entry()
418 cs->arp.arp.src.s_addr = saddrs[i].s_addr; in delete_entry()
419 cs->arp.arp.smsk.s_addr = smasks[i].s_addr; in delete_entry()
[all …]
Diptables.c473 fw->ip.src.s_addr = saddrs[i].s_addr; in append_entry()
474 fw->ip.smsk.s_addr = smasks[i].s_addr; in append_entry()
476 fw->ip.dst.s_addr = daddrs[j].s_addr; in append_entry()
477 fw->ip.dmsk.s_addr = dmasks[j].s_addr; in append_entry()
496 fw->ip.src.s_addr = saddr->s_addr; in replace_entry()
497 fw->ip.dst.s_addr = daddr->s_addr; in replace_entry()
498 fw->ip.smsk.s_addr = smask->s_addr; in replace_entry()
499 fw->ip.dmsk.s_addr = dmask->s_addr; in replace_entry()
523 fw->ip.src.s_addr = saddrs[i].s_addr; in insert_entry()
524 fw->ip.smsk.s_addr = smasks[i].s_addr; in insert_entry()
[all …]
Dxtables.c276 cs->fw.ip.src.s_addr = s.addr.v4[i].s_addr; in add_entry()
277 cs->fw.ip.smsk.s_addr = s.mask.v4[i].s_addr; in add_entry()
279 cs->fw.ip.dst.s_addr = d.addr.v4[j].s_addr; in add_entry()
280 cs->fw.ip.dmsk.s_addr = d.mask.v4[j].s_addr; in add_entry()
328 cs->fw.ip.src.s_addr = s.addr.v4->s_addr; in replace_entry()
329 cs->fw.ip.dst.s_addr = d.addr.v4->s_addr; in replace_entry()
330 cs->fw.ip.smsk.s_addr = s.mask.v4->s_addr; in replace_entry()
331 cs->fw.ip.dmsk.s_addr = d.mask.v4->s_addr; in replace_entry()
357 cs->fw.ip.src.s_addr = s.addr.v4[i].s_addr; in delete_entry()
358 cs->fw.ip.smsk.s_addr = s.mask.v4[i].s_addr; in delete_entry()
[all …]
/external/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()
/external/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 …]
/external/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 …]
/external/ltp/testcases/lib/
Dtst_net_vars.c96 mask.s_addr = htonl(~((1 << (32 - prefix)) - 1)); in prefix2mask()
98 mask.s_addr = htonl(0); in prefix2mask()
114 network.s_addr = ip->s_addr & mask->s_addr; in calc_network()
121 return (ip->s_addr & mask->s_addr) == in is_in_subnet_ipv4()
122 (network->s_addr & mask->s_addr); in is_in_subnet_ipv4()
194 broadcast.s_addr = (ip.s_addr & mask.s_addr) | ~mask.s_addr; in get_ipv4_broadcast()
229 (rand() % 128) + (((ip->s_addr >> 8) & 0xff) < 128 ? 128 : 0)); in get_ipv4_net16_unused()
238 sprintf(net_unused, "%d.%d", (rand() % 128) + (((ip->s_addr) & 0xff) in get_ipv4_net16_unused()
515 vars.ipv4_lnetwork = get_ipv4_network(lip.s_addr, lprefix_round); in get_ipv4_info()
516 vars.ipv4_rnetwork = get_ipv4_network(rip.s_addr, rprefix_round); in get_ipv4_info()
/external/iptables/libiptc/
Dlibip4tc.c132 IP_PARTS(e->ip.src.s_addr),IP_PARTS(e->ip.smsk.s_addr)); in dump_entry()
134 IP_PARTS(e->ip.dst.s_addr),IP_PARTS(e->ip.dmsk.s_addr)); in dump_entry()
178 if (a->ip.src.s_addr != b->ip.src.s_addr in is_same()
179 || a->ip.dst.s_addr != b->ip.dst.s_addr in is_same()
180 || a->ip.smsk.s_addr != b->ip.smsk.s_addr in is_same()
181 || a->ip.dmsk.s_addr != b->ip.dmsk.s_addr in is_same()
/external/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 …]
/external/openssh/
Daddrmatch.c130 n->v4.s_addr = htonl((0xffffffff << (32 - l)) & 0xffffffff); in addr_netmask()
160 dst->v4.s_addr &= b->v4.s_addr; in addr_and()
186 if (a->v4.s_addr == b->v4.s_addr) in addr_cmp()
188 return ntohl(a->v4.s_addr) > ntohl(b->v4.s_addr) ? 1 : -1; in addr_cmp()
242 n->v4.s_addr = ~n->v4.s_addr; in addr_invert()
277 return (a->v4.s_addr == 0 ? 0 : -1); in addr_is_all0s()
/external/libnl/tests/
Dtest-create-sit.c39 inet_pton(AF_INET, "192.168.254.12", &addr.s_addr); in main()
40 rtnl_link_sit_set_local(link, addr.s_addr); in main()
42 inet_pton(AF_INET, "192.168.254.13", &addr.s_addr); in main()
43 rtnl_link_sit_set_remote(link, addr.s_addr); in main()
Dtest-create-ipgretap.c39 inet_pton(AF_INET, "10.211.55.10", &addr.s_addr); in main()
40 rtnl_link_ipgre_set_local(link, addr.s_addr); in main()
42 inet_pton(AF_INET, "10.133.6.33", &addr.s_addr); in main()
43 rtnl_link_ipgre_set_remote(link, addr.s_addr); in main()
Dtest-create-ipgre.c39 inet_pton(AF_INET, "192.168.254.12", &addr.s_addr); in main()
40 rtnl_link_ipgre_set_local(link, addr.s_addr); in main()
42 inet_pton(AF_INET, "192.168.254.13", &addr.s_addr); in main()
43 rtnl_link_ipgre_set_remote(link, addr.s_addr); in main()
Dtest-create-ipvti.c39 inet_pton(AF_INET, "192.168.254.12", &addr.s_addr); in main()
40 rtnl_link_ipvti_set_local(link, addr.s_addr); in main()
42 inet_pton(AF_INET, "192.168.254.13", &addr.s_addr); in main()
43 rtnl_link_ipvti_set_remote(link, addr.s_addr); in main()
Dtest-create-ipip.c39 inet_pton(AF_INET, "192.168.254.12", &addr.s_addr); in main()
40 rtnl_link_ipip_set_local(link, addr.s_addr); in main()
42 inet_pton(AF_INET, "192.168.254.13", &addr.s_addr); in main()
43 rtnl_link_ipip_set_remote(link, addr.s_addr); in main()
/external/ltp/utils/sctp/func_tests/
Dtest_connectx.c92 svr_loop[i].sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i); in main()
95 svr_test[i].v4.sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i); in main()
99 svr_try[i].sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i); in main()
102 svr_try[i].sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i + 0x400); in main()
106 clt_loop1[i].sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i + 0x100); in main()
109 clt_test1[i].v4.sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i + 0x100); in main()
112 clt_loop2[i].sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i + 0x200); in main()
115 clt_test2[i].v4.sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i + 0x200); in main()
118 clt_loop3[i].sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i + 0x300); in main()
/external/grpc-grpc/src/objective-c/tests/CronetUnitTests/
DCronetUnitTests.m183 struct sockaddr_in s_addr;
184 memset(&s_addr, 0, sizeof(s_addr));
185 s_addr.sin_family = AF_INET;
186 s_addr.sin_addr.s_addr = htonl(INADDR_ANY);
187 s_addr.sin_port = htons(port);
188 GPR_ASSERT(0 == bind(sl, (struct sockaddr *)&s_addr, sizeof(s_addr)));
315 struct sockaddr_in s_addr;
316 memset(&s_addr, 0, sizeof(s_addr));
317 s_addr.sin_family = AF_INET;
318 s_addr.sin_addr.s_addr = htonl(INADDR_ANY);
[all …]
/external/parameter-framework/asio-1.10.6/include/asio/ip/
Daddress_v4.hpp50 addr_.s_addr = 0; in address_v4()
132 return a1.addr_.s_addr == a2.addr_.s_addr; in operator ==()
138 return a1.addr_.s_addr != a2.addr_.s_addr; in operator !=()
/external/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()
/external/wpa_supplicant_8/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 …]

12345678910>>...19