Lines Matching refs:rtm

1810 	struct rtmsg *rtm;  in rtm_to_route_config()  local
1815 err = nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX, in rtm_to_route_config()
1821 rtm = nlmsg_data(nlh); in rtm_to_route_config()
1823 if (rtm->rtm_family != AF_MPLS) { in rtm_to_route_config()
1827 if (rtm->rtm_dst_len != 20) { in rtm_to_route_config()
1831 if (rtm->rtm_src_len != 0) { in rtm_to_route_config()
1835 if (rtm->rtm_tos != 0) { in rtm_to_route_config()
1839 if (rtm->rtm_table != RT_TABLE_MAIN) { in rtm_to_route_config()
1850 if (rtm->rtm_scope != RT_SCOPE_UNIVERSE) { in rtm_to_route_config()
1855 if (rtm->rtm_type != RTN_UNICAST) { in rtm_to_route_config()
1860 if (rtm->rtm_flags != 0) { in rtm_to_route_config()
1866 cfg->rc_protocol = rtm->rtm_protocol; in rtm_to_route_config()
1992 struct rtmsg *rtm; in mpls_dump_route() local
1994 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*rtm), flags); in mpls_dump_route()
1998 rtm = nlmsg_data(nlh); in mpls_dump_route()
1999 rtm->rtm_family = AF_MPLS; in mpls_dump_route()
2000 rtm->rtm_dst_len = 20; in mpls_dump_route()
2001 rtm->rtm_src_len = 0; in mpls_dump_route()
2002 rtm->rtm_tos = 0; in mpls_dump_route()
2003 rtm->rtm_table = RT_TABLE_MAIN; in mpls_dump_route()
2004 rtm->rtm_protocol = rt->rt_protocol; in mpls_dump_route()
2005 rtm->rtm_scope = RT_SCOPE_UNIVERSE; in mpls_dump_route()
2006 rtm->rtm_type = RTN_UNICAST; in mpls_dump_route()
2007 rtm->rtm_flags = 0; in mpls_dump_route()
2035 rtm->rtm_flags |= RTNH_F_LINKDOWN; in mpls_dump_route()
2037 rtm->rtm_flags |= RTNH_F_DEAD; in mpls_dump_route()
2082 rtm->rtm_flags |= RTNH_F_LINKDOWN; in mpls_dump_route()
2084 rtm->rtm_flags |= RTNH_F_DEAD; in mpls_dump_route()
2111 struct rtmsg *rtm; in mpls_valid_fib_dump_req() local
2114 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*rtm))) { in mpls_valid_fib_dump_req()
2119 rtm = nlmsg_data(nlh); in mpls_valid_fib_dump_req()
2120 if (rtm->rtm_dst_len || rtm->rtm_src_len || rtm->rtm_tos || in mpls_valid_fib_dump_req()
2121 rtm->rtm_table || rtm->rtm_scope || rtm->rtm_type || in mpls_valid_fib_dump_req()
2122 rtm->rtm_flags) { in mpls_valid_fib_dump_req()
2127 if (rtm->rtm_protocol) { in mpls_valid_fib_dump_req()
2128 filter->protocol = rtm->rtm_protocol; in mpls_valid_fib_dump_req()
2133 err = nlmsg_parse_deprecated_strict(nlh, sizeof(*rtm), tb, RTA_MAX, in mpls_valid_fib_dump_req()
2303 struct rtmsg *rtm; in mpls_valid_getroute_req() local
2306 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*rtm))) { in mpls_valid_getroute_req()
2313 return nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX, in mpls_valid_getroute_req()
2316 rtm = nlmsg_data(nlh); in mpls_valid_getroute_req()
2317 if ((rtm->rtm_dst_len && rtm->rtm_dst_len != 20) || in mpls_valid_getroute_req()
2318 rtm->rtm_src_len || rtm->rtm_tos || rtm->rtm_table || in mpls_valid_getroute_req()
2319 rtm->rtm_protocol || rtm->rtm_scope || rtm->rtm_type) { in mpls_valid_getroute_req()
2323 if (rtm->rtm_flags & ~RTM_F_FIB_MATCH) { in mpls_valid_getroute_req()
2329 err = nlmsg_parse_deprecated_strict(nlh, sizeof(*rtm), tb, RTA_MAX, in mpls_valid_getroute_req()
2334 if ((tb[RTA_DST] || tb[RTA_NEWDST]) && !rtm->rtm_dst_len) { in mpls_valid_getroute_req()
2369 struct rtmsg *rtm, *r; in mpls_getroute() local
2379 rtm = nlmsg_data(in_nlh); in mpls_getroute()
2402 if (rtm->rtm_flags & RTM_F_FIB_MATCH) { in mpls_getroute()