Home
last modified time | relevance | path

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

12345678910>>...15

/titanic_41/usr/src/lib/libsocket/inet/
H A Dnetmasks.c66 uint32_t addr = in.s_addr; in inet_nettoa()
132 i = ntohl(net.s_addr); in getnetmaskbynet()
140 net2.s_addr = htonl(i); in getnetmaskbynet()
142 net1.s_addr = htonl(i << IN_CLASSC_NSHIFT); in getnetmaskbynet()
144 net1.s_addr = htonl(i << IN_CLASSB_NSHIFT); in getnetmaskbynet()
146 net1.s_addr = htonl(i << IN_CLASSA_NSHIFT); in getnetmaskbynet()
149 net1.s_addr = htonl(i & IN_CLASSA_NET); in getnetmaskbynet()
150 net2.s_addr = htonl(i >> IN_CLASSA_NSHIFT); in getnetmaskbynet()
152 net1.s_addr = htonl(i & IN_CLASSB_NET); in getnetmaskbynet()
153 net2.s_addr = htonl(i >> IN_CLASSB_NSHIFT); in getnetmaskbynet()
[all …]
/titanic_41/usr/src/cmd/cmd-inet/usr.sbin/in.routed/
H A Dcommon.c73 if ((in.s_addr = inet_network(name)) == (in_addr_t)-1) { in getnet()
75 in.s_addr = ntohl(RIP_DEFAULT); in getnet()
77 in.s_addr = np->n_net; in getnet()
82 if (0 == (in.s_addr & 0xff000000)) in getnet()
83 in.s_addr <<= 8; in getnet()
84 if (0 == (in.s_addr & 0xff000000)) in getnet()
85 in.s_addr <<= 8; in getnet()
86 if (0 == (in.s_addr & 0xff000000)) in getnet()
87 in.s_addr <<= 8; in getnet()
90 mask = std_mask(htonl(in.s_addr)); in getnet()
[all …]
/titanic_41/usr/src/stand/lib/inet/
H A Dipv4.c322 if (destp->s_addr == table[i].dest.s_addr) in find_route()
328 if (gatewayp->s_addr == table[i].gateway.s_addr) in find_route()
371 table[index].dest.s_addr = destp->s_addr; in ipv4_route()
373 table[index].dest.s_addr = htonl(INADDR_ANY); in ipv4_route()
374 table[index].gateway.s_addr = gatewayp->s_addr; in ipv4_route()
386 table[index].dest.s_addr = htonl(INADDR_ANY); in ipv4_route()
387 table[index].gateway.s_addr = htonl(INADDR_ANY); in ipv4_route()
457 myip.s_addr = htonl(ip->s_addr); in ipv4_setipaddr()
466 ip->s_addr = ntohl(myip.s_addr); in ipv4_getipaddr()
477 netmask.s_addr = htonl(ip->s_addr); in ipv4_setnetmask()
[all …]
H A Dethernet.c113 tmp_ia.s_addr = htonl(tmp_ia.s_addr); in ether_comarp()
264 ip.s_addr = ntohl(ip.s_addr); in ether_revarp()
434 ip.s_addr = ntohl(ip.s_addr); in ether_input()
437 ip.s_addr != INADDR_ANY && in ether_input()
533 if (ipdst.s_addr == htonl(INADDR_BROADCAST)) in ether_output()
541 mask.s_addr = htonl(mask.s_addr); in ether_output()
542 netid.s_addr = htonl(netid.s_addr); in ether_output()
548 if (mask.s_addr != htonl(INADDR_BROADCAST) && in ether_output()
549 (ipdst.s_addr & ~mask.s_addr) == 0 && in ether_output()
550 (ipdst.s_addr & mask.s_addr) == netid.s_addr) { in ether_output()
[all …]
H A Dibd.c151 tmp_ia.s_addr = htonl(tmp_ia.s_addr); in ibd_comarp()
432 ip.s_addr = ntohl(ip.s_addr); in ibd_input()
435 ip.s_addr != INADDR_ANY && in ibd_input()
519 if (ipdst.s_addr == htonl(INADDR_BROADCAST)) in ibd_output()
526 mask.s_addr = htonl(mask.s_addr); in ibd_output()
527 if (mask.s_addr != htonl(INADDR_BROADCAST) && in ibd_output()
528 (ipdst.s_addr & ~mask.s_addr) == 0) { in ibd_output()
531 if (ogp->igm_router.s_addr != htonl(INADDR_ANY)) in ibd_output()
532 tmpip.s_addr = ogp->igm_router.s_addr; in ibd_output()
534 tmpip.s_addr = ipdst.s_addr; in ibd_output()
H A Ddhcpv4.c338 saddr.sin_addr.s_addr = htonl(src->s_addr); in inet()
347 if (ntohl(dest->s_addr) == INADDR_BROADCAST) { in inet()
356 daddr.sin_addr.s_addr = htonl(dest->s_addr); in inet()
560 if (ntohl(wk->pkt->siaddr.s_addr) != INADDR_ANY) in select_best()
610 t_server.s_addr = htonl(INADDR_BROADCAST); in dhcp_decline()
611 t_yiaddr.s_addr = pl->pkt->yiaddr.s_addr; in dhcp_decline()
621 nets.s_addr = htonl(INADDR_BROADCAST); in dhcp_decline()
626 pkt->ciaddr.s_addr = t_yiaddr.s_addr; in dhcp_decline()
629 ours.s_addr = htonl(ours.s_addr); in dhcp_decline()
698 nets.s_addr = INADDR_BROADCAST; in dhcp_selecting()
[all …]
/titanic_41/usr/src/lib/libinetutil/common/
H A Dinetutil.c53 hp.s_addr = htonl(n_addrp->s_addr); in get_netmask4()
55 s_addrp->s_addr = ntohl(tp.s_addr); in get_netmask4()
62 if (IN_CLASSA(n_addrp->s_addr)) in get_netmask4()
63 s_addrp->s_addr = IN_CLASSA_NET; in get_netmask4()
64 else if (IN_CLASSB(n_addrp->s_addr)) in get_netmask4()
65 s_addrp->s_addr = IN_CLASSB_NET; in get_netmask4()
66 else if (IN_CLASSC(n_addrp->s_addr)) in get_netmask4()
67 s_addrp->s_addr = IN_CLASSC_NET; in get_netmask4()
69 s_addrp->s_addr = IN_CLASSE_NET; in get_netmask4()
92 return (addr1.s_addr == addr2.s_addr); in sockaddrcmp()
[all …]
/titanic_41/usr/src/grub/grub-0.97/netboot/
H A Dnic.c266 int net = ntohl(arptable[ARP_CLIENT].ipaddr.s_addr) >> 24; in default_netmask()
305 destip = ip->dest.s_addr; in ip_transmit()
323 (arptable[ARP_CLIENT].ipaddr.s_addr & netmask)) && in ip_transmit()
324 arptable[ARP_GATEWAY].ipaddr.s_addr) in ip_transmit()
325 destip = arptable[ARP_GATEWAY].ipaddr.s_addr; in ip_transmit()
327 if (arptable[arpentry].ipaddr.s_addr == destip) break; in ip_transmit()
375 ip->src.s_addr = arptable[ARP_CLIENT].ipaddr.s_addr; in build_ip_hdr()
376 ip->dest.s_addr = destip; in build_ip_hdr()
386 pseudo.src.s_addr = ip->src.s_addr; in udpchksum()
387 pseudo.dest.s_addr = ip->dest.s_addr; in udpchksum()
[all …]
/titanic_41/usr/src/lib/libslp/clib/
H A Dslp_net_utils.c113 if (memcmp(&(all_ifs[i].addr.sin_addr.s_addr), in slp_broadcast_addrs()
114 &(given_ifs[j].s_addr), in slp_broadcast_addrs()
115 sizeof (given_ifs[j].s_addr)) == 0 && in slp_broadcast_addrs()
116 all_ifs[i].bc_addr.sin_addr.s_addr != 0) { in slp_broadcast_addrs()
166 netmask.s_addr = all_ifs[i].netmask.sin_addr.s_addr; in slp_on_subnet()
168 net_addr.s_addr = in slp_on_subnet()
169 all_ifs[i].addr.sin_addr.s_addr & netmask.s_addr; in slp_on_subnet()
171 masked_addr.s_addr = addr.s_addr & netmask.s_addr; in slp_on_subnet()
173 if (memcmp(&(masked_addr.s_addr), &(net_addr.s_addr), in slp_on_subnet()
174 sizeof (net_addr.s_addr)) == 0) { in slp_on_subnet()
[all …]
/titanic_41/usr/src/lib/libresolv2/common/inet/
H A Dinet_makeaddr.c57 a.s_addr = (net << IN_CLASSA_NSHIFT) | (host & IN_CLASSA_HOST);
59 a.s_addr = (net << IN_CLASSB_NSHIFT) | (host & IN_CLASSB_HOST);
61 a.s_addr = (net << IN_CLASSC_NSHIFT) | (host & IN_CLASSC_HOST);
63 a.s_addr = net | host;
64 a.s_addr = htonl(a.s_addr);
/titanic_41/usr/src/uts/common/inet/ipf/
H A Dip_pool.c134 a.adf_addr.in4.s_addr = 0x0a010203;
135 b.adf_addr.in4.s_addr = 0xffffffff;
139 a.adf_addr.in4.s_addr = 0x0a000000;
140 b.adf_addr.in4.s_addr = 0xff000000;
144 a.adf_addr.in4.s_addr = 0x0a010100;
145 b.adf_addr.in4.s_addr = 0xffffff00;
149 a.adf_addr.in4.s_addr = 0x0a010200;
150 b.adf_addr.in4.s_addr = 0xffffff00;
154 a.adf_addr.in4.s_addr = 0x0a010000;
155 b.adf_addr.in4.s_addr = 0xffff0000;
[all …]
H A Dip_nat.c423 hv = (src.s_addr ^ dst.s_addr);
424 hv += src.s_addr;
425 hv += dst.s_addr;
428 if ((hm->hm_srcip.s_addr == src.s_addr) &&
429 (hm->hm_dstip.s_addr == dst.s_addr) &&
1425 sum_changed = LONG_SUM(ntohl(nat->nat_inip.s_addr));
1426 sum_orig = LONG_SUM(ntohl(nat->nat_outip.s_addr));
1438 sum_changed = LONG_SUM(ntohl(nat->nat_outip.s_addr));
1439 sum_orig = LONG_SUM(ntohl(nat->nat_inip.s_addr));
1473 ntohl(nat->nat_inip.s_addr) +
[all …]
/titanic_41/usr/src/stand/lib/fs/nfs/
H A Dbootparams.c95 to.sin_addr.s_addr = htonl(INADDR_BROADCAST); in whoami()
103 ipaddr.s_addr = htonl(ipaddr.s_addr); in whoami()
157 responder.s_addr = from.sin_addr.s_addr; in whoami()
191 if (ntohl(ipaddr.s_addr) != INADDR_ANY) { in whoami()
259 to.sin_addr.s_addr = responder.s_addr; in getfile()
283 to.sin_addr.s_addr = htonl(INADDR_BROADCAST); in getfile()
310 responder.s_addr = from.sin_addr.s_addr; in getfile()
350 server_ip->s_addr = htonl(INADDR_ANY); in getfile()
/titanic_41/usr/src/cmd/rpcsvc/rpc.bootparamd/
H A Dbootparam_ip_route.c248 interface_mask.s_addr = 0L; in get_ip_route()
249 interface_addr.s_addr = 0L; in get_ip_route()
250 best_router.s_addr = 0L; in get_ip_route()
311 net == (client_addr.s_addr & mask)) { in get_ip_route()
312 interface_addr.s_addr = addr; in get_ip_route()
313 interface_mask.s_addr = mask; in get_ip_route()
327 if (interface_addr.s_addr == 0) { in get_ip_route()
346 return (interface_addr.s_addr); in get_ip_route()
393 interface_mask.s_addr) != in get_ip_route()
394 (interface_addr.s_addr & in get_ip_route()
[all …]
/titanic_41/usr/src/cmd/ipf/tools/
H A Dippool_y.y298 $$->ipn_addr.adf_addr.in4.s_addr = $1[0].in4.s_addr;
299 $$->ipn_mask.adf_addr.in4.s_addr = $1[1].in4.s_addr;
315 $$->ipn_addr.adf_addr.in4.s_addr = $2[0].in4.s_addr;
316 $$->ipn_mask.adf_addr.in4.s_addr = $2[1].in4.s_addr;
353 $$[1].in4.s_addr = 0xffffffff;
358 | YY_NUMBER { $$.in4.s_addr = htonl($1); }
370 ntomask(4, $1, (u_32_t *)&$$.in4.s_addr); }
395 $$.in4.s_addr = ($1 << 24) | ($3 << 16) | ($5 << 8) | $7;
396 $$.in4.s_addr = htonl($$.in4.s_addr);
/titanic_41/usr/src/cmd/cmd-inet/usr.sbin/
H A Dhostconfig.c189 if ((targetaddr.s_addr = inet_addr(targethost)) ==
203 (void) memcpy(&targetaddr.s_addr, hp->h_addr,
207 targetaddr.s_addr = 0;
298 sin->sin_addr.s_addr = router_addr.s_addr;
377 if (router_addr.s_addr != 0)
404 if (addr.s_addr == 0) {
410 lookupaddr.s_addr = ntohl(lookupaddr.s_addr);
481 *ipp = ntohl(sin->sin_addr.s_addr);
493 *maskp = ntohl(sin->sin_addr.s_addr);
H A D6to4relay.c80 if (rr_addr.s_addr == INADDR_ANY) { in printkstatus()
241 new_addr.s_addr = htonl(INADDR_6TO4RRANYCAST); in main()
257 if (current_addr.s_addr == new_addr.s_addr) in main()
268 if (current_addr.s_addr != INADDR_ANY) { in main()
296 if (rr_addr.s_addr == INADDR_ANY) in main()
306 rr_addr.s_addr = INADDR_ANY; in main()
/titanic_41/usr/src/cmd/ssh/libssh/common/
H A Daddrmatch.c131 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()
/titanic_41/usr/src/cmd/getent/
H A Ddogetnetmask.c48 net.s_addr = ntohl(key.s_addr); in putnetmask()
71 addr.s_addr = htonl(inet_network(*list)); in dogetnetmask()
72 if (addr.s_addr != -1) { in dogetnetmask()
/titanic_41/usr/src/cmd/ipf/lib/common/
H A Dprintip.c17 ipa.s_addr = *addr;
18 if (ntohl(ipa.s_addr) < 256)
19 printf("%lu", (u_long)ntohl(ipa.s_addr));
/titanic_41/usr/src/uts/common/inet/ip/
H A Dip_mroute.c285 if ((_mb_rt->mfc_origin.s_addr == o) && \
286 (_mb_rt->mfc_mcastgrp.s_addr == g) && \
442 mfcbp = &ipst->ips_mfcs[MFCHASH(req->src.s_addr, req->grp.s_addr)]; in get_sg_cnt()
444 MFCFIND(mfcbp, req->src.s_addr, req->grp.s_addr, rt); in get_sg_cnt()
866 if (vifp->v_lcl_addr.s_addr != 0 || in add_vif()
874 if (vifcp->vifc_lcl_addr.s_addr == 0) { in add_vif()
882 ipif = ipif_lookup_addr((ipaddr_t)vifcp->vifc_lcl_addr.s_addr, NULL, in add_vif()
892 vifcp->vifc_lcl_addr.s_addr); in add_vif()
1024 ntohl(vifcp->vifc_lcl_addr.s_addr), in add_vif()
1026 ntohl(vifcp->vifc_rmt_addr.s_addr), in add_vif()
[all …]
/titanic_41/usr/src/cmd/fs.d/nfs/nfslog/
H A Dnfslog_ipaddr.c104 for (h = h_table4[iphash(ipaddr->s_addr)]; h; h = h->h4_next) {
105 if (h->h4_addr.s_addr == ipaddr->s_addr)
111 if (ipaddr->s_addr == htonl(INADDR_BROADCAST))
113 if (ipaddr->s_addr == htonl(INADDR_ANY))
208 hashval = ((struct in_addr *)ipaddr)->s_addr;
/titanic_41/usr/src/cmd/cmd-inet/usr.lib/ncaconfd/
H A Dncaconfd.c349 nca_ioctl.local_addr = local_addr.s_addr; in nca_set_nif()
390 if (nif_list[i].local_addr.s_addr == 0) { in nca_setup()
435 if (*active && nif_list[i].router_addr.s_addr != 0) { in nca_setup()
535 nif_list[i].local_addr.s_addr = 0; in get_if_ip_addr()
740 nexthop_v4.s_addr = rp->ipRouteNextHop; in ire_process()
768 (nexthop_v4.s_addr & rp1->ipRouteMask)) { in ire_process()
800 if (nexthop_v4.s_addr == in ire_process()
801 nif_list[i].router_addr.s_addr) { in ire_process()
805 nif_list[i].router_addr.s_addr = in ire_process()
806 nexthop_v4.s_addr; in ire_process()
[all …]
/titanic_41/usr/src/uts/common/inet/ipf/netinet/
H A Dip_netbios_pxy.c133 dgmbuf[0] = (char)((ip->ip_src.s_addr ) &0xFF);
134 dgmbuf[1] = (char)((ip->ip_src.s_addr >> 8) &0xFF);
135 dgmbuf[2] = (char)((ip->ip_src.s_addr >> 16)&0xFF);
136 dgmbuf[3] = (char)((ip->ip_src.s_addr >> 24)&0xFF);
/titanic_41/usr/src/lib/smbsrv/libsmbns/common/
H A Dsmbns_netbios_datagram.c361 (void) memcpy(&buffer[4], &src->addr_list.sin.sin_addr.s_addr, in smb_netbios_datagram_send()
378 ipaddr.a_ipv4 = addr->sin.sin_addr.s_addr; in smb_netbios_datagram_send()
384 sin.sin_addr.s_addr = ipaddr.a_ipv4; in smb_netbios_datagram_send()
441 (void) memcpy(&buffer[4], &src->addr_list.sin.sin_addr.s_addr, in smb_netbios_datagram_send_to_net()
458 ipaddr.a_ipv4 = addr->sin.sin_addr.s_addr; in smb_netbios_datagram_send_to_net()
463 sin.sin_addr.s_addr = ipaddr.a_ipv4; in smb_netbios_datagram_send_to_net()
503 (void) memcpy(&datagram->src.addr_list.sin.sin_addr.s_addr, in smb_datagram_decode()
719 if (prev->src.addr_list.sin.sin_addr.s_addr == in smb_netbios_datagram_getq()
720 datagram->src.addr_list.sin.sin_addr.s_addr) { in smb_netbios_datagram_getq()
797 &datagram->src.addr_list.sin.sin_addr.s_addr, in smb_netbios_BPM_datagram()
[all …]

12345678910>>...15