Lines Matching refs:ifa
1003 struct ifaddrmsg *ifa = NLMSG_DATA(h); in print_addrinfo() local
1006 if ((len = h->nlmsg_len - NLMSG_LENGTH(sizeof(*ifa))) < 0) { in print_addrinfo()
1011 for (rta = IFA_RTA(ifa); RTA_OK(rta, len); rta=RTA_NEXT(rta, len)) in print_addrinfo()
1016 if ((addrinfo.scope ^ ifa->ifa_scope)&addrinfo.scopemask) return 0; in print_addrinfo()
1017 if (addrinfo.ifindex && addrinfo.ifindex != ifa->ifa_index) return 0; in print_addrinfo()
1019 if (flag_l && addrinfo.label && ifa->ifa_family == AF_INET6) return 0; in print_addrinfo()
1028 if (ifa->ifa_index == addrinfo.ifindex) { in print_addrinfo()
1039 if (!if_indextoname(ifa->ifa_index, lbuf)) perror_exit(NULL); in print_addrinfo()
1040 printf("%u: %s",ifa->ifa_index, lbuf); in print_addrinfo()
1043 sprintf(scope, " scope %s ", namefromRPDB(ifa->ifa_scope, RPDB_rtscopes)); in print_addrinfo()
1045 if (ifa->ifa_family == AF_INET) strcpy(family, " inet "); in print_addrinfo()
1046 else if (ifa->ifa_family == AF_INET6) strcpy(family, " inet6 "); in print_addrinfo()
1047 else sprintf(family, " family %d", ifa->ifa_family); in print_addrinfo()
1050 if (!inet_ntop(ifa->ifa_family, RTA_DATA(rta_tb[IFA_LOCAL]), in print_addrinfo()
1056 sprintf(family+strlen(family), "/%d ", ifa->ifa_prefixlen); in print_addrinfo()
1058 if (!inet_ntop(ifa->ifa_family, RTA_DATA(rta_tb[IFA_ADDRESS]), in print_addrinfo()
1060 sprintf(peer, " peer %s/%d ", lbuf_ifa, ifa->ifa_prefixlen); in print_addrinfo()
1068 if (!inet_ntop(ifa->ifa_family, RTA_DATA(rta_tb[IFA_BROADCAST]), in print_addrinfo()
1074 if (!inet_ntop(ifa->ifa_family, RTA_DATA(rta_tb[IFA_ANYCAST]), in print_addrinfo()
1079 if (ifa->ifa_family == AF_INET) in print_addrinfo()
1083 if (TT.singleline && (ifa->ifa_family == AF_INET)) xputc('\n'); in print_addrinfo()