/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 | 254 rt.dest.s_addr = INADDR_ANY; in link_route() 255 rt.net.s_addr = INADDR_ANY; in link_route() 256 rt.gate.s_addr = INADDR_ANY; in link_route() 262 memcpy(&rt.dest.s_addr, RTA_DATA(rta), in link_route() 263 sizeof(rt.dest.s_addr)); in link_route() 266 memcpy(&rt.gate.s_addr, RTA_DATA(rta), in link_route() 267 sizeof(rt.gate.s_addr)); in link_route() 317 addr.s_addr = dest.s_addr = INADDR_ANY; in link_addr() 318 dest.s_addr = INADDR_ANY; in link_addr() 324 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 | 387 memcpy(&a->s_addr, p, sizeof(a->s_addr)); in get_option_addr() 530 addr.s_addr = 0; in decode_rfc3442() 531 memcpy(&addr.s_addr, p, ocets); in decode_rfc3442() 540 memcpy(&addr.s_addr, p, 4); in decode_rfc3442() 586 memcpy(&rt->dest.s_addr, p, ocets); in decode_rfc3442_rt() 588 rt->net.s_addr = htonl(~0U << (32 - cidr)); in decode_rfc3442_rt() 592 memcpy(&rt->gate.s_addr, p, 4); in decode_rfc3442_rt() 626 addr.s_addr = INADDR_BROADCAST; in decode_rfc3361() 627 l = ((dl / sizeof(addr.s_addr)) * ((4 * 4) + 1)) + 1; in decode_rfc3361() 630 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-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()
|
/external/libppp/src/ |
D | ncpaddr.c | 87 result.s_addr = 0; in bits2mask4() 90 result.s_addr |= bit; in bits2mask4() 95 result.s_addr = htonl(result.s_addr); in bits2mask4() 102 u_int32_t msk = ntohl(mask.s_addr); in mask42bits() 199 if (addr->ncpaddr_ip4addr.s_addr == INADDR_ANY) in ncpaddr_isdefault() 222 return addr->ncpaddr_ip4addr.s_addr == cmp->ncpaddr_ip4addr.s_addr; in ncpaddr_equal() 260 addr->ncpaddr_ip4addr.s_addr = ip; in ncpaddr_setip4addr() 268 *ip = addr->ncpaddr_ip4addr.s_addr; in ncpaddr_getip4addr() 355 addr->ncpaddr_ip4addr.s_addr = in ncpaddr_setsa() 419 range.ncprange_ip4addr.s_addr != INADDR_ANY) { in ncpaddr_aton() [all …]
|
D | ipcp.c | 177 ipcp->ns.dns[0].s_addr = ipcp->ns.dns[1].s_addr = INADDR_NONE; in ipcp_LoadDNS() 267 if (n == 2 && ipcp->ns.dns[0].s_addr == INADDR_ANY) { in ipcp_LoadDNS() 268 ipcp->ns.dns[0].s_addr = ipcp->ns.dns[1].s_addr; in ipcp_LoadDNS() 269 ipcp->ns.dns[1].s_addr = INADDR_ANY; in ipcp_LoadDNS() 288 if (ipcp->ns.dns[0].s_addr == INADDR_ANY && in ipcp_WriteDNS() 289 ipcp->ns.dns[1].s_addr == INADDR_ANY) { in ipcp_WriteDNS() 295 if (ipcp->ns.dns[0].s_addr == INADDR_ANY) { in ipcp_WriteDNS() 296 ipcp->ns.dns[0].s_addr = ipcp->ns.dns[1].s_addr; in ipcp_WriteDNS() 297 ipcp->ns.dns[1].s_addr = INADDR_ANY; in ipcp_WriteDNS() 308 if (ipcp->ns.dns[1].s_addr != INADDR_ANY && in ipcp_WriteDNS() [all …]
|
D | iplist.c | 69 list->cur.lstart = ntohl(list->cur.ip.s_addr); in iplist_setrange() 75 list->cur.lstart = ntohl(list->cur.ip.s_addr); in iplist_setrange() 87 list->cur.lstart = ntohl(list->cur.ip.s_addr); in iplist_setrange() 88 list->cur.nItems = ntohl(endip.s_addr) - list->cur.lstart + 1; in iplist_setrange() 133 list->cur.ip.s_addr = INADDR_ANY; in iplist_next() 138 list->cur.ip.s_addr = INADDR_ANY; in iplist_next() 143 list->cur.ip.s_addr = htonl(list->cur.lstart + list->cur.srcitem); in iplist_next() 177 list->cur.ip.s_addr = INADDR_ANY; in iplist_setcurpos() 189 list->cur.ip.s_addr = htonl(list->cur.lstart + list->cur.srcitem); in iplist_setcurpos() 218 if (iplist_next(list).s_addr == ip.s_addr) { in iplist_ip2pos()
|
D | arp.c | 129 arpmsg.dst.sin_addr.s_addr = addr.s_addr; in arp_ProxySub() 191 ((struct sockaddr_in *)&arpreq.arp_pa)->sin_addr.s_addr = addr.s_addr; in arp_SetProxy() 211 ((struct sockaddr_in *)&arpreq.arp_pa)->sin_addr.s_addr = addr.s_addr; in arp_ClearProxy() 302 if ((ifa->sin_addr.s_addr & netmask->sin_addr.s_addr) == in arp_EtherAddr() 303 (ipaddr.s_addr & netmask->sin_addr.s_addr)) { in arp_EtherAddr()
|
/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/qemu/slirp/ |
D | bootp.c | 67 paddr->s_addr = htonl(ntohl(special_addr.s_addr) | (i + START_ADDR)); in get_new_addr() 74 uint32_t req_addr = ntohl(paddr->s_addr); in request_addr() 75 uint32_t spec_addr = ntohl(special_addr.s_addr); in request_addr() 102 paddr->s_addr = htonl(ntohl(special_addr.s_addr) | (i + START_ADDR)); in find_addr() 148 if (*pmsg_type == DHCPREQUEST && !*preq_addr && bp->bp_ciaddr.s_addr) { in dhcp_decode() 168 dprintf(" req_addr=%08x\n", ntohl(preq_addr->s_addr)); in bootp_reply() 210 daddr.sin_addr.s_addr = 0; in bootp_reply() 221 saddr.sin_addr.s_addr = htonl(ntohl(special_addr.s_addr) | CTL_ALIAS); in bootp_reply() 242 ntohl(daddr.sin_addr.s_addr)); in bootp_reply() 278 dns_addr.s_addr = htonl(ntohl(special_addr.s_addr) | CTL_DNS); in bootp_reply() [all …]
|
D | udp.c | 170 so->so_laddr.s_addr != ip->ip_src.s_addr) { in udp_input() 175 tmp->so_laddr.s_addr == ip->ip_src.s_addr) { in udp_input() 176 tmp->so_faddr.s_addr = ip->ip_dst.s_addr; in udp_input() 265 DEBUG_ARG("saddr = %lx", (long)saddr->sin_addr.s_addr); in udp_output2() 266 DEBUG_ARG("daddr = %lx", (long)daddr->sin_addr.s_addr); in udp_output2() 317 if ((so->so_faddr.s_addr & htonl(0xffffff00)) == special_addr.s_addr) { in udp_output() 318 if ((so->so_faddr.s_addr & htonl(0x000000ff)) == htonl(0xff)) in udp_output() 319 saddr.sin_addr.s_addr = alias_addr.s_addr; in udp_output() 320 else if (addr->sin_addr.s_addr == loopback_addr.s_addr || in udp_output() 321 (ntohl(so->so_faddr.s_addr) & 0xff) != CTL_ALIAS) in udp_output() [all …]
|
D | tcp_subr.c | 141 xchg(ti->ti_dst.s_addr, ti->ti_src.s_addr, u_int32_t); in tcp_respond() 387 if ((so->so_faddr.s_addr & htonl(0xffffff00)) == special_addr.s_addr) { in tcp_fconnect() 389 switch(ntohl(so->so_faddr.s_addr) & 0xff) { in tcp_fconnect() 480 if (so->so_faddr.s_addr == 0 || so->so_faddr.s_addr == loopback_addr.s_addr) in tcp_connect() 646 if (tmpso->so_laddr.s_addr == so->so_laddr.s_addr && in tcp_emu() 648 tmpso->so_faddr.s_addr == so->so_faddr.s_addr && in tcp_emu() 818 if (ns->so_faddr.s_addr == 0 || in tcp_emu() 819 ns->so_faddr.s_addr == loopback_addr.s_addr) in tcp_emu() 985 laddr = ntohl(so->so_faddr.s_addr); in tcp_emu() 1017 laddr = ntohl(so->so_faddr.s_addr); in tcp_emu() [all …]
|
/external/grub/netboot/ |
D | main.c | 122 etherboot_printf ("Address: %@\n", arptable[ARP_CLIENT].ipaddr.s_addr); in print_network_configuration() 124 etherboot_printf ("Server: %@\n", arptable[ARP_SERVER].ipaddr.s_addr); in print_network_configuration() 125 etherboot_printf ("Gateway: %@\n", arptable[ARP_GATEWAY].ipaddr.s_addr); in print_network_configuration() 136 int net = ntohl (arptable[ARP_CLIENT].ipaddr.s_addr) >> 24; in default_netmask() 156 netmask = tmp.s_addr; in ifconfig() 182 if (IP_BROADCAST == (netmask | arptable[ARP_CLIENT].ipaddr.s_addr) in ifconfig() 183 || netmask == (netmask | arptable[ARP_CLIENT].ipaddr.s_addr) in ifconfig() 217 ip->src.s_addr = arptable[ARP_CLIENT].ipaddr.s_addr; in udp_transmit() 218 ip->dest.s_addr = destip; in udp_transmit() 236 != (arptable[ARP_CLIENT].ipaddr.s_addr & netmask)) in udp_transmit() [all …]
|
/external/quake/quake/src/WinQuake/ |
D | net_udp.cpp | 101 *addr = ((struct sockaddr_in*) (void*) &ifr.ifr_addr)->sin_addr.s_addr; in ifc_get_info() 109 *mask = ((struct sockaddr_in*) (void*) &ifr.ifr_addr)->sin_addr.s_addr; in ifc_get_info() 179 temp.sin_addr.s_addr = INADDR_BROADCAST; in UDP_Init() 243 address.in.sin_addr.s_addr = INADDR_ANY; in UDP_OpenSocket() 318 ((struct sockaddr_in *)hostaddr)->sin_addr.s_addr = (myAddr & htonl(mask)) | htonl(addr); in PartialIPAddress() 412 haddr = ntohl(((struct sockaddr_in *)addr)->sin_addr.s_addr); in UDP_AddrToString() 428 ((struct sockaddr_in *)addr)->sin_addr.s_addr = htonl(ipaddr); in UDP_StringToAddr() 442 a = ((struct sockaddr_in *)addr)->sin_addr.s_addr; in UDP_GetSocketAddr() 444 ((struct sockaddr_in *)addr)->sin_addr.s_addr = myAddr; in UDP_GetSocketAddr() 481 ((struct sockaddr_in *)addr)->sin_addr.s_addr = *(int *)hostentry->h_addr_list[0]; in UDP_GetAddrFromName() [all …]
|
D | net_mp.cpp | 103 ((struct sockaddr_in *)&broadcastaddr)->sin_addr.s_addr = INADDR_BROADCAST; in MPATH_Init() 162 address.sin_addr.s_addr = INADDR_ANY; in MPATH_OpenSocket() 237 ((struct sockaddr_in *)hostaddr)->sin_addr.s_addr = (myAddr & htonl(mask)) | htonl(addr); in PartialIPAddress() 339 haddr = ntohl(((struct sockaddr_in *)addr)->sin_addr.s_addr); in MPATH_AddrToString() 355 ((struct sockaddr_in *)addr)->sin_addr.s_addr = htonl(ipaddr); in MPATH_StringToAddr() 369 a = ((struct sockaddr_in *)addr)->sin_addr.s_addr; in MPATH_GetSocketAddr() 371 ((struct sockaddr_in *)addr)->sin_addr.s_addr = myAddr; in MPATH_GetSocketAddr() 408 ((struct sockaddr_in *)addr)->sin_addr.s_addr = *(int *)hostentry->h_addr_list[0]; in MPATH_GetAddrFromName() 420 …if (((struct sockaddr_in *)addr1)->sin_addr.s_addr != ((struct sockaddr_in *)addr2)->sin_addr.s_ad… in MPATH_AddrCompare()
|
/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 | 628 if (fw->ip.smsk.s_addr == 0L && !(format & FMT_NUMERIC)) in print_firewall() 640 if (fw->ip.dmsk.s_addr == 0L && !(format & FMT_NUMERIC)) in print_firewall() 699 fw->ip.src.s_addr = saddrs[i].s_addr; in append_entry() 700 fw->ip.smsk.s_addr = smasks[i].s_addr; in append_entry() 702 fw->ip.dst.s_addr = daddrs[j].s_addr; in append_entry() 703 fw->ip.dmsk.s_addr = dmasks[j].s_addr; in append_entry() 722 fw->ip.src.s_addr = saddr->s_addr; in replace_entry() 723 fw->ip.dst.s_addr = daddr->s_addr; in replace_entry() 724 fw->ip.smsk.s_addr = smask->s_addr; in replace_entry() 725 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/iptables/extensions/ |
D | libipt_SAME.c | 57 range->min_ip = ip->s_addr; in parse_to() 65 range->max_ip = ip->s_addr; in parse_to() 116 a.s_addr = r->min_ip; in SAME_print() 119 a.s_addr = r->max_ip; in SAME_print() 144 a.s_addr = r->min_ip; in SAME_save() 146 a.s_addr = r->max_ip; in SAME_save()
|