/freebsd/contrib/ntp/libntp/lib/isc/win32/include/isc/ |
H A D | ipv6.h | 65 *((u_long *)((a)->s6_addr) ) == 0 && \ 66 *((u_long *)((a)->s6_addr) + 1) == 0 && \ 67 *((u_long *)((a)->s6_addr) + 2) == 0 && \ 68 *((u_long *)((a)->s6_addr) + 3) == 0 \ 77 *((u_long *)((a)->s6_addr) ) == 0 && \ 78 *((u_long *)((a)->s6_addr) + 1) == 0 && \ 79 *((u_long *)((a)->s6_addr) + 2) == 0 && \ 80 *((u_long *)((a)->s6_addr) + 3) == htonl(1) \ 88 *((u_long *)((a)->s6_addr) ) == 0 && \ 89 *((u_long *)((a)->s6_addr) + 1) == 0 && \ [all …]
|
/freebsd/contrib/ntp/libntp/lib/isc/unix/include/isc/ |
H A D | net.h | 103 #ifdef s6_addr 118 #ifdef s6_addr 129 (memcmp((x)->s6_addr, in6addr_any.s6_addr, 10) == 0 && \ 130 (x)->s6_addr[10] == 0xff && (x)->s6_addr[11] == 0xff) 136 (memcmp((x)->s6_addr, in6addr_any.s6_addr, 12) == 0 && \ 137 ((x)->s6_addr[12] != 0 || (x)->s6_addr[13] != 0 || \ 138 (x)->s6_addr[14] != 0 || \ 139 ((x)->s6_addr[15] != 0 && (x)->s6_addr[15] != 1))) 144 #define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xff) 150 (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80)) [all …]
|
/freebsd/sys/netinet6/ |
H A D | in6_ifattach.c | 96 #define EUI64_TO_IFID(in6) do {(in6)->s6_addr[8] ^= EUI64_UBIT; } while (0) 97 #define EUI64_GROUP(in6) ((in6)->s6_addr[8] & EUI64_GBIT) 99 #define EUI64_LOCAL(in6) ((in6)->s6_addr[8] & EUI64_UBIT) 141 bcopy(digest, &in6->s6_addr[8], 8); in get_rand_ifid() 144 in6->s6_addr[8] &= ~EUI64_GBIT; /* g bit to "individual" */ in get_rand_ifid() 145 in6->s6_addr[8] |= EUI64_UBIT; /* u bit to "local" */ in get_rand_ifid() 297 bcopy(addr, &in6->s6_addr[8], 8); in in6_get_hw_ifid() 299 in6->s6_addr[8] = addr[0]; in in6_get_hw_ifid() 300 in6->s6_addr[9] = addr[1]; in in6_get_hw_ifid() 301 in6->s6_addr[10] = addr[2]; in in6_get_hw_ifid() [all …]
|
H A D | in6.h | 102 #define s6_addr __u6_addr.__u6_addr8 macro 228 (memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct in6_addr)) == 0) 292 (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80)) 294 (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0)) 299 #define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xff) 302 #define IPV6_ADDR_MC_SCOPE(a) ((a)->s6_addr[1] & 0x0f) 304 #define __IPV6_ADDR_MC_SCOPE(a) ((a)->s6_addr[1] & 0x0f)
|
H A D | in6_jail.c | 83 if (ia6a->s6_addr[i] > ia6b->s6_addr[i]) in prison_qcmp_v6() 85 else if (ia6a->s6_addr[i] < ia6b->s6_addr[i]) in prison_qcmp_v6()
|
/freebsd/contrib/ntp/include/ |
H A D | ntp_net.h | 55 #define NSRCADR6(psau) (SOCK_ADDR6(psau).s6_addr) 64 #define SET_ADDR6N(psau, s6_addr) \ argument 65 (SOCK_ADDR6(psau) = (s6_addr)) 131 memset((psau)->sa6.sin6_addr.s6_addr, (v), \ 132 sizeof((psau)->sa6.sin6_addr.s6_addr)) 157 memcmp((pin6A)->s6_addr, (pin6B)->s6_addr, \ 158 sizeof(pin6A)->s6_addr)
|
/freebsd/tools/tools/netmap/ |
H A D | pkt_hash.c | 216 saddr = ipv6h->ip6_src.s6_addr[0] | in decode_ipv6_n_hash() 217 (ipv6h->ip6_src.s6_addr[1] << 8) | in decode_ipv6_n_hash() 218 (ipv6h->ip6_src.s6_addr[2] << 16) | in decode_ipv6_n_hash() 219 (ipv6h->ip6_src.s6_addr[3] << 24); in decode_ipv6_n_hash() 220 daddr = ipv6h->ip6_dst.s6_addr[0] | in decode_ipv6_n_hash() 221 (ipv6h->ip6_dst.s6_addr[1] << 8) | in decode_ipv6_n_hash() 222 (ipv6h->ip6_dst.s6_addr[2] << 16) | in decode_ipv6_n_hash() 223 (ipv6h->ip6_dst.s6_addr[3] << 24); in decode_ipv6_n_hash()
|
/freebsd/contrib/ntp/libntp/lib/isc/unix/ |
H A D | interfaceiter.c | 112 memcpy(&zone16, &sa6->sin6_addr.s6_addr[2], in get_addr() 119 dst->type.in6.s6_addr[2] = 0; in get_addr() 120 dst->type.in6.s6_addr[3] = 0; in get_addr() 236 addr6.s6_addr[i] = byte; in linux_if_inet6_current() 248 addr6.s6_addr[i] = 0xff; in linux_if_inet6_current() 251 addr6.s6_addr[i] = (0xff << (8 - prefix)) & 0xff; in linux_if_inet6_current()
|
/freebsd/contrib/tcp_wrappers/ |
H A D | hosts_access.c | 442 if ((*(u_int32_t *)&net.sin6_addr.s6_addr[12] = dot_quad_addr(net_tok)) == INADDR_NONE in masked_match6() 445 …return ((*(u_int32_t *)&addr.sin6_addr.s6_addr[12] & mask) == *(u_int32_t *)&net.sin6_addr.s6_addr… in masked_match6() 469 …if ((*(u_int32_t *)&addr.sin6_addr.s6_addr[i] & mask) != (*(u_int32_t *)&net.sin6_addr.s6_addr[i] … in masked_match6() 473 if (*(u_int32_t *)&addr.sin6_addr.s6_addr[i] != *(u_int32_t *)&net.sin6_addr.s6_addr[i]) in masked_match6()
|
/freebsd/contrib/pf/ftp-proxy/ |
H A D | filter.c | 104 &satosin6(nat)->sin6_addr.s6_addr, 16); in add_nat() 138 &satosin6(rdr)->sin6_addr.s6_addr, 16); in add_rdr() 284 &satosin6(src)->sin6_addr.s6_addr, 16); in prepare_rule() 287 &satosin6(dst)->sin6_addr.s6_addr, 16); in prepare_rule() 389 memcpy(&k.saddr.v6, &client->sin6_addr.s6_addr, sizeof(k.saddr.v6)); in server_lookup6() 390 memcpy(&k.daddr.v6, &proxy->sin6_addr.s6_addr, sizeof(k.daddr.v6)); in server_lookup6() 400 memcpy(&server->sin6_addr.s6_addr, &r.daddr.v6, in server_lookup6()
|
/freebsd/sys/ofed/include/rdma/ |
H A D | ib_addr.h | 225 memcpy(&out_in->sin6_addr.s6_addr, gid->raw, 16); in rdma_gid2ip() 333 memcpy(mac, &addr->s6_addr[8], 3); in rdma_get_ll_mac() 334 memcpy(mac + 3, &addr->s6_addr[13], 3); in rdma_get_ll_mac() 342 if (addr->s6_addr[0] == 0xff) in rdma_is_multicast_addr() 356 mac[i] = addr->s6_addr[i + 10]; in rdma_get_mcast_mac()
|
/freebsd/contrib/pf/tftp-proxy/ |
H A D | filter.c | 108 &satosin6(nat)->sin6_addr.s6_addr, 16); in add_nat() 142 &satosin6(rdr)->sin6_addr.s6_addr, 16); in add_rdr() 293 &satosin6(src)->sin6_addr.s6_addr, 16); in prepare_rule() 296 &satosin6(dst)->sin6_addr.s6_addr, 16); in prepare_rule() 400 memcpy(&k.saddr.v6, &client->sin6_addr.s6_addr, sizeof k.saddr.v6); in server_lookup6() 401 memcpy(&k.daddr.v6, &proxy->sin6_addr.s6_addr, sizeof k.daddr.v6); in server_lookup6() 411 memcpy(&server->sin6_addr.s6_addr, &r.daddr.v6, in server_lookup6()
|
/freebsd/crypto/heimdal/lib/krb5/ |
H A D | addr_families.c | 253 #define IN6_ADDR_V6_TO_V4(x) ((const struct in_addr *)&(x)->s6_addr[12]) in ipv6_sockaddr2addr() 386 ret = inet_pton(AF_INET6, address, &in6.s6_addr); in ipv6_parse_addr() 389 ret = krb5_data_alloc(&addr->address, sizeof(in6.s6_addr)); in ipv6_parse_addr() 392 memcpy(addr->address.data, in6.s6_addr, sizeof(in6.s6_addr)); in ipv6_parse_addr() 425 laddr.s6_addr[i] = addr.s6_addr[i] & m; in ipv6_mask_boundary() 426 haddr.s6_addr[i] = (addr.s6_addr[i] & m) | ~m; in ipv6_mask_boundary() 435 if (krb5_data_alloc(&low->address, sizeof(laddr.s6_addr)) != 0) in ipv6_mask_boundary() 437 memcpy(low->address.data, laddr.s6_addr, sizeof(laddr.s6_addr)); in ipv6_mask_boundary() 440 if (krb5_data_alloc(&high->address, sizeof(haddr.s6_addr)) != 0) { in ipv6_mask_boundary() 444 memcpy(high->address.data, haddr.s6_addr, sizeof(haddr.s6_addr)); in ipv6_mask_boundary()
|
/freebsd/contrib/libpcap/testprogs/ |
H A D | findalldevstest.c | 287 ((struct sockaddr_in6 *)(a->addr))->sin6_addr.s6_addr, in ifprint() 292 ((struct sockaddr_in6 *)(a->netmask))->sin6_addr.s6_addr, in ifprint() 297 ((struct sockaddr_in6 *)(a->broadaddr))->sin6_addr.s6_addr, in ifprint() 302 ((struct sockaddr_in6 *)(a->dstaddr))->sin6_addr.s6_addr, in ifprint()
|
/freebsd/usr.sbin/ppp/ |
H A D | ipv6cp.c | 213 myaddr.s6_addr[0] = 0xfe; in ipcp_SetIPv6address() 214 myaddr.s6_addr[1] = 0x80; in ipcp_SetIPv6address() 215 memcpy(&myaddr.s6_addr[8], myifid, IPV6CP_IFIDLEN); in ipcp_SetIPv6address() 217 myaddr.s6_addr[8] |= 0x02; /* set 'universal' bit */ in ipcp_SetIPv6address() 220 hisaddr.s6_addr[0] = 0xfe; in ipcp_SetIPv6address() 221 hisaddr.s6_addr[1] = 0x80; in ipcp_SetIPv6address() 222 memcpy(&hisaddr.s6_addr[8], hisifid, IPV6CP_IFIDLEN); in ipcp_SetIPv6address() 224 hisaddr.s6_addr[8] |= 0x02; /* set 'universal' bit */ in ipcp_SetIPv6address()
|
H A D | ncpaddr.c | 121 u_char *c = result.s6_addr; in bits2mask6() 173 ntohs(*(u_short *)&sin6->sin6_addr.s6_addr[2]); 174 *(u_short *)&sin6->sin6_addr.s6_addr[2] = 0; 354 *(const u_int32_t *)(host6->sin6_addr.s6_addr + 12); in ncpaddr_setsa() 533 rangep = (const u_char *)range->ncprange_ip6addr.s6_addr; in ncprange_contains() 534 addrp = (const u_char *)addr->ncpaddr_ip6addr.s6_addr; in ncprange_contains() 894 if ((scopeid = ntohs(*(const u_short *)&sin6->s6_addr[2])) == 0) in ncprange_scopeid()
|
/freebsd/usr.sbin/rtadvd/ |
H A D | if.c | 674 memcpy(&mreq.ipv6mr_multiaddr.s6_addr, in sock_mc_join() 676 sizeof(mreq.ipv6mr_multiaddr.s6_addr)); in sock_mc_join() 712 memcpy(&mreq.ipv6mr_multiaddr.s6_addr, in sock_mc_leave() 714 sizeof(mreq.ipv6mr_multiaddr.s6_addr)); in sock_mc_leave() 746 memcpy(&mreq.ipv6mr_multiaddr.s6_addr, in sock_mc_rr_update() 748 sizeof(mreq.ipv6mr_multiaddr.s6_addr)); in sock_mc_rr_update()
|
/freebsd/contrib/ntp/sntp/libevent/ |
H A D | evutil.c | 644 const unsigned char *addr = (const unsigned char *)in->s6_addr; in evutil_v6addr_is_local_() 1034 sin6.sin6_addr.s6_addr[15] = 1; in evutil_getaddrinfo_common_() 1923 (((ev_uint16_t)addr->s6_addr[2*i])<<8) + addr->s6_addr[2*i+1]; in evutil_inet_ntop() 1931 addr->s6_addr[12], addr->s6_addr[13], in evutil_inet_ntop() 1932 addr->s6_addr[14], addr->s6_addr[15]); in evutil_inet_ntop() 1935 addr->s6_addr[12], addr->s6_addr[13], in evutil_inet_ntop() 1936 addr->s6_addr[14], addr->s6_addr[15]); in evutil_inet_ntop() 2126 out->s6_addr[2*i ] = words[i] >> 8; in evutil_inet_pton() 2127 out->s6_addr[2*i+1] = words[i] & 0xff; in evutil_inet_pton() 2301 if ((r = memcmp(sin1->sin6_addr.s6_addr, sin2->sin6_addr.s6_addr, 16))) in evutil_sockaddr_cmp() [all …]
|
/freebsd/contrib/libevent/ |
H A D | evutil.c | 644 const unsigned char *addr = (const unsigned char *)in->s6_addr; in evutil_v6addr_is_local_() 1034 sin6.sin6_addr.s6_addr[15] = 1; in evutil_getaddrinfo_common_() 1923 (((ev_uint16_t)addr->s6_addr[2*i])<<8) + addr->s6_addr[2*i+1]; in evutil_inet_ntop() 1931 addr->s6_addr[12], addr->s6_addr[13], in evutil_inet_ntop() 1932 addr->s6_addr[14], addr->s6_addr[15]); in evutil_inet_ntop() 1935 addr->s6_addr[12], addr->s6_addr[13], in evutil_inet_ntop() 1936 addr->s6_addr[14], addr->s6_addr[15]); in evutil_inet_ntop() 2126 out->s6_addr[2*i ] = words[i] >> 8; in evutil_inet_pton() 2127 out->s6_addr[2*i+1] = words[i] & 0xff; in evutil_inet_pton() 2301 if ((r = memcmp(sin1->sin6_addr.s6_addr, sin2->sin6_addr.s6_addr, 16))) in evutil_sockaddr_cmp() [all …]
|
/freebsd/sbin/ifconfig/ |
H A D | carp.c | 242 carp_addr6.s6_addr[0] = 0xff; in setcarp_mcast6() 243 carp_addr6.s6_addr[1] = 0x02; in setcarp_mcast6() 244 carp_addr6.s6_addr[15] = 0x12; in setcarp_mcast6()
|
/freebsd/usr.bin/netstat/ |
H A D | route.c | 624 ntohs(*(u_int16_t *)&sa6->sin6_addr.s6_addr[2]); in in6_fillscopeid() 625 sa6->sin6_addr.s6_addr[2] = sa6->sin6_addr.s6_addr[3] = 0; in in6_fillscopeid() 669 addr.sin6_addr.s6_addr[i] &= in netname6() 670 mask->sin6_addr.s6_addr[i]; in netname6()
|
/freebsd/sys/dev/cxgbe/tom/ |
H A D | t4_connect.c | 343 cpl->local_ip_hi = *(uint64_t *)&inp->in6p_laddr.s6_addr[0]; in t4_connect() 344 cpl->local_ip_lo = *(uint64_t *)&inp->in6p_laddr.s6_addr[8]; in t4_connect() 346 cpl->peer_ip_hi = *(uint64_t *)&inp->in6p_faddr.s6_addr[0]; in t4_connect() 347 cpl->peer_ip_lo = *(uint64_t *)&inp->in6p_faddr.s6_addr[8]; in t4_connect()
|
/freebsd/contrib/ntp/sntp/libevent/test/ |
H A D | regress_dns.c | 334 if (memcmp(&in6_addrs[0].s6_addr, "abcdefghijklmnop", 16) in dns_server_gethostbyname_cb() 443 memcpy(resolve_addr6.s6_addr, in dns_server() 1104 ans6.s6_addr[0] = 0x80; in be_getaddrinfo_server_cb() 1105 ans6.s6_addr[1] = 0xff; in be_getaddrinfo_server_cb() 1106 ans6.s6_addr[14] = 0xbb; in be_getaddrinfo_server_cb() 1107 ans6.s6_addr[15] = 0xbb; in be_getaddrinfo_server_cb() 1109 1, &ans6.s6_addr, 2000); in be_getaddrinfo_server_cb() 1130 ans6.s6_addr[0] = 0x0b; in be_getaddrinfo_server_cb() 1131 ans6.s6_addr[1] = 0x0b; in be_getaddrinfo_server_cb() 1132 ans6.s6_addr[14] = 0xf0; in be_getaddrinfo_server_cb() [all …]
|
/freebsd/contrib/libevent/test/ |
H A D | regress_dns.c | 334 if (memcmp(&in6_addrs[0].s6_addr, "abcdefghijklmnop", 16) in dns_server_gethostbyname_cb() 443 memcpy(resolve_addr6.s6_addr, in dns_server() 1104 ans6.s6_addr[0] = 0x80; in be_getaddrinfo_server_cb() 1105 ans6.s6_addr[1] = 0xff; in be_getaddrinfo_server_cb() 1106 ans6.s6_addr[14] = 0xbb; in be_getaddrinfo_server_cb() 1107 ans6.s6_addr[15] = 0xbb; in be_getaddrinfo_server_cb() 1109 1, &ans6.s6_addr, 2000); in be_getaddrinfo_server_cb() 1130 ans6.s6_addr[0] = 0x0b; in be_getaddrinfo_server_cb() 1131 ans6.s6_addr[1] = 0x0b; in be_getaddrinfo_server_cb() 1132 ans6.s6_addr[14] = 0xf0; in be_getaddrinfo_server_cb() [all …]
|
/freebsd/contrib/ntp/libntp/lib/isc/win32/ |
H A D | interfaceiter.c | 363 iter->loop__1.s6_addr[15] = 1; in isc_interfaceiter_create() 364 iter->loopfe80__1.s6_addr[15] = 1; in isc_interfaceiter_create() 365 iter->loopfe80__1.s6_addr[0] = 0xfe; in isc_interfaceiter_create() 366 iter->loopfe80__1.s6_addr[1] = 0x80; in isc_interfaceiter_create() 649 memset(iter->current.netmask.type.in6.s6_addr, 0xff, in internal_current6() 650 sizeof(iter->current.netmask.type.in6.s6_addr)); in internal_current6()
|