Lines Matching refs:rtm
1099 struct rtmsg *rtm; in rtm_to_route_config() local
1104 err = nlmsg_parse(nlh, sizeof(*rtm), tb, RTA_MAX, rtm_mpls_policy); in rtm_to_route_config()
1109 rtm = nlmsg_data(nlh); in rtm_to_route_config()
1112 if (rtm->rtm_family != AF_MPLS) in rtm_to_route_config()
1114 if (rtm->rtm_dst_len != 20) in rtm_to_route_config()
1116 if (rtm->rtm_src_len != 0) in rtm_to_route_config()
1118 if (rtm->rtm_tos != 0) in rtm_to_route_config()
1120 if (rtm->rtm_table != RT_TABLE_MAIN) in rtm_to_route_config()
1128 if (rtm->rtm_scope != RT_SCOPE_UNIVERSE) in rtm_to_route_config()
1130 if (rtm->rtm_type != RTN_UNICAST) in rtm_to_route_config()
1132 if (rtm->rtm_flags != 0) in rtm_to_route_config()
1136 cfg->rc_protocol = rtm->rtm_protocol; in rtm_to_route_config()
1225 struct rtmsg *rtm; in mpls_dump_route() local
1227 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*rtm), flags); in mpls_dump_route()
1231 rtm = nlmsg_data(nlh); in mpls_dump_route()
1232 rtm->rtm_family = AF_MPLS; in mpls_dump_route()
1233 rtm->rtm_dst_len = 20; in mpls_dump_route()
1234 rtm->rtm_src_len = 0; in mpls_dump_route()
1235 rtm->rtm_tos = 0; in mpls_dump_route()
1236 rtm->rtm_table = RT_TABLE_MAIN; in mpls_dump_route()
1237 rtm->rtm_protocol = rt->rt_protocol; in mpls_dump_route()
1238 rtm->rtm_scope = RT_SCOPE_UNIVERSE; in mpls_dump_route()
1239 rtm->rtm_type = RTN_UNICAST; in mpls_dump_route()
1240 rtm->rtm_flags = 0; in mpls_dump_route()