/external/dhcpcd/ |
D | configure.c | 423 if (rt->dest.s_addr == r->dest.s_addr && in find_route() 429 rt->net.s_addr == r->net.s_addr) in find_route() 444 if (rt->gate.s_addr == INADDR_ANY) in desc_route() 447 else if (rt->gate.s_addr == rt->dest.s_addr && in desc_route() 448 rt->net.s_addr == INADDR_BROADCAST) in desc_route() 451 else if (rt->dest.s_addr == INADDR_ANY && rt->net.s_addr == INADDR_ANY) in desc_route() 482 if (rt->dest.s_addr == 0 && in n_route() 483 rt->net.s_addr == 0 && in n_route() 492 if (rt->dest.s_addr == in n_route() 493 (rt->iface->addr.s_addr & rt->iface->net.s_addr) && in n_route() [all …]
|
D | if-linux.c | 256 rt.dest.s_addr = INADDR_ANY; in link_route() 257 rt.net.s_addr = INADDR_ANY; in link_route() 258 rt.gate.s_addr = INADDR_ANY; in link_route() 264 memcpy(&rt.dest.s_addr, RTA_DATA(rta), in link_route() 265 sizeof(rt.dest.s_addr)); in link_route() 268 memcpy(&rt.gate.s_addr, RTA_DATA(rta), in link_route() 269 sizeof(rt.gate.s_addr)); in link_route() 319 addr.s_addr = dest.s_addr = INADDR_ANY; in link_addr() 320 dest.s_addr = INADDR_ANY; in link_addr() 326 memcpy(&dest.s_addr, RTA_DATA(rta), in link_addr() [all …]
|
D | net.c | 96 uint32_t mask = htonl(address.s_addr); in inet_ntocidr() 116 addr->s_addr = 0; in inet_cidrtoaddr() 118 memset(&addr->s_addr, 255, (size_t)ocets - 1); in inet_cidrtoaddr() 119 memset((unsigned char *)&addr->s_addr + (ocets - 1), in inet_cidrtoaddr() 558 addr->s_addr = a->sin_addr.s_addr; in do_address() 559 net->s_addr = n->sin_addr.s_addr; in do_address() 563 dst->s_addr = d->sin_addr.s_addr; in do_address() 565 dst->s_addr = INADDR_ANY; in do_address() 570 if (addr->s_addr == a->sin_addr.s_addr && in do_address() 571 (net == NULL || net->s_addr == n->sin_addr.s_addr)) in do_address() [all …]
|
D | arp.c | 119 state->fail.s_addr = 0; in handle_arp_packet() 160 ina.s_addr = reply_s; in handle_arp_packet() 179 state->fail.s_addr = state->offer->yiaddr; in handle_arp_packet() 182 if (IN_LINKLOCAL(htonl(iface->addr.s_addr)) && in handle_arp_packet() 183 (reply_s == iface->addr.s_addr || in handle_arp_packet() 184 (reply_s == 0 && reply_t == iface->addr.s_addr))) in handle_arp_packet() 185 state->fail.s_addr = iface->addr.s_addr; in handle_arp_packet() 187 if (state->fail.s_addr) { in handle_arp_packet() 257 addr.s_addr = state->options->arping[state->arping_index]; in send_arp_probe() 261 addr.s_addr = state->offer->yiaddr; in send_arp_probe() [all …]
|
D | dhcp.c | 404 memcpy(&a->s_addr, p, sizeof(a->s_addr)); in get_option_addr() 547 addr.s_addr = 0; in decode_rfc3442() 548 memcpy(&addr.s_addr, p, ocets); in decode_rfc3442() 557 memcpy(&addr.s_addr, p, 4); in decode_rfc3442() 603 memcpy(&rt->dest.s_addr, p, ocets); in decode_rfc3442_rt() 605 rt->net.s_addr = htonl(~0U << (32 - cidr)); in decode_rfc3442_rt() 609 memcpy(&rt->gate.s_addr, p, 4); in decode_rfc3442_rt() 643 addr.s_addr = INADDR_BROADCAST; in decode_rfc3361() 644 l = ((dl / sizeof(addr.s_addr)) * ((4 * 4) + 1)) + 1; in decode_rfc3361() 647 memcpy(&addr.s_addr, data, sizeof(addr.s_addr)); in decode_rfc3361() [all …]
|
D | bind.c | 145 lease->net.s_addr = ifo->req_mask.s_addr; in bind_interface() 153 if (ifo->req_addr.s_addr != 0) in bind_interface() 154 lease->addr.s_addr = ifo->req_addr.s_addr; in bind_interface() 156 lease->addr.s_addr = iface->addr.s_addr; in bind_interface() 210 lease->server.s_addr) in bind_interface()
|
D | dhcpcd.c | 246 iface->state->lease.addr.s_addr = 0; in drop_dhcp() 347 a = iface->addr.s_addr; in send_message() 348 iface->addr.s_addr = 0; in send_message() 352 iface->addr.s_addr = a; in send_message() 353 from.s_addr = dhcp->ciaddr; in send_message() 354 if (from.s_addr) in send_message() 355 to.s_addr = state->lease.server.s_addr; in send_message() 357 to.s_addr = 0; in send_message() 358 if (to.s_addr && to.s_addr != INADDR_BROADCAST) { in send_message() 426 if (iface->addr.s_addr == 0) { in start_expire() [all …]
|
D | if-options.c | 303 addr->s_addr = 0; in parse_addr() 305 net->s_addr = 0; in parse_addr() 326 net->s_addr = get_netmask(addr->s_addr); in parse_addr() 431 ifo->req_mask.s_addr = 0; in parse_option() 439 ifo->req_addr.s_addr = 0; in parse_option() 440 ifo->req_mask.s_addr = 0; in parse_option() 508 &addr.s_addr, sizeof(addr.s_addr)); in parse_option() 634 ifo->req_mask.s_addr == 0 ? &ifo->req_mask : NULL, in parse_option() 679 rt->dest.s_addr = INADDR_ANY; in parse_option() 680 rt->net.s_addr = INADDR_ANY; in parse_option() [all …]
|
D | if-bsd.c | 72 sin.s_addr = ((sa) != NULL) ? \ 73 (((struct sockaddr_in *)(void *)sa)->sin_addr).s_addr : 0 234 if (rt->gate.s_addr != INADDR_ANY || in if_route() 235 rt->net.s_addr != rt->iface->net.s_addr || in if_route() 236 rt->dest.s_addr != (rt->iface->addr.s_addr & rt->iface->net.s_addr)) in if_route() 239 if (rt->dest.s_addr == rt->gate.s_addr && in if_route() 240 rt->net.s_addr == INADDR_BROADCAST) in if_route()
|
D | ipv4ll.c | 94 if (iface->addr.s_addr) { in start_ipv4ll() 96 if (IN_LINKLOCAL(htonl(iface->addr.s_addr))) { in start_ipv4ll() 128 if (iface->state->fail.s_addr == iface->addr.s_addr) { in handle_ipv4ll_failure()
|
/external/dnsmasq/src/ |
D | dhcp.c | 71 saddr.sin_addr.s_addr = INADDR_ANY; in dhcp_init() 179 if (((struct in_pktinfo *)CMSG_DATA(cmptr))->ipi_addr.s_addr != INADDR_BROADCAST) in dhcp_packet() 267 if (mess->giaddr.s_addr) in dhcp_packet() 273 else if (mess->ciaddr.s_addr) in dhcp_packet() 279 if ((!is_inform && dest.sin_addr.s_addr != mess->ciaddr.s_addr) || in dhcp_packet() 280 dest.sin_port == 0 || dest.sin_addr.s_addr == 0) in dhcp_packet() 297 pkt->ipi_spec_dst.s_addr = 0; in dhcp_packet() 301 dest.sin_addr.s_addr = INADDR_BROADCAST; in dhcp_packet() 322 dest.sin_addr.s_addr = INADDR_BROADCAST; in dhcp_packet() 379 if (context->netmask.s_addr != netmask.s_addr && in complete_context() [all …]
|
D | rfc2131.c | 151 subnet_addr.s_addr = override.s_addr = 0; in dhcp_reply() 195 mess->ciaddr.s_addr = 0; in dhcp_reply() 248 if (subnet_addr.s_addr == 0 && (opt = option_find(mess, sz, OPTION_SUBNET_SELECT, INADDRSZ))) in dhcp_reply() 289 if (mess->giaddr.s_addr || subnet_addr.s_addr || mess->ciaddr.s_addr) in dhcp_reply() 295 if (subnet_addr.s_addr) in dhcp_reply() 300 else if (mess->giaddr.s_addr) in dhcp_reply() 310 if (context_tmp->netmask.s_addr && in dhcp_reply() 321 if (context_tmp->netmask.s_addr && in dhcp_reply() 753 mess->ciaddr.s_addr = 0; in dhcp_reply() 754 if (service->server.s_addr != 0) in dhcp_reply() [all …]
|
D | bpf.c | 89 broadcast.s_addr = 0; in iface_enumerate() 193 ip.ip_dst.s_addr = INADDR_BROADCAST; in send_via_bpf() 198 ip.ip_dst.s_addr = mess->yiaddr.s_addr; in send_via_bpf() 202 ip.ip_src.s_addr = iface_addr.s_addr; in send_via_bpf() 226 sum += ip.ip_src.s_addr & 0xffff; in send_via_bpf() 227 sum += (ip.ip_src.s_addr >> 16) & 0xffff; in send_via_bpf() 228 sum += ip.ip_dst.s_addr & 0xffff; in send_via_bpf() 229 sum += (ip.ip_dst.s_addr >> 16) & 0xffff; in send_via_bpf()
|
/external/selinux/libsepol/cil/test/unit/ |
D | test_cil_post.c | 412 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/ |
D | arping.c | 75 *oip = ntohl(ip->sin_addr.s_addr); in get_interface() 154 memcpy(&s_ip.s_addr, p + arp_hdr->ar_hln, 4); in recv_from() 155 memcpy(&d_ip.s_addr, p + arp_hdr->ar_hln + 4 + arp_hdr->ar_hln, 4); in recv_from() 157 if (dest_addr.s_addr != s_ip.s_addr) return; in recv_from() 159 if (src_addr.s_addr && src_addr.s_addr != d_ip.s_addr) return; in recv_from() 161 } else if (src_addr.s_addr != d_ip.s_addr ) return; in recv_from() 240 && !src_addr.s_addr) src_addr = dest_addr; in arping_main() 241 if (!(toys.optflags & FLAG_D) || src_addr.s_addr) { in arping_main() 250 if (src_addr.s_addr) { in arping_main() 262 src_addr.s_addr = htonl(oip); in arping_main()
|
D | dhcp.c | 301 *oip = ntohl(ip->sin_addr.s_addr); in get_interface() 514 if (res->ipaddr.s_addr) { in fill_envp() 515 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/srtp/test/ |
D | rtpw.c | 244 if (rcvr_addr.s_addr == INADDR_NONE) { in main() 249 rcvr_addr.s_addr = inet_addr(address); in main() 250 if (0xffffffff == rcvr_addr.s_addr) { in main() 273 if (ADDR_IS_MULTICAST(rcvr_addr.s_addr)) { in main() 284 mreq.imr_multiaddr.s_addr = rcvr_addr.s_addr; in main() 285 mreq.imr_interface.s_addr = htonl(INADDR_ANY); in main() 397 local.sin_addr.s_addr = htonl(INADDR_ANY); in main() 426 if (ADDR_IS_MULTICAST(rcvr_addr.s_addr)) { in main() 452 if (ADDR_IS_MULTICAST(rcvr_addr.s_addr)) { in main() 481 if (ADDR_IS_MULTICAST(rcvr_addr.s_addr)) { in main()
|
/external/iptables/iptables/ |
D | iptables.c | 570 if (fw->ip.smsk.s_addr == 0L && !(format & FMT_NUMERIC)) in print_firewall() 582 if (fw->ip.dmsk.s_addr == 0L && !(format & FMT_NUMERIC)) in print_firewall() 641 fw->ip.src.s_addr = saddrs[i].s_addr; in append_entry() 642 fw->ip.smsk.s_addr = smasks[i].s_addr; in append_entry() 644 fw->ip.dst.s_addr = daddrs[j].s_addr; in append_entry() 645 fw->ip.dmsk.s_addr = dmasks[j].s_addr; in append_entry() 664 fw->ip.src.s_addr = saddr->s_addr; in replace_entry() 665 fw->ip.dst.s_addr = daddr->s_addr; in replace_entry() 666 fw->ip.smsk.s_addr = smask->s_addr; in replace_entry() 667 fw->ip.dmsk.s_addr = dmask->s_addr; in replace_entry() [all …]
|
/external/openssh/ |
D | addrmatch.c | 131 n->v4.s_addr = htonl((0xffffffff << (32 - l)) & 0xffffffff); in addr_netmask() 161 dst->v4.s_addr &= b->v4.s_addr; in addr_and() 187 if (a->v4.s_addr == b->v4.s_addr) in addr_cmp() 189 return ntohl(a->v4.s_addr) > ntohl(b->v4.s_addr) ? 1 : -1; in addr_cmp() 244 n->v4.s_addr = ~n->v4.s_addr; in addr_invert() 279 return (a->v4.s_addr == 0 ? 0 : -1); in addr_is_all0s()
|
/external/dnsmasq/contrib/wrt/ |
D | dhcp_release.c | 178 return (a.s_addr & mask.s_addr) == (b.s_addr & mask.s_addr); in is_same_net() 232 netmask.s_addr = htonl(0xffffffff << (32 - ifa->ifa_prefixlen)); in find_interface() 233 addr.s_addr = 0; in find_interface() 239 if (addr.s_addr && is_same_net(addr, client, netmask)) in find_interface() 285 lease.s_addr = inet_addr(argv[2]); in main()
|
/external/lldb/tools/debugserver/source/ |
D | RNBSocket.cpp | 82 listen_addr.sin_addr.s_addr = INADDR_ANY; in Listen() 84 if (!ResolveIPV4HostName(listen_host, listen_addr.sin_addr.s_addr)) in Listen() 109 …sa.sin_addr.s_addr = INADDR_ANY; // Let incoming connections bind to any host network interface (t… in Listen() 171 if (listen_addr.sin_addr.s_addr == INADDR_ANY) in Listen() 176 accept_addr.sin_addr.s_addr == listen_addr.sin_addr.s_addr) in Listen() 184 const uint8_t *accept_ip = (const uint8_t *)&accept_addr.sin_addr.s_addr; in Listen() 185 const uint8_t *listen_ip = (const uint8_t *)&listen_addr.sin_addr.s_addr; in Listen() 230 if (!ResolveIPV4HostName(host, sa.sin_addr.s_addr)) in Connect()
|
/external/iptables/extensions/ |
D | libipt_SAME.c | 58 range->min_ip = ip->s_addr; in parse_to() 66 range->max_ip = ip->s_addr; in parse_to() 124 a.s_addr = r->min_ip; in SAME_print() 127 a.s_addr = r->max_ip; in SAME_print() 152 a.s_addr = r->min_ip; in SAME_save() 154 a.s_addr = r->max_ip; in SAME_save()
|
/external/iputils/ |
D | rdisc.c | 224 return (sin->sin_addr.s_addr == INADDR_BROADCAST); in isbroadcast() 229 return IN_CLASSD(ntohl(sin->sin_addr.s_addr)); in ismulticast() 423 to->sin_addr.s_addr = inet_addr(sendaddress); in main() 427 joinaddr.sin_addr.s_addr = inet_addr(recvaddress); in main() 611 ap->ira_addr = interfaces[i].localaddr.s_addr; in advertise() 631 if ((sin->sin_addr.s_addr & ifp->netmask.s_addr) == in advertise() 632 (ifp->address.s_addr & ifp->netmask.s_addr)) { in advertise() 704 phe = gethostbyaddr((char *)&addr.s_addr, 4, AF_INET); in pr_name() 806 ina.s_addr = ap->ira_addr; in pr_pack() 880 sin.sin_addr.s_addr = htonl(0xe0000001); in pr_pack() [all …]
|
/external/iptables/libiptc/ |
D | libip4tc.c | 132 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/wpa_supplicant_8/wpa_supplicant/ |
D | ctrl_iface_udp.c | 114 if (from->sin_addr.s_addr == dst->addr.sin_addr.s_addr && 161 if (from->sin_addr.s_addr == dst->addr.sin_addr.s_addr && 234 if (from.sin_addr.s_addr != htonl((127 << 24) | 1)) { 376 addr.sin_addr.s_addr = INADDR_ANY; 378 addr.sin_addr.s_addr = htonl((127 << 24) | 1); 564 if (from.sin_addr.s_addr != htonl((127 << 24) | 1)) { 649 addr.sin_addr.s_addr = INADDR_ANY; 651 addr.sin_addr.s_addr = htonl((127 << 24) | 1);
|