Home
last modified time | relevance | path

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

12345678910>>...15

/external/u-boot/net/
Darp.c45 net_arp_wait_packet_ip.s_addr = 0; in arp_init()
46 net_arp_wait_reply_ip.s_addr = 0; in arp_init()
84 if ((net_arp_wait_packet_ip.s_addr & net_netmask.s_addr) != in arp_request()
85 (net_ip.s_addr & net_netmask.s_addr)) { in arp_request()
86 if (net_gateway.s_addr == 0) { in arp_request()
103 if (!net_arp_wait_packet_ip.s_addr) in arp_timeout_check()
155 if (net_ip.s_addr == 0) in arp_receive()
158 if (net_read_ip(&arp->ar_tpa).s_addr != net_ip.s_addr) in arp_receive()
181 if ((net_read_ip(&arp->ar_tpa).s_addr & net_netmask.s_addr) != in arp_receive()
182 (net_read_ip(&arp->ar_spa).s_addr & net_netmask.s_addr)) in arp_receive()
[all …]
Dtftp.c159 net_mcast_addr.s_addr = 0; in mcast_cleanup()
740 net_ip.s_addr & 0xFF, in tftp_start()
741 (net_ip.s_addr >> 8) & 0xFF, in tftp_start()
742 (net_ip.s_addr >> 16) & 0xFF, in tftp_start()
743 (net_ip.s_addr >> 24) & 0xFF); in tftp_start()
773 if (net_gateway.s_addr && net_netmask.s_addr) { in tftp_start()
777 our_net.s_addr = net_ip.s_addr & net_netmask.s_addr; in tftp_start()
778 remote_net.s_addr = tftp_remote_ip.s_addr & net_netmask.s_addr; in tftp_start()
779 if (our_net.s_addr != remote_net.s_addr) in tftp_start()
965 if (net_mcast_addr.s_addr != addr.s_addr) { in parse_multicast_oack()
[all …]
Dnet.c476 net_ip.s_addr = 0; in net_loop()
483 net_ip.s_addr = 0; in net_loop()
490 net_ip.s_addr = 0; in net_loop()
583 net_arp_wait_packet_ip.s_addr = 0; in net_loop()
815 if (dest.s_addr == 0) in net_send_udp_packet()
816 dest.s_addr = 0xFFFFFFFF; in net_send_udp_packet()
819 if (dest.s_addr == 0xFFFFFFFF) in net_send_udp_packet()
1193 if (net_ip.s_addr && dst_ip.s_addr != net_ip.s_addr && in net_process_received_packet()
1194 dst_ip.s_addr != 0xFFFFFFFF) { in net_process_received_packet()
1250 xsum += (ntohl(ip->ip_src.s_addr) >> 16) & 0x0000ffff; in net_process_received_packet()
[all …]
Dlink_local.c75 ip.s_addr = htonl((LINKLOCAL_ADDR + 0x0100) + tmp); in pick()
108 if (ip.s_addr != 0 && in link_local_start()
109 (ntohl(ip.s_addr) & IN_CLASSB_NET) != LINKLOCAL_ADDR) { in link_local_start()
114 net_netmask.s_addr = htonl(IN_CLASSB_NET); in link_local_start()
117 if (ip.s_addr == 0) in link_local_start()
137 struct in_addr zero_ip = {.s_addr = 0}; in link_local_timeout()
214 struct in_addr null_ip = {.s_addr = 0}; in link_local_receive_arp()
326 net_ip.s_addr = 0; in link_local_receive_arp()
Dbootp.c157 if (tmp_ip.s_addr != 0 && (overwrite_serverip || !net_server_ip.s_addr)) in store_net_params()
207 if (net_netmask.s_addr == 0) in bootp_process_vendor_field()
214 if (net_gateway.s_addr == 0) in bootp_process_vendor_field()
222 if (net_dns_server.s_addr == 0) in bootp_process_vendor_field()
226 if ((net_dns_server2.s_addr == 0) && (size > 4)) in bootp_process_vendor_field()
322 if (net_netmask.s_addr) in bootp_process_vendor()
325 if (net_gateway.s_addr) in bootp_process_vendor()
342 if (net_ntp_server.s_addr) in bootp_process_vendor()
481 if (server_ip.s_addr) { in dhcp_extended()
482 int tmp = ntohl(server_ip.s_addr); in dhcp_extended()
[all …]
/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/u-boot/lib/
Dnet_utils.c20 addr.s_addr = 0; in string_to_ip()
24 for (addr.s_addr = 0, i = 0; i < 4; ++i) { in string_to_ip()
27 addr.s_addr = 0; in string_to_ip()
31 addr.s_addr = 0; in string_to_ip()
34 addr.s_addr <<= 8; in string_to_ip()
35 addr.s_addr |= (val & 0xFF); in string_to_ip()
41 addr.s_addr = htonl(addr.s_addr); in string_to_ip()
/external/iptables/iptables/
Dnft-ipv4.c52 if (cs->fw.ip.src.s_addr != 0) { 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 != 0) { in nft_ipv4_add()
61 &cs->fw.ip.dst.s_addr, &cs->fw.ip.dmsk.s_addr, in nft_ipv4_add()
105 if (a->fw.ip.src.s_addr != b->fw.ip.src.s_addr in nft_ipv4_is_same()
106 || a->fw.ip.dst.s_addr != b->fw.ip.dst.s_addr in nft_ipv4_is_same()
107 || a->fw.ip.smsk.s_addr != b->fw.ip.smsk.s_addr in nft_ipv4_is_same()
108 || a->fw.ip.dmsk.s_addr != b->fw.ip.dmsk.s_addr in nft_ipv4_is_same()
145 .s_addr = mask, in mask_to_str()
178 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()
193 if (fw->arp.src.s_addr != 0) { in nft_arp_add()
196 &fw->arp.src.s_addr, &fw->arp.smsk.s_addr, in nft_arp_add()
207 if (fw->arp.tgt.s_addr != 0) { in nft_arp_add()
210 &fw->arp.tgt.s_addr, &fw->arp.tmsk.s_addr, in nft_arp_add()
291 mask->s_addr = ctx->bitwise.mask[0]; in parse_mask_ipv4()
339 fw->arp.src.s_addr = addr.s_addr; in nft_arp_parse_payload()
344 fw->arp.smsk.s_addr = 0xffffffff; in nft_arp_parse_payload()
[all …]
Diptables.c604 if (fw->ip.smsk.s_addr == 0L && !(format & FMT_NUMERIC)) in print_firewall()
616 if (fw->ip.dmsk.s_addr == 0L && !(format & FMT_NUMERIC)) in print_firewall()
677 fw->ip.src.s_addr = saddrs[i].s_addr; in append_entry()
678 fw->ip.smsk.s_addr = smasks[i].s_addr; in append_entry()
680 fw->ip.dst.s_addr = daddrs[j].s_addr; in append_entry()
681 fw->ip.dmsk.s_addr = dmasks[j].s_addr; in append_entry()
700 fw->ip.src.s_addr = saddr->s_addr; in replace_entry()
701 fw->ip.dst.s_addr = daddr->s_addr; in replace_entry()
702 fw->ip.smsk.s_addr = smask->s_addr; in replace_entry()
703 fw->ip.dmsk.s_addr = dmask->s_addr; in replace_entry()
[all …]
Dxtables.c422 cs->fw.ip.src.s_addr = s.addr.v4[i].s_addr; in add_entry()
423 cs->fw.ip.smsk.s_addr = s.mask.v4[i].s_addr; in add_entry()
425 cs->fw.ip.dst.s_addr = d.addr.v4[j].s_addr; in add_entry()
426 cs->fw.ip.dmsk.s_addr = d.mask.v4[j].s_addr; in add_entry()
474 cs->fw.ip.src.s_addr = s.addr.v4->s_addr; in replace_entry()
475 cs->fw.ip.dst.s_addr = d.addr.v4->s_addr; in replace_entry()
476 cs->fw.ip.smsk.s_addr = s.mask.v4->s_addr; in replace_entry()
477 cs->fw.ip.dmsk.s_addr = d.mask.v4->s_addr; in replace_entry()
503 cs->fw.ip.src.s_addr = s.addr.v4[i].s_addr; in delete_entry()
504 cs->fw.ip.smsk.s_addr = s.mask.v4[i].s_addr; in delete_entry()
[all …]
/external/u-boot/drivers/net/
Dnetconsole.c68 return (ip.s_addr == ~0 || /* 255.255.255.255 (global bcast) */ in is_broadcast()
69 ((netmask.s_addr & our_ip.s_addr) == in is_broadcast()
70 (netmask.s_addr & ip.s_addr) && /* on the same net and */ in is_broadcast()
71 (netmask.s_addr | ip.s_addr) == ~0)); /* bcast to our net */ in is_broadcast()
84 if (!nc_ip.s_addr) in refresh_settings_from_env()
92 nc_ip.s_addr = ~0; /* ncip is not set, so broadcast */ in refresh_settings_from_env()
142 if (src_ip.s_addr != nc_ip.s_addr && !is_broadcast(nc_ip)) in nc_input_packet()
/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()
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()
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/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/u-boot/cmd/
Dnet.c120 if (net_gateway.s_addr) { in netboot_update_env()
125 if (net_netmask.s_addr) { in netboot_update_env()
136 if (net_ip.s_addr) { in netboot_update_env()
145 if (net_server_ip.s_addr) { in netboot_update_env()
150 if (net_dns_server.s_addr) { in netboot_update_env()
155 if (net_dns_server2.s_addr) { in netboot_update_env()
170 if (net_ntp_server.s_addr) { in netboot_update_env()
273 if (net_ping_ip.s_addr == 0) in do_ping()
344 if (net_ntp_server.s_addr == 0) { in do_sntp()
350 if (net_ntp_server.s_addr == 0) { in do_sntp()
[all …]
/external/ltp/testcases/lib/
Dtst_net_vars.c108 mask.s_addr = htonl(~((1 << (32 - prefix)) - 1)); in prefix2mask()
110 mask.s_addr = htonl(0); in prefix2mask()
126 network.s_addr = ip->s_addr & mask->s_addr; in calc_network()
133 return (ip->s_addr & mask->s_addr) == in is_in_subnet_ipv4()
134 (network->s_addr & mask->s_addr); in is_in_subnet_ipv4()
206 broadcast.s_addr = (ip.s_addr & mask.s_addr) | ~mask.s_addr; in get_ipv4_broadcast()
241 (rand() % 128) + (((ip->s_addr >> 8) & 0xff) < 128 ? 128 : 0)); in get_ipv4_net16_unused()
250 sprintf(net_unused, "%d.%d", (rand() % 128) + (((ip->s_addr) & 0xff) in get_ipv4_net16_unused()
531 vars.ipv4_lnetwork = get_ipv4_network(lip.s_addr, lprefix_round); in get_ipv4_info()
532 vars.ipv4_rnetwork = get_ipv4_network(rip.s_addr, rprefix_round); in get_ipv4_info()
/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/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/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()
243 n->v4.s_addr = ~n->v4.s_addr; in addr_invert()
278 return (a->v4.s_addr == 0 ? 0 : -1); in addr_is_all0s()
/external/iptables/extensions/
Dlibxt_mangle.c63 addr.s_addr = htonl((unsigned long) net->n_net); in network_to_addr()
72 dst->s_addr = src->s_addr; in inaddrcpy()
137 addrp = (unsigned char *) &(addr.s_addr); in dotted_to_addr()
209 mangle->u_s.src_ip.s_addr = ipaddr->s_addr; in mangle_parse()
230 mangle->u_t.tgt_ip.s_addr = ipaddr->s_addr; in mangle_parse()
290 bytep = (const unsigned char *) &(addrp->s_addr); in addr_to_dotted()
310 if ((net = getnetbyaddr((long) ntohl(addr->s_addr), AF_INET)) != NULL) in addr_to_network()
/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/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()

12345678910>>...15