Lines Matching refs:rtm
1812 struct rtmsg *rtm; in rtm_to_route_config() local
1817 err = nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX, in rtm_to_route_config()
1823 rtm = nlmsg_data(nlh); in rtm_to_route_config()
1825 if (rtm->rtm_family != AF_MPLS) { in rtm_to_route_config()
1829 if (rtm->rtm_dst_len != 20) { in rtm_to_route_config()
1833 if (rtm->rtm_src_len != 0) { in rtm_to_route_config()
1837 if (rtm->rtm_tos != 0) { in rtm_to_route_config()
1841 if (rtm->rtm_table != RT_TABLE_MAIN) { in rtm_to_route_config()
1852 if (rtm->rtm_scope != RT_SCOPE_UNIVERSE) { in rtm_to_route_config()
1857 if (rtm->rtm_type != RTN_UNICAST) { in rtm_to_route_config()
1862 if (rtm->rtm_flags != 0) { in rtm_to_route_config()
1868 cfg->rc_protocol = rtm->rtm_protocol; in rtm_to_route_config()
1994 struct rtmsg *rtm; in mpls_dump_route() local
1996 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*rtm), flags); in mpls_dump_route()
2000 rtm = nlmsg_data(nlh); in mpls_dump_route()
2001 rtm->rtm_family = AF_MPLS; in mpls_dump_route()
2002 rtm->rtm_dst_len = 20; in mpls_dump_route()
2003 rtm->rtm_src_len = 0; in mpls_dump_route()
2004 rtm->rtm_tos = 0; in mpls_dump_route()
2005 rtm->rtm_table = RT_TABLE_MAIN; in mpls_dump_route()
2006 rtm->rtm_protocol = rt->rt_protocol; in mpls_dump_route()
2007 rtm->rtm_scope = RT_SCOPE_UNIVERSE; in mpls_dump_route()
2008 rtm->rtm_type = RTN_UNICAST; in mpls_dump_route()
2009 rtm->rtm_flags = 0; in mpls_dump_route()
2037 rtm->rtm_flags |= RTNH_F_LINKDOWN; in mpls_dump_route()
2039 rtm->rtm_flags |= RTNH_F_DEAD; in mpls_dump_route()
2084 rtm->rtm_flags |= RTNH_F_LINKDOWN; in mpls_dump_route()
2086 rtm->rtm_flags |= RTNH_F_DEAD; in mpls_dump_route()
2113 struct rtmsg *rtm; in mpls_valid_fib_dump_req() local
2116 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*rtm))) { in mpls_valid_fib_dump_req()
2121 rtm = nlmsg_data(nlh); in mpls_valid_fib_dump_req()
2122 if (rtm->rtm_dst_len || rtm->rtm_src_len || rtm->rtm_tos || in mpls_valid_fib_dump_req()
2123 rtm->rtm_table || rtm->rtm_scope || rtm->rtm_type || in mpls_valid_fib_dump_req()
2124 rtm->rtm_flags) { in mpls_valid_fib_dump_req()
2129 if (rtm->rtm_protocol) { in mpls_valid_fib_dump_req()
2130 filter->protocol = rtm->rtm_protocol; in mpls_valid_fib_dump_req()
2135 err = nlmsg_parse_deprecated_strict(nlh, sizeof(*rtm), tb, RTA_MAX, in mpls_valid_fib_dump_req()
2305 struct rtmsg *rtm; in mpls_valid_getroute_req() local
2308 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*rtm))) { in mpls_valid_getroute_req()
2315 return nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX, in mpls_valid_getroute_req()
2318 rtm = nlmsg_data(nlh); in mpls_valid_getroute_req()
2319 if ((rtm->rtm_dst_len && rtm->rtm_dst_len != 20) || in mpls_valid_getroute_req()
2320 rtm->rtm_src_len || rtm->rtm_tos || rtm->rtm_table || in mpls_valid_getroute_req()
2321 rtm->rtm_protocol || rtm->rtm_scope || rtm->rtm_type) { in mpls_valid_getroute_req()
2325 if (rtm->rtm_flags & ~RTM_F_FIB_MATCH) { in mpls_valid_getroute_req()
2331 err = nlmsg_parse_deprecated_strict(nlh, sizeof(*rtm), tb, RTA_MAX, in mpls_valid_getroute_req()
2336 if ((tb[RTA_DST] || tb[RTA_NEWDST]) && !rtm->rtm_dst_len) { in mpls_valid_getroute_req()
2371 struct rtmsg *rtm, *r; in mpls_getroute() local
2381 rtm = nlmsg_data(in_nlh); in mpls_getroute()
2404 if (rtm->rtm_flags & RTM_F_FIB_MATCH) { in mpls_getroute()