• Home
  • Raw
  • Download

Lines Matching refs:tb

66 	unsigned int tb;  member
77 static bool filter_nlmsg(struct nlmsghdr *n, struct rtattr **tb, int host_len) in filter_nlmsg() argument
88 filter.pref ^ (tb[FRA_PRIORITY] ? rta_getattr_u32(tb[FRA_PRIORITY]) : 0)) in filter_nlmsg()
94 if (tb[FRA_SRC]) { in filter_nlmsg()
95 memcpy(&src.data, RTA_DATA(tb[FRA_SRC]), in filter_nlmsg()
105 if (tb[FRA_DST]) { in filter_nlmsg()
106 memcpy(&dst.data, RTA_DATA(tb[FRA_DST]), in filter_nlmsg()
121 if (tb[FRA_FWMARK]) in filter_nlmsg()
122 mark = rta_getattr_u32(tb[FRA_FWMARK]); in filter_nlmsg()
129 if (tb[FRA_FWMASK]) in filter_nlmsg()
130 mask = rta_getattr_u32(tb[FRA_FWMASK]); in filter_nlmsg()
136 if (tb[FRA_IFNAME]) { in filter_nlmsg()
137 if (strcmp(filter.iif, rta_getattr_str(tb[FRA_IFNAME])) != 0) in filter_nlmsg()
145 if (tb[FRA_OIFNAME]) { in filter_nlmsg()
146 if (strcmp(filter.oif, rta_getattr_str(tb[FRA_OIFNAME])) != 0) in filter_nlmsg()
153 if (filter.l3mdev && !(tb[FRA_L3MDEV] && rta_getattr_u8(tb[FRA_L3MDEV]))) in filter_nlmsg()
157 struct fib_rule_uid_range *r = RTA_DATA(tb[FRA_UID_RANGE]); in filter_nlmsg()
159 if (!tb[FRA_UID_RANGE] || in filter_nlmsg()
165 table = rtm_get_table(r, tb); in filter_nlmsg()
166 if (filter.tb > 0 && filter.tb ^ table) in filter_nlmsg()
179 struct rtattr *tb[FRA_MAX+1]; in print_rule() local
190 parse_rtattr(tb, FRA_MAX, RTM_RTA(r), len); in print_rule()
194 if (!filter_nlmsg(n, tb, host_len)) in print_rule()
200 if (tb[FRA_PRIORITY]) in print_rule()
202 rta_getattr_u32(tb[FRA_PRIORITY])); in print_rule()
209 if (tb[FRA_SRC]) { in print_rule()
212 rt_addr_n2a_rta(r->rtm_family, tb[FRA_SRC]), in print_rule()
216 format_host_rta(r->rtm_family, tb[FRA_SRC])); in print_rule()
224 if (tb[FRA_DST]) { in print_rule()
227 rt_addr_n2a_rta(r->rtm_family, tb[FRA_DST]), in print_rule()
231 format_host_rta(r->rtm_family, tb[FRA_DST])); in print_rule()
243 if (tb[FRA_FWMARK] || tb[FRA_FWMASK]) { in print_rule()
246 if (tb[FRA_FWMARK]) in print_rule()
247 mark = rta_getattr_u32(tb[FRA_FWMARK]); in print_rule()
249 if (tb[FRA_FWMASK] && in print_rule()
250 (mask = rta_getattr_u32(tb[FRA_FWMASK])) != 0xFFFFFFFF) in print_rule()
256 if (tb[FRA_IFNAME]) { in print_rule()
257 fprintf(fp, "iif %s ", rta_getattr_str(tb[FRA_IFNAME])); in print_rule()
262 if (tb[FRA_OIFNAME]) { in print_rule()
263 fprintf(fp, "oif %s ", rta_getattr_str(tb[FRA_OIFNAME])); in print_rule()
268 if (tb[FRA_L3MDEV]) { in print_rule()
269 if (rta_getattr_u8(tb[FRA_L3MDEV])) in print_rule()
273 if (tb[FRA_UID_RANGE]) { in print_rule()
274 struct fib_rule_uid_range *r = RTA_DATA(tb[FRA_UID_RANGE]); in print_rule()
279 table = rtm_get_table(r, tb); in print_rule()
284 if (tb[FRA_SUPPRESS_PREFIXLEN]) { in print_rule()
285 int pl = rta_getattr_u32(tb[FRA_SUPPRESS_PREFIXLEN]); in print_rule()
290 if (tb[FRA_SUPPRESS_IFGROUP]) { in print_rule()
291 int group = rta_getattr_u32(tb[FRA_SUPPRESS_IFGROUP]); in print_rule()
301 if (tb[FRA_FLOW]) { in print_rule()
302 __u32 to = rta_getattr_u32(tb[FRA_FLOW]); in print_rule()
315 if (tb[RTA_GATEWAY]) { in print_rule()
318 tb[RTA_GATEWAY])); in print_rule()
323 if (tb[FRA_GOTO]) in print_rule()
324 fprintf(fp, "%u", rta_getattr_u32(tb[FRA_GOTO])); in print_rule()
381 struct rtattr *tb[FRA_MAX+1]; in flush_rule() local
387 parse_rtattr(tb, FRA_MAX, RTM_RTA(r), len); in flush_rule()
389 if (tb[FRA_PRIORITY]) { in flush_rule()
500 filter.tb = tid; in iprule_list_flush_or_save()