Searched refs:rtnh (Results 1 – 8 of 8) sorted by relevance
/linux/include/net/ |
A D | rtnh.h | 8 static inline int rtnh_ok(const struct rtnexthop *rtnh, int remaining) in rtnh_ok() argument 10 return remaining >= (int)sizeof(*rtnh) && in rtnh_ok() 11 rtnh->rtnh_len >= sizeof(*rtnh) && in rtnh_ok() 12 rtnh->rtnh_len <= remaining; in rtnh_ok() 15 static inline struct rtnexthop *rtnh_next(const struct rtnexthop *rtnh, in rtnh_next() argument 18 int totlen = NLA_ALIGN(rtnh->rtnh_len); in rtnh_next() 21 return (struct rtnexthop *) ((char *) rtnh + totlen); in rtnh_next() 24 static inline struct nlattr *rtnh_attrs(const struct rtnexthop *rtnh) in rtnh_attrs() argument 26 return (struct nlattr *) ((char *) rtnh + NLA_ALIGN(sizeof(*rtnh))); in rtnh_attrs() 29 static inline int rtnh_attrlen(const struct rtnexthop *rtnh) in rtnh_attrlen() argument [all …]
|
/linux/net/ipv4/ |
A D | fib_semantics.c | 652 rtnh = rtnh_next(rtnh, &remaining); in fib_count_nexthops() 756 rtnh = rtnh_next(rtnh, &remaining); in fib_get_nhs() 869 struct rtnexthop *rtnh; in fib_nh_match() local 915 rtnh = cfg->fc_mp; in fib_nh_match() 924 if (rtnh->rtnh_ifindex && rtnh->rtnh_ifindex != nh->fib_nh_oif) in fib_nh_match() 985 rtnh = rtnh_next(rtnh, &remaining); in fib_nh_match() 1704 struct rtnexthop *rtnh; in fib_add_nexthop() local 1707 rtnh = nla_reserve_nohdr(skb, sizeof(*rtnh)); in fib_add_nexthop() 1708 if (!rtnh) in fib_add_nexthop() 1717 rtnh->rtnh_flags = flags; in fib_add_nexthop() [all …]
|
A D | ipmr.c | 2624 struct rtnexthop *rtnh = nla_data(nla); in ipmr_nla_get_ttls() local 2627 while (rtnh_ok(rtnh, remaining)) { in ipmr_nla_get_ttls() 2628 mfcc->mfcc_ttls[vifi] = rtnh->rtnh_hops; in ipmr_nla_get_ttls() 2631 rtnh = rtnh_next(rtnh, &remaining); in ipmr_nla_get_ttls()
|
A D | .fib_semantics.o.cmd | 1492 include/net/rtnh.h \
|
/linux/include/uapi/linux/ |
A D | rtnetlink.h | 424 #define RTNH_OK(rtnh,len) ((rtnh)->rtnh_len >= sizeof(struct rtnexthop) && \ argument 425 ((int)(rtnh)->rtnh_len) <= (len)) 426 #define RTNH_NEXT(rtnh) ((struct rtnexthop*)(((char*)(rtnh)) + RTNH_ALIGN((rtnh)->rtnh_len))) argument 429 #define RTNH_DATA(rtnh) ((struct rtattr*)(((char*)(rtnh)) + RTNH_LENGTH(0))) argument
|
/linux/net/core/ |
A D | lwtunnel.c | 187 struct rtnexthop *rtnh = (struct rtnexthop *)attr; in lwtunnel_valid_encap_type_attr() local 193 while (rtnh_ok(rtnh, remaining)) { in lwtunnel_valid_encap_type_attr() 194 attrlen = rtnh_attrlen(rtnh); in lwtunnel_valid_encap_type_attr() 196 attrs = rtnh_attrs(rtnh); in lwtunnel_valid_encap_type_attr() 211 rtnh = rtnh_next(rtnh, &remaining); in lwtunnel_valid_encap_type_attr()
|
/linux/net/mpls/ |
A D | af_mpls.c | 845 while (rtnh_ok(rtnh, remaining)) { in mpls_count_nexthops() 850 attrlen = rtnh_attrlen(rtnh); in mpls_count_nexthops() 877 rtnh = rtnh_next(rtnh, &remaining); in mpls_count_nexthops() 901 if (!rtnh_ok(rtnh, remaining)) in mpls_nh_build_multi() 907 if (rtnh->rtnh_hops || rtnh->rtnh_flags) in mpls_nh_build_multi() 910 attrlen = rtnh_attrlen(rtnh); in mpls_nh_build_multi() 927 rtnh = rtnh_next(rtnh, &remaining); in mpls_nh_build_multi() 2036 struct rtnexthop *rtnh; in mpls_dump_route() local 2050 rtnh = nla_reserve_nohdr(skb, sizeof(*rtnh)); in mpls_dump_route() 2051 if (!rtnh) in mpls_dump_route() [all …]
|
/linux/net/ipv6/ |
A D | route.c | 5246 struct rtnexthop *rtnh; in ip6_route_multipath_add() local 5264 rtnh = (struct rtnexthop *)cfg->fc_mp; in ip6_route_multipath_add() 5269 while (rtnh_ok(rtnh, remaining)) { in ip6_route_multipath_add() 5271 if (rtnh->rtnh_ifindex) in ip6_route_multipath_add() 5274 attrlen = rtnh_attrlen(rtnh); in ip6_route_multipath_add() 5321 rtnh = rtnh_next(rtnh, &remaining); in ip6_route_multipath_add() 5437 struct rtnexthop *rtnh; in ip6_route_multipath_del() local 5447 while (rtnh_ok(rtnh, remaining)) { in ip6_route_multipath_del() 5449 if (rtnh->rtnh_ifindex) in ip6_route_multipath_del() 5452 attrlen = rtnh_attrlen(rtnh); in ip6_route_multipath_del() [all …]
|
Completed in 34 milliseconds