Lines Matching refs:rtm
2429 struct rtmsg *rtm; in rtm_to_fib6_config() local
2434 err = nlmsg_parse(nlh, sizeof(*rtm), tb, RTA_MAX, rtm_ipv6_policy); in rtm_to_fib6_config()
2439 rtm = nlmsg_data(nlh); in rtm_to_fib6_config()
2442 cfg->fc_table = rtm->rtm_table; in rtm_to_fib6_config()
2443 cfg->fc_dst_len = rtm->rtm_dst_len; in rtm_to_fib6_config()
2444 cfg->fc_src_len = rtm->rtm_src_len; in rtm_to_fib6_config()
2446 cfg->fc_protocol = rtm->rtm_protocol; in rtm_to_fib6_config()
2447 cfg->fc_type = rtm->rtm_type; in rtm_to_fib6_config()
2449 if (rtm->rtm_type == RTN_UNREACHABLE || in rtm_to_fib6_config()
2450 rtm->rtm_type == RTN_BLACKHOLE || in rtm_to_fib6_config()
2451 rtm->rtm_type == RTN_PROHIBIT || in rtm_to_fib6_config()
2452 rtm->rtm_type == RTN_THROW) in rtm_to_fib6_config()
2455 if (rtm->rtm_type == RTN_LOCAL) in rtm_to_fib6_config()
2468 int plen = (rtm->rtm_dst_len + 7) >> 3; in rtm_to_fib6_config()
2477 int plen = (rtm->rtm_src_len + 7) >> 3; in rtm_to_fib6_config()
2758 struct rtmsg *rtm; in rt6_fill_node() local
2770 nlh = nlmsg_put(skb, portid, seq, type, sizeof(*rtm), flags); in rt6_fill_node()
2774 rtm = nlmsg_data(nlh); in rt6_fill_node()
2775 rtm->rtm_family = AF_INET6; in rt6_fill_node()
2776 rtm->rtm_dst_len = rt->rt6i_dst.plen; in rt6_fill_node()
2777 rtm->rtm_src_len = rt->rt6i_src.plen; in rt6_fill_node()
2778 rtm->rtm_tos = 0; in rt6_fill_node()
2783 rtm->rtm_table = table; in rt6_fill_node()
2789 rtm->rtm_type = RTN_BLACKHOLE; in rt6_fill_node()
2792 rtm->rtm_type = RTN_PROHIBIT; in rt6_fill_node()
2795 rtm->rtm_type = RTN_THROW; in rt6_fill_node()
2798 rtm->rtm_type = RTN_UNREACHABLE; in rt6_fill_node()
2803 rtm->rtm_type = RTN_LOCAL; in rt6_fill_node()
2805 rtm->rtm_type = RTN_LOCAL; in rt6_fill_node()
2807 rtm->rtm_type = RTN_UNICAST; in rt6_fill_node()
2808 rtm->rtm_flags = 0; in rt6_fill_node()
2809 rtm->rtm_scope = RT_SCOPE_UNIVERSE; in rt6_fill_node()
2810 rtm->rtm_protocol = rt->rt6i_protocol; in rt6_fill_node()
2812 rtm->rtm_protocol = RTPROT_REDIRECT; in rt6_fill_node()
2815 rtm->rtm_protocol = RTPROT_RA; in rt6_fill_node()
2817 rtm->rtm_protocol = RTPROT_KERNEL; in rt6_fill_node()
2821 rtm->rtm_flags |= RTM_F_CLONED; in rt6_fill_node()
2826 rtm->rtm_dst_len = 128; in rt6_fill_node()
2827 } else if (rtm->rtm_dst_len) in rt6_fill_node()
2834 rtm->rtm_src_len = 128; in rt6_fill_node()
2835 } else if (rtm->rtm_src_len && in rt6_fill_node()
2842 int err = ip6mr_get_route(net, skb, rtm, nowait); in rt6_fill_node()
2907 struct rtmsg *rtm = nlmsg_data(arg->cb->nlh); in rt6_dump_route() local
2908 prefix = (rtm->rtm_flags & RTM_F_PREFIX) != 0; in rt6_dump_route()
2924 struct rtmsg *rtm; in inet6_rtm_getroute() local
2928 err = nlmsg_parse(nlh, sizeof(*rtm), tb, RTA_MAX, rtm_ipv6_policy); in inet6_rtm_getroute()