• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6/net/decnet/

Lines Matching refs:fi

64 #define for_nexthops(fi) { int nhsel; const struct dn_fib_nh *nh;\
65 for(nhsel = 0, nh = (fi)->fib_nh; nhsel < (fi)->fib_nhs; nh++, nhsel++)
67 #define endfor_nexthops(fi) }
227 static int dn_fib_nh_match(struct rtmsg *r, struct nlmsghdr *nlh, struct dn_kern_rta *rta, struct dn_fib_info *fi)
232 if (rta->rta_priority && *rta->rta_priority != fi->fib_priority)
236 if ((!rta->rta_oif || *rta->rta_oif == fi->fib_nh->nh_oif) &&
237 (!rta->rta_gw || memcmp(rta->rta_gw, &fi->fib_nh->nh_gw, 2) == 0))
248 for_nexthops(fi) {
263 } endfor_nexthops(fi);
268 static inline size_t dn_fib_nlmsg_size(struct dn_fib_info *fi)
278 if (fi->fib_nhs) {
288 payload += nla_total_size(fi->fib_nhs * nhsize);
296 struct dn_fib_info *fi, unsigned int flags)
310 rtm->rtm_flags = fi->fib_flags;
315 rtm->rtm_protocol = fi->fib_protocol;
316 if (fi->fib_priority)
317 RTA_PUT(skb, RTA_PRIORITY, 4, &fi->fib_priority);
318 if (rtnetlink_put_metrics(skb, fi->fib_metrics) < 0)
320 if (fi->fib_nhs == 1) {
321 if (fi->fib_nh->nh_gw)
322 RTA_PUT(skb, RTA_GATEWAY, 2, &fi->fib_nh->nh_gw);
323 if (fi->fib_nh->nh_oif)
324 RTA_PUT(skb, RTA_OIF, sizeof(int), &fi->fib_nh->nh_oif);
326 if (fi->fib_nhs > 1) {
333 for_nexthops(fi) {
343 } endfor_nexthops(fi);
512 struct dn_fib_info *fi;
534 if ((fi = dn_fib_create_info(r, rta, n, &err)) == NULL)
560 if (fi->fib_priority <= DN_FIB_INFO(f)->fib_priority)
565 fi->fib_priority == DN_FIB_INFO(f)->fib_priority) {
583 if (fi->fib_priority != DN_FIB_INFO(f)->fib_priority)
587 DN_FIB_INFO(f) == fi)
611 DN_FIB_INFO(new_f) = fi;
639 dn_fib_release_info(fi);
681 struct dn_fib_info *fi = DN_FIB_INFO(f);
692 fi->fib_protocol == r->rtm_protocol) &&
693 dn_fib_nh_match(r, n, rta, fi) == 0)
732 struct dn_fib_info *fi = DN_FIB_INFO(f);
734 if (fi && ((f->fn_state & DN_S_ZOMBIE) || (fi->fib_flags & RTNH_F_DEAD))) {