Lines Matching refs:tb

2709 	struct nlattr *tb[RTA_MAX+1];  in rtm_to_fib6_config()  local
2713 err = nlmsg_parse(nlh, sizeof(*rtm), tb, RTA_MAX, rtm_ipv6_policy); in rtm_to_fib6_config()
2744 if (tb[RTA_GATEWAY]) { in rtm_to_fib6_config()
2745 cfg->fc_gateway = nla_get_in6_addr(tb[RTA_GATEWAY]); in rtm_to_fib6_config()
2749 if (tb[RTA_DST]) { in rtm_to_fib6_config()
2752 if (nla_len(tb[RTA_DST]) < plen) in rtm_to_fib6_config()
2755 nla_memcpy(&cfg->fc_dst, tb[RTA_DST], plen); in rtm_to_fib6_config()
2758 if (tb[RTA_SRC]) { in rtm_to_fib6_config()
2761 if (nla_len(tb[RTA_SRC]) < plen) in rtm_to_fib6_config()
2764 nla_memcpy(&cfg->fc_src, tb[RTA_SRC], plen); in rtm_to_fib6_config()
2767 if (tb[RTA_PREFSRC]) in rtm_to_fib6_config()
2768 cfg->fc_prefsrc = nla_get_in6_addr(tb[RTA_PREFSRC]); in rtm_to_fib6_config()
2770 if (tb[RTA_OIF]) in rtm_to_fib6_config()
2771 cfg->fc_ifindex = nla_get_u32(tb[RTA_OIF]); in rtm_to_fib6_config()
2773 if (tb[RTA_PRIORITY]) in rtm_to_fib6_config()
2774 cfg->fc_metric = nla_get_u32(tb[RTA_PRIORITY]); in rtm_to_fib6_config()
2776 if (tb[RTA_METRICS]) { in rtm_to_fib6_config()
2777 cfg->fc_mx = nla_data(tb[RTA_METRICS]); in rtm_to_fib6_config()
2778 cfg->fc_mx_len = nla_len(tb[RTA_METRICS]); in rtm_to_fib6_config()
2781 if (tb[RTA_TABLE]) in rtm_to_fib6_config()
2782 cfg->fc_table = nla_get_u32(tb[RTA_TABLE]); in rtm_to_fib6_config()
2784 if (tb[RTA_MULTIPATH]) { in rtm_to_fib6_config()
2785 cfg->fc_mp = nla_data(tb[RTA_MULTIPATH]); in rtm_to_fib6_config()
2786 cfg->fc_mp_len = nla_len(tb[RTA_MULTIPATH]); in rtm_to_fib6_config()
2789 if (tb[RTA_PREF]) { in rtm_to_fib6_config()
2790 pref = nla_get_u8(tb[RTA_PREF]); in rtm_to_fib6_config()
2797 if (tb[RTA_ENCAP]) in rtm_to_fib6_config()
2798 cfg->fc_encap = tb[RTA_ENCAP]; in rtm_to_fib6_config()
2800 if (tb[RTA_ENCAP_TYPE]) in rtm_to_fib6_config()
2801 cfg->fc_encap_type = nla_get_u16(tb[RTA_ENCAP_TYPE]); in rtm_to_fib6_config()
3227 struct nlattr *tb[RTA_MAX+1]; in inet6_rtm_getroute() local
3234 err = nlmsg_parse(nlh, sizeof(*rtm), tb, RTA_MAX, rtm_ipv6_policy); in inet6_rtm_getroute()
3241 if (tb[RTA_SRC]) { in inet6_rtm_getroute()
3242 if (nla_len(tb[RTA_SRC]) < sizeof(struct in6_addr)) in inet6_rtm_getroute()
3245 fl6.saddr = *(struct in6_addr *)nla_data(tb[RTA_SRC]); in inet6_rtm_getroute()
3248 if (tb[RTA_DST]) { in inet6_rtm_getroute()
3249 if (nla_len(tb[RTA_DST]) < sizeof(struct in6_addr)) in inet6_rtm_getroute()
3252 fl6.daddr = *(struct in6_addr *)nla_data(tb[RTA_DST]); in inet6_rtm_getroute()
3255 if (tb[RTA_IIF]) in inet6_rtm_getroute()
3256 iif = nla_get_u32(tb[RTA_IIF]); in inet6_rtm_getroute()
3258 if (tb[RTA_OIF]) in inet6_rtm_getroute()
3259 oif = nla_get_u32(tb[RTA_OIF]); in inet6_rtm_getroute()
3261 if (tb[RTA_MARK]) in inet6_rtm_getroute()
3262 fl6.flowi6_mark = nla_get_u32(tb[RTA_MARK]); in inet6_rtm_getroute()