/external/dhcpcd-6.8.2/ |
D | ipv4.c | 64 uint32_t mask = htonl(address.s_addr); in inet_ntocidr() 84 addr->s_addr = 0; in inet_cidrtoaddr() 86 memset(&addr->s_addr, 255, (size_t)ocets - 1); in inet_cidrtoaddr() 87 memset((unsigned char *)&addr->s_addr + (ocets - 1), in inet_cidrtoaddr() 123 if ((addr == NULL || ap->addr.s_addr == addr->s_addr) && in ipv4_iffindaddr() 124 (net == NULL || ap->net.s_addr == net->s_addr)) in ipv4_iffindaddr() 140 if (IN_LINKLOCAL(htonl(ap->addr.s_addr))) in ipv4_iffindlladdr() 171 if (state->addr.s_addr != INADDR_ANY) in ipv4_addrexists() 173 } else if (addr->s_addr == state->addr.s_addr) in ipv4_addrexists() 256 if (rt->dest.s_addr == r->dest.s_addr && in find_route() [all …]
|
D | ipv4ll.c | 87 if (addr == astate->failed.s_addr) in ipv4ll_pick_addr() 93 if (state && state->addr.s_addr == addr) in ipv4ll_pick_addr() 120 state->offer = ipv4ll_make_lease(astate->addr.s_addr); in ipv4ll_probed() 158 (amsg->sip.s_addr == astate->addr.s_addr || in ipv4ll_conflicted() 159 (amsg->sip.s_addr == 0 && amsg->tip.s_addr == astate->addr.s_addr))) in ipv4ll_conflicted() 160 fail = astate->addr.s_addr; in ipv4ll_conflicted() 163 if (IN_LINKLOCAL(htonl(state->addr.s_addr)) && in ipv4ll_conflicted() 164 amsg && amsg->sip.s_addr == state->addr.s_addr) in ipv4ll_conflicted() 165 fail = state->addr.s_addr; in ipv4ll_conflicted() 170 astate->failed.s_addr = fail; in ipv4ll_conflicted() [all …]
|
D | dhcp.c | 250 if (!p || len < (ssize_t)sizeof(a->s_addr)) in get_option_addr() 252 memcpy(&a->s_addr, p, sizeof(a->s_addr)); in get_option_addr() 331 addr.s_addr = 0; in decode_rfc3442() 332 memcpy(&addr.s_addr, p, ocets); in decode_rfc3442() 341 memcpy(&addr.s_addr, p, 4); in decode_rfc3442() 395 memcpy(&rt->dest.s_addr, p, ocets); in decode_rfc3442_rt() 397 rt->net.s_addr = htonl(~0U << (32 - cidr)); in decode_rfc3442_rt() 401 memcpy(&rt->gate.s_addr, p, 4); in decode_rfc3442_rt() 439 addr.s_addr = INADDR_BROADCAST; in decode_rfc3361() 440 l = ((dl / sizeof(addr.s_addr)) * ((4 * 4) + 1)) + 1; in decode_rfc3361() [all …]
|
D | arp.c | 136 state->failed.s_addr = 0; in arp_packet() 157 if (ar.ar_pln != sizeof(arm.sip.s_addr)) in arp_packet() 180 memcpy(&arm.sip.s_addr, hw_s + ar.ar_hln, ar.ar_pln); in arp_packet() 182 memcpy(&arm.tip.s_addr, hw_t + ar.ar_hln, ar.ar_pln); in arp_packet() 241 if (arp_request(ifp, astate->addr.s_addr, astate->addr.s_addr, in arp_announce1() 292 if (arp_request(ifp, astate->src_addr.s_addr, in arp_probe1() 293 astate->addr.s_addr, dest_hwaddr) == -1) in arp_probe1() 316 if (astate->addr.s_addr == addr->s_addr && astate->iface == ifp) in arp_find() 417 if (astate->addr.s_addr == addr->s_addr) { in arp_handleifa()
|
D | if-linux.c | 417 prefsrc.s_addr = INADDR_ANY; in if_copyrt() 423 memcpy(&rt->dest.s_addr, RTA_DATA(rta), in if_copyrt() 424 sizeof(rt->dest.s_addr)); in if_copyrt() 427 memcpy(&rt->gate.s_addr, RTA_DATA(rta), in if_copyrt() 428 sizeof(rt->gate.s_addr)); in if_copyrt() 431 memcpy(&prefsrc.s_addr, RTA_DATA(rta), in if_copyrt() 432 sizeof(prefsrc.s_addr)); in if_copyrt() 446 if (rt->iface == NULL && prefsrc.s_addr != INADDR_ANY) { in if_copyrt() 610 addr.s_addr = dest.s_addr = INADDR_ANY; in link_addr() 611 dest.s_addr = INADDR_ANY; in link_addr() [all …]
|
/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 | 69 *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() 234 && !src_addr.s_addr) src_addr = dest_addr; in arping_main() 235 if (!(toys.optflags & FLAG_D) || src_addr.s_addr) { in arping_main() 244 if (src_addr.s_addr) { in arping_main() 256 src_addr.s_addr = htonl(oip); in arping_main()
|
D | dhcp.c | 298 *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() 636 addr.sin_addr.s_addr = INADDR_ANY ; in mode_app() 781 cli.sin_addr.s_addr = state->pdhcp.ciaddr; in send_app() 789 cli.sin_addr.s_addr = state->serverid.s_addr; in send_app() 871 memcpy(optptr, &serverid->s_addr, 4); in dhcpc_addserverid() 880 memcpy(optptr, &ipaddr->s_addr, 4); in dhcpc_addreqipaddr() 951 state->serverid.s_addr = var; in get_option_serverid() 952 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/parameter-framework/asio-1.10.6/include/asio/ip/ |
D | address_v4.hpp | 50 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/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/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/webrtc/webrtc/base/ |
D | ipaddress.cc | 51 return NetworkToHost32(u_.ip4.s_addr); in v4AddressAsHostOrderInteger() 107 return NetworkToHost32(u_.ip4.s_addr) < in operator <() 108 NetworkToHost32(other.u_.ip4.s_addr); in operator <() 194 ::memcpy(&v6addr.s6_addr[12], &u_.ip4.s_addr, sizeof(u_.ip4.s_addr)); in AsIPv6Address() 233 ::memcpy(&ipv4.s_addr, &in6.s6_addr[12], sizeof(ipv4.s_addr)); in ExtractMappedAddress() 325 return ip.ipv4_address().s_addr; in HashIP() 349 uint32_t host_order_ip = NetworkToHost32(ip.ipv4_address().s_addr); in TruncateIP() 351 masked.s_addr = HostToNetwork32(host_order_ip & mask); in TruncateIP() 384 word_to_count = NetworkToHost32(mask.ipv4_address().s_addr); in CountIPMaskBits()
|
/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 …]
|
D | arping.c | 413 if (src_ip.s_addr != dst.s_addr) in recv_pack() 415 if (src.s_addr != dst_ip.s_addr) in recv_pack() 433 if (src_ip.s_addr != dst.s_addr) in recv_pack() 437 if (src.s_addr && src.s_addr != dst_ip.s_addr) in recv_pack() 447 if (dst_ip.s_addr != src.s_addr) { in recv_pack() 1119 if (!dad && unsolicited && src.s_addr == 0) in main() 1122 if (!dad || src.s_addr) { in main() 1140 if (src.s_addr) { in main() 1199 if (!src.s_addr && !dad) { in main()
|
/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/tcpdump/ |
D | print-cnfp.c | 205 ND_PRINT((ndo, "\n %s%s%s:%u ", intoa(nr->src_ina.s_addr), buf, asbuf, in cnfp_v1_print() 208 ND_PRINT((ndo, "> %s%s%s:%u ", intoa(nr->dst_ina.s_addr), buf, asbuf, in cnfp_v1_print() 211 ND_PRINT((ndo, ">> %s\n ", intoa(nr->nhop_ina.s_addr))); in cnfp_v1_print() 299 ND_PRINT((ndo, "\n %s%s%s:%u ", intoa(nr->src_ina.s_addr), buf, asbuf, in cnfp_v5_print() 305 ND_PRINT((ndo, "> %s%s%s:%u ", intoa(nr->dst_ina.s_addr), buf, asbuf, in cnfp_v5_print() 308 ND_PRINT((ndo, ">> %s\n ", intoa(nr->nhop_ina.s_addr))); in cnfp_v5_print() 396 ND_PRINT((ndo, "\n %s%s%s:%u ", intoa(nr->src_ina.s_addr), buf, asbuf, in cnfp_v6_print() 402 ND_PRINT((ndo, "> %s%s%s:%u ", intoa(nr->dst_ina.s_addr), buf, asbuf, in cnfp_v6_print() 405 ND_PRINT((ndo, ">> %s\n ", intoa(nr->nhop_ina.s_addr))); in cnfp_v6_print()
|
/external/c-ares/ |
D | acountry.c | 168 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() 561 ip = ntohl(addr.s_addr); in find_country_from_cname()
|
/external/wpa_supplicant_8/src/wps/ |
D | wps_upnp_ssdp.c | 245 dest.sin_addr.s_addr = inet_addr(UPNP_MULTICAST_ADDRESS); in advertisement_state_machine_stop() 294 dest.sin_addr.s_addr = inet_addr(UPNP_MULTICAST_ADDRESS); in advertisement_state_machine_handler() 749 addr.sin_addr.s_addr = htonl(INADDR_ANY); in ssdp_listener_open() 754 mcast_addr.imr_interface.s_addr = htonl(INADDR_ANY); in ssdp_listener_open() 755 mcast_addr.imr_multiaddr.s_addr = inet_addr(UPNP_MULTICAST_ADDRESS); in ssdp_listener_open() 827 sin->sin_addr.s_addr = inet_addr(SSDP_TARGET); in add_ssdp_network() 831 sin->sin_addr.s_addr = inet_addr(SSDP_NETMASK); in add_ssdp_network() 910 mreq.imr_multiaddr.s_addr = inet_addr(UPNP_MULTICAST_ADDRESS); in ssdp_open_multicast_sock() 911 mreq.imr_interface.s_addr = ip_addr; in ssdp_open_multicast_sock() 914 mreq.imr_multiaddr.s_addr, in ssdp_open_multicast_sock() [all …]
|
D | wps_er_ssdp.c | 38 if (er->filter_addr.s_addr && in wps_er_ssdp_rx() 39 er->filter_addr.s_addr != addr.sin_addr.s_addr) in wps_er_ssdp_rx() 147 dest.sin_addr.s_addr = inet_addr(UPNP_MULTICAST_ADDRESS); in wps_er_send_ssdp_msearch()
|
/external/wpa_supplicant_8/src/ap/ |
D | iapp.c | 199 addr.sin_addr.s_addr = iapp->multicast.s_addr; in iapp_send_add() 323 if (from.sin_addr.s_addr == iapp->own.s_addr) in iapp_receive_udp() 426 iapp->own.s_addr = paddr->sin_addr.s_addr; in iapp_init() 456 mreq.imr_address.s_addr = INADDR_ANY; in iapp_init() 513 mreq.imr_address.s_addr = INADDR_ANY; in iapp_deinit()
|