Lines Matching refs:rtm
678 struct rtmsg *rtm; in rtm_to_route_config() local
683 err = nlmsg_parse(nlh, sizeof(*rtm), tb, RTA_MAX, rtm_mpls_policy); in rtm_to_route_config()
688 rtm = nlmsg_data(nlh); in rtm_to_route_config()
691 if (rtm->rtm_family != AF_MPLS) in rtm_to_route_config()
693 if (rtm->rtm_dst_len != 20) in rtm_to_route_config()
695 if (rtm->rtm_src_len != 0) in rtm_to_route_config()
697 if (rtm->rtm_tos != 0) in rtm_to_route_config()
699 if (rtm->rtm_table != RT_TABLE_MAIN) in rtm_to_route_config()
707 if (rtm->rtm_scope != RT_SCOPE_UNIVERSE) in rtm_to_route_config()
709 if (rtm->rtm_type != RTN_UNICAST) in rtm_to_route_config()
711 if (rtm->rtm_flags != 0) in rtm_to_route_config()
715 cfg->rc_protocol = rtm->rtm_protocol; in rtm_to_route_config()
823 struct rtmsg *rtm; in mpls_dump_route() local
825 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*rtm), flags); in mpls_dump_route()
829 rtm = nlmsg_data(nlh); in mpls_dump_route()
830 rtm->rtm_family = AF_MPLS; in mpls_dump_route()
831 rtm->rtm_dst_len = 20; in mpls_dump_route()
832 rtm->rtm_src_len = 0; in mpls_dump_route()
833 rtm->rtm_tos = 0; in mpls_dump_route()
834 rtm->rtm_table = RT_TABLE_MAIN; in mpls_dump_route()
835 rtm->rtm_protocol = rt->rt_protocol; in mpls_dump_route()
836 rtm->rtm_scope = RT_SCOPE_UNIVERSE; in mpls_dump_route()
837 rtm->rtm_type = RTN_UNICAST; in mpls_dump_route()
838 rtm->rtm_flags = 0; in mpls_dump_route()