Lines Matching refs:tb
30 int (*validate_match_data)(struct nlattr **tb, u8 mrev);
60 static int policy_validate_match_data(struct nlattr **tb, u8 mrev) in policy_validate_match_data() argument
67 if (nla_get_u32(tb[TCA_EM_IPT_HOOK]) != NF_INET_PRE_ROUTING) { in policy_validate_match_data()
75 static int addrtype_validate_match_data(struct nlattr **tb, u8 mrev) in addrtype_validate_match_data() argument
97 static struct xt_match *get_xt_match(struct nlattr **tb) in get_xt_match() argument
104 mname_attr = tb[TCA_EM_IPT_MATCH_NAME]; in get_xt_match()
115 if (tb[TCA_EM_IPT_MATCH_REVISION]) in get_xt_match()
116 mrev = nla_get_u8(tb[TCA_EM_IPT_MATCH_REVISION]); in get_xt_match()
118 ret = m->validate_match_data(tb, mrev); in get_xt_match()
122 nfproto = nla_get_u8(tb[TCA_EM_IPT_NFPROTO]); in get_xt_match()
129 struct nlattr *tb[TCA_EM_IPT_MAX + 1]; in em_ipt_change() local
135 ret = nla_parse_deprecated(tb, TCA_EM_IPT_MAX, data, data_len, in em_ipt_change()
140 if (!tb[TCA_EM_IPT_HOOK] || !tb[TCA_EM_IPT_MATCH_NAME] || in em_ipt_change()
141 !tb[TCA_EM_IPT_MATCH_DATA] || !tb[TCA_EM_IPT_NFPROTO]) in em_ipt_change()
144 nfproto = nla_get_u8(tb[TCA_EM_IPT_NFPROTO]); in em_ipt_change()
153 match = get_xt_match(tb); in em_ipt_change()
159 mdata_len = XT_ALIGN(nla_len(tb[TCA_EM_IPT_MATCH_DATA])); in em_ipt_change()
167 im->hook = nla_get_u32(tb[TCA_EM_IPT_HOOK]); in em_ipt_change()
169 nla_memcpy(im->match_data, tb[TCA_EM_IPT_MATCH_DATA], mdata_len); in em_ipt_change()