ifac
TAILQ_ENTRY(ifac) ifac_next;
struct ifac *ifac;
if ((ifac = ifa_match(ifcp, &sin6->sin6_addr, plen)) != NULL) {
if ((ifac = MALLOC(struct ifac)) == NULL) {
memset(ifac, 0, sizeof(*ifac));
ifac->ifac_ifc = ifcp;
ifac->ifac_addr = sin6->sin6_addr;
ifac->ifac_plen = plen;
ifac->ifac_scope_id = sin6->sin6_scope_id;
ifac->ifac_raddr = ifr.ifr_dstaddr.sin6_addr;
inet_ntop(AF_INET6, (void *)&ifac->ifac_raddr, buf,
inet6_n2p(&ifac->ifac_addr), ifac->ifac_plen, buf);
inet6_n2p(&ifac->ifac_addr), ifac->ifac_plen);
if (ifcp->ifc_index < 0 && IN6_IS_ADDR_LINKLOCAL(&ifac->ifac_addr)) {
ifcp->ifc_mylladdr = ifac->ifac_addr;
ifcp->ifc_index = ifac->ifac_scope_id;
TAILQ_INSERT_HEAD(&ifcp->ifc_ifac_head, ifac, ifac_next);
struct ifac *ifac = NULL;
ifac = ifa_match(ifcp, addr, prefix);
if (!ifac) {
if (ifac->ifac_ifc != ifcp) {
ifcp->ifc_name, ifac->ifac_ifc->ifc_name);
TAILQ_REMOVE(&ifcp->ifc_ifac_head, ifac, ifac_next);
ni6.rip6_dest = ifac->ifac_addr;
ni6.rip6_plen = ifac->ifac_plen;
ni6.rip6_dest = ifac->ifac_raddr;
&ifac->ifac_addr)) {
free(ifac);
struct ifac *ifac;
TAILQ_FOREACH(ifac, &ifcp->ifc_ifac_head, ifac_next) {
if (IN6_IS_ADDR_LINKLOCAL(&ifac->ifac_addr)) {
inet6_n2p(&ifac->ifac_addr), ifcp->ifc_name);
if (IN6_IS_ADDR_UNSPECIFIED(&ifac->ifac_addr)) {
if (IN6_IS_ADDR_LOOPBACK(&ifac->ifac_addr)) {
rrt->rrt_info.rip6_dest = ifac->ifac_addr;
rrt->rrt_info.rip6_plen = ifac->ifac_plen;
applyplen(&rrt->rrt_info.rip6_dest, ifac->ifac_plen);
rrt->rrt_gw = ifac->ifac_addr;
struct ifac *ifac;
TAILQ_FOREACH(ifac, &ifcp->ifc_ifac_head, ifac_next) {
addr = ifac->ifac_addr;
dest = ifac->ifac_raddr;
applyplen(&addr, ifac->ifac_plen);
applyplen(&dest, ifac->ifac_plen);
if (!IN6_IS_ADDR_UNSPECIFIED(&ifac->ifac_raddr)) {
rrt->rrt_info.rip6_dest = ifac->ifac_addr;
rrt->rrt_info.rip6_plen = ifac->ifac_plen;
ifac->ifac_plen);
rrt->rrt_info.rip6_dest = ifac->ifac_addr;
rrt->rrt_info.rip6_dest = ifac->ifac_raddr;
rrt->rrt_gw = ifac->ifac_addr;
static struct ifac *ifa_match(const struct ifc *, const struct in6_addr *, int);
struct ifac *ifac;
TAILQ_FOREACH(ifac, &ifcp->ifc_ifac_head, ifac_next) {
inet_ntop(AF_INET6, (void *)&ifac->ifac_raddr,
inet6_n2p(&ifac->ifac_addr),
ifac->ifac_plen, buf);
inet6_n2p(&ifac->ifac_addr),
ifac->ifac_plen);
static struct ifac *
struct ifac *ifac;
TAILQ_FOREACH(ifac, &ifcp->ifc_ifac_head, ifac_next) {
if (IN6_ARE_ADDR_EQUAL(&ifac->ifac_addr, ia) &&
ifac->ifac_plen == plen)
return (ifac);
TAILQ_HEAD(, ifac) ifc_ifac_head; /* list of AF_INET6 addrs */