Lines Matching refs:rtm
2708 struct rtmsg *rtm; in rtm_to_fib6_config() local
2713 err = nlmsg_parse(nlh, sizeof(*rtm), tb, RTA_MAX, rtm_ipv6_policy); in rtm_to_fib6_config()
2718 rtm = nlmsg_data(nlh); in rtm_to_fib6_config()
2721 cfg->fc_table = rtm->rtm_table; in rtm_to_fib6_config()
2722 cfg->fc_dst_len = rtm->rtm_dst_len; in rtm_to_fib6_config()
2723 cfg->fc_src_len = rtm->rtm_src_len; in rtm_to_fib6_config()
2725 cfg->fc_protocol = rtm->rtm_protocol; in rtm_to_fib6_config()
2726 cfg->fc_type = rtm->rtm_type; in rtm_to_fib6_config()
2728 if (rtm->rtm_type == RTN_UNREACHABLE || in rtm_to_fib6_config()
2729 rtm->rtm_type == RTN_BLACKHOLE || in rtm_to_fib6_config()
2730 rtm->rtm_type == RTN_PROHIBIT || in rtm_to_fib6_config()
2731 rtm->rtm_type == RTN_THROW) in rtm_to_fib6_config()
2734 if (rtm->rtm_type == RTN_LOCAL) in rtm_to_fib6_config()
2737 if (rtm->rtm_flags & RTM_F_CLONED) in rtm_to_fib6_config()
2750 int plen = (rtm->rtm_dst_len + 7) >> 3; in rtm_to_fib6_config()
2759 int plen = (rtm->rtm_src_len + 7) >> 3; in rtm_to_fib6_config()
3054 struct rtmsg *rtm; in rt6_fill_node() local
3066 nlh = nlmsg_put(skb, portid, seq, type, sizeof(*rtm), flags); in rt6_fill_node()
3070 rtm = nlmsg_data(nlh); in rt6_fill_node()
3071 rtm->rtm_family = AF_INET6; in rt6_fill_node()
3072 rtm->rtm_dst_len = rt->rt6i_dst.plen; in rt6_fill_node()
3073 rtm->rtm_src_len = rt->rt6i_src.plen; in rt6_fill_node()
3074 rtm->rtm_tos = 0; in rt6_fill_node()
3079 rtm->rtm_table = table; in rt6_fill_node()
3085 rtm->rtm_type = RTN_BLACKHOLE; in rt6_fill_node()
3088 rtm->rtm_type = RTN_PROHIBIT; in rt6_fill_node()
3091 rtm->rtm_type = RTN_THROW; in rt6_fill_node()
3094 rtm->rtm_type = RTN_UNREACHABLE; in rt6_fill_node()
3099 rtm->rtm_type = RTN_LOCAL; in rt6_fill_node()
3101 rtm->rtm_type = RTN_LOCAL; in rt6_fill_node()
3103 rtm->rtm_type = RTN_UNICAST; in rt6_fill_node()
3104 rtm->rtm_flags = 0; in rt6_fill_node()
3106 rtm->rtm_flags |= RTNH_F_LINKDOWN; in rt6_fill_node()
3108 rtm->rtm_flags |= RTNH_F_DEAD; in rt6_fill_node()
3110 rtm->rtm_scope = RT_SCOPE_UNIVERSE; in rt6_fill_node()
3111 rtm->rtm_protocol = rt->rt6i_protocol; in rt6_fill_node()
3113 rtm->rtm_protocol = RTPROT_REDIRECT; in rt6_fill_node()
3116 rtm->rtm_protocol = RTPROT_RA; in rt6_fill_node()
3118 rtm->rtm_protocol = RTPROT_KERNEL; in rt6_fill_node()
3122 rtm->rtm_flags |= RTM_F_CLONED; in rt6_fill_node()
3127 rtm->rtm_dst_len = 128; in rt6_fill_node()
3128 } else if (rtm->rtm_dst_len) in rt6_fill_node()
3135 rtm->rtm_src_len = 128; in rt6_fill_node()
3136 } else if (rtm->rtm_src_len && in rt6_fill_node()
3143 int err = ip6mr_get_route(net, skb, rtm, nowait); in rt6_fill_node()
3213 struct rtmsg *rtm = nlmsg_data(arg->cb->nlh); in rt6_dump_route() local
3214 prefix = (rtm->rtm_flags & RTM_F_PREFIX) != 0; in rt6_dump_route()
3230 struct rtmsg *rtm; in inet6_rtm_getroute() local
3234 err = nlmsg_parse(nlh, sizeof(*rtm), tb, RTA_MAX, rtm_ipv6_policy); in inet6_rtm_getroute()