Home | History | Annotate | Download | only in ip

Lines Matching refs:tb

154 static void print_linktype(FILE *fp, struct rtattr *tb)
160 parse_rtattr_nested(linkinfo, IFLA_INFO_MAX, tb);
194 struct rtattr * tb[IFLA_MAX+1];
210 parse_rtattr(tb, IFLA_MAX, IFLA_RTA(ifi), len);
211 if (tb[IFLA_IFNAME] == NULL) {
216 fnmatch(filter.label, RTA_DATA(tb[IFLA_IFNAME]), 0))
223 tb[IFLA_IFNAME] ? (char*)RTA_DATA(tb[IFLA_IFNAME]) : "<nil>");
225 if (tb[IFLA_LINK]) {
227 int iflink = *(int*)RTA_DATA(tb[IFLA_LINK]);
240 if (tb[IFLA_MTU])
241 fprintf(fp, "mtu %u ", *(int*)RTA_DATA(tb[IFLA_MTU]));
242 if (tb[IFLA_QDISC])
243 fprintf(fp, "qdisc %s ", (char*)RTA_DATA(tb[IFLA_QDISC]));
245 if (tb[IFLA_MASTER]) {
247 fprintf(fp, "master %s ", ll_idx_n2a(*(int*)RTA_DATA(tb[IFLA_MASTER]), b1));
250 if (tb[IFLA_OPERSTATE])
251 print_operstate(fp, *(__u8 *)RTA_DATA(tb[IFLA_OPERSTATE]));
254 print_queuelen(fp, (char*)RTA_DATA(tb[IFLA_IFNAME]));
261 if (tb[IFLA_ADDRESS]) {
262 fprintf(fp, "%s", ll_addr_n2a(RTA_DATA(tb[IFLA_ADDRESS]),
263 RTA_PAYLOAD(tb[IFLA_ADDRESS]),
267 if (tb[IFLA_BROADCAST]) {
272 fprintf(fp, "%s", ll_addr_n2a(RTA_DATA(tb[IFLA_BROADCAST]),
273 RTA_PAYLOAD(tb[IFLA_BROADCAST]),
279 if (do_link && tb[IFLA_LINKINFO] && show_details)
280 print_linktype(fp, tb[IFLA_LINKINFO]);
282 if (do_link && tb[IFLA_IFALIAS])
284 (const char *) RTA_DATA(tb[IFLA_IFALIAS]));
286 if (do_link && tb[IFLA_STATS] && show_stats) {
288 struct rtnl_link_stats *s = RTA_DATA(tb[IFLA_STATS]);
813 struct rtattr *tb[IFA_MAX+1];
814 parse_rtattr(tb, IFA_MAX, IFA_RTA(ifa), IFA_PAYLOAD(n));
815 if (!tb[IFA_LOCAL])
816 tb[IFA_LOCAL] = tb[IFA_ADDRESS];
818 if (filter.pfx.family && tb[IFA_LOCAL]) {
822 memcpy(&dst.data, RTA_DATA(tb[IFA_LOCAL]), RTA_PAYLOAD(tb[IFA_LOCAL]));
829 if (tb[IFA_LABEL])
830 label = RTA_DATA(tb[IFA_LABEL]);