Lines Matching refs:exp

2864 	struct nf_conntrack_expect *exp;  in ctnetlink_glue_attach_expect()  local
2886 exp = ctnetlink_alloc_expect((const struct nlattr * const *)cda, ct, in ctnetlink_glue_attach_expect()
2888 if (IS_ERR(exp)) in ctnetlink_glue_attach_expect()
2889 return PTR_ERR(exp); in ctnetlink_glue_attach_expect()
2891 err = nf_ct_expect_related_report(exp, portid, report, 0); in ctnetlink_glue_attach_expect()
2892 nf_ct_expect_put(exp); in ctnetlink_glue_attach_expect()
2979 static __be32 nf_expect_get_id(const struct nf_conntrack_expect *exp) in nf_expect_get_id() argument
2986 a = (unsigned long)exp; in nf_expect_get_id()
2987 b = (unsigned long)exp->helper; in nf_expect_get_id()
2988 c = (unsigned long)exp->master; in nf_expect_get_id()
2989 d = (unsigned long)siphash(&exp->tuple, sizeof(exp->tuple), &exp_id_seed); in nf_expect_get_id()
3000 const struct nf_conntrack_expect *exp) in ctnetlink_exp_dump_expect() argument
3002 struct nf_conn *master = exp->master; in ctnetlink_exp_dump_expect()
3003 long timeout = ((long)exp->timeout.expires - (long)jiffies) / HZ; in ctnetlink_exp_dump_expect()
3014 if (ctnetlink_exp_dump_tuple(skb, &exp->tuple, CTA_EXPECT_TUPLE) < 0) in ctnetlink_exp_dump_expect()
3016 if (ctnetlink_exp_dump_mask(skb, &exp->tuple, &exp->mask) < 0) in ctnetlink_exp_dump_expect()
3024 if (!nf_inet_addr_cmp(&exp->saved_addr, &any_addr) || in ctnetlink_exp_dump_expect()
3025 exp->saved_proto.all) { in ctnetlink_exp_dump_expect()
3030 if (nla_put_be32(skb, CTA_EXPECT_NAT_DIR, htonl(exp->dir))) in ctnetlink_exp_dump_expect()
3034 nat_tuple.src.u3 = exp->saved_addr; in ctnetlink_exp_dump_expect()
3036 nat_tuple.src.u = exp->saved_proto; in ctnetlink_exp_dump_expect()
3045 nla_put_be32(skb, CTA_EXPECT_ID, nf_expect_get_id(exp)) || in ctnetlink_exp_dump_expect()
3046 nla_put_be32(skb, CTA_EXPECT_FLAGS, htonl(exp->flags)) || in ctnetlink_exp_dump_expect()
3047 nla_put_be32(skb, CTA_EXPECT_CLASS, htonl(exp->class))) in ctnetlink_exp_dump_expect()
3058 expfn = nf_ct_helper_expectfn_find_by_symbol(exp->expectfn); in ctnetlink_exp_dump_expect()
3071 int event, const struct nf_conntrack_expect *exp) in ctnetlink_exp_fill_info() argument
3078 exp->tuple.src.l3num, NFNETLINK_V0, 0); in ctnetlink_exp_fill_info()
3082 if (ctnetlink_exp_dump_expect(skb, exp) < 0) in ctnetlink_exp_fill_info()
3098 struct nf_conntrack_expect *exp = item->exp; in ctnetlink_expect_event() local
3099 struct net *net = nf_ct_exp_net(exp); in ctnetlink_expect_event()
3124 exp->tuple.src.l3num, NFNETLINK_V0, 0); in ctnetlink_expect_event()
3128 if (ctnetlink_exp_dump_expect(skb, exp) < 0) in ctnetlink_expect_event()
3155 struct nf_conntrack_expect *exp, *last; in ctnetlink_exp_dump_table() local
3163 hlist_for_each_entry_rcu(exp, &nf_ct_expect_hash[cb->args[0]], in ctnetlink_exp_dump_table()
3165 if (l3proto && exp->tuple.src.l3num != l3proto) in ctnetlink_exp_dump_table()
3168 if (!net_eq(nf_ct_net(exp->master), net)) in ctnetlink_exp_dump_table()
3172 if (exp != last) in ctnetlink_exp_dump_table()
3180 exp) < 0) { in ctnetlink_exp_dump_table()
3181 if (!refcount_inc_not_zero(&exp->use)) in ctnetlink_exp_dump_table()
3183 cb->args[1] = (unsigned long)exp; in ctnetlink_exp_dump_table()
3203 struct nf_conntrack_expect *exp, *last; in ctnetlink_exp_ct_dump_table() local
3215 hlist_for_each_entry_rcu(exp, &help->expectations, lnode) { in ctnetlink_exp_ct_dump_table()
3216 if (l3proto && exp->tuple.src.l3num != l3proto) in ctnetlink_exp_ct_dump_table()
3219 if (exp != last) in ctnetlink_exp_ct_dump_table()
3226 exp) < 0) { in ctnetlink_exp_ct_dump_table()
3227 if (!refcount_inc_not_zero(&exp->use)) in ctnetlink_exp_ct_dump_table()
3229 cb->args[1] = (unsigned long)exp; in ctnetlink_exp_ct_dump_table()
3298 struct nf_conntrack_expect *exp; in ctnetlink_get_expect() local
3333 exp = nf_ct_expect_find_get(info->net, &zone, &tuple); in ctnetlink_get_expect()
3334 if (!exp) in ctnetlink_get_expect()
3340 if (id != nf_expect_get_id(exp)) { in ctnetlink_get_expect()
3341 nf_ct_expect_put(exp); in ctnetlink_get_expect()
3348 nf_ct_expect_put(exp); in ctnetlink_get_expect()
3355 exp); in ctnetlink_get_expect()
3357 nf_ct_expect_put(exp); in ctnetlink_get_expect()
3366 static bool expect_iter_name(struct nf_conntrack_expect *exp, void *data) in expect_iter_name() argument
3372 m_help = nfct_help(exp->master); in expect_iter_name()
3381 static bool expect_iter_all(struct nf_conntrack_expect *exp, void *data) in expect_iter_all() argument
3391 struct nf_conntrack_expect *exp; in ctnetlink_del_expect() local
3408 exp = nf_ct_expect_find_get(info->net, &zone, &tuple); in ctnetlink_del_expect()
3409 if (!exp) in ctnetlink_del_expect()
3414 if (ntohl(id) != (u32)(unsigned long)exp) { in ctnetlink_del_expect()
3415 nf_ct_expect_put(exp); in ctnetlink_del_expect()
3422 if (del_timer(&exp->timeout)) { in ctnetlink_del_expect()
3423 nf_ct_unlink_expect_report(exp, NETLINK_CB(skb).portid, in ctnetlink_del_expect()
3425 nf_ct_expect_put(exp); in ctnetlink_del_expect()
3430 nf_ct_expect_put(exp); in ctnetlink_del_expect()
3470 struct nf_conntrack_expect *exp, in ctnetlink_parse_expect_nat() argument
3492 exp->saved_addr = nat_tuple.src.u3; in ctnetlink_parse_expect_nat()
3493 exp->saved_proto = nat_tuple.src.u; in ctnetlink_parse_expect_nat()
3494 exp->dir = ntohl(nla_get_be32(tb[CTA_EXPECT_NAT_DIR])); in ctnetlink_parse_expect_nat()
3509 struct nf_conntrack_expect *exp; in ctnetlink_alloc_expect() local
3522 exp = nf_ct_expect_alloc(ct); in ctnetlink_alloc_expect()
3523 if (!exp) in ctnetlink_alloc_expect()
3527 exp->flags = ntohl(nla_get_be32(cda[CTA_EXPECT_FLAGS])); in ctnetlink_alloc_expect()
3528 exp->flags &= ~NF_CT_EXPECT_USERSPACE; in ctnetlink_alloc_expect()
3530 exp->flags = 0; in ctnetlink_alloc_expect()
3541 exp->expectfn = expfn->expectfn; in ctnetlink_alloc_expect()
3543 exp->expectfn = NULL; in ctnetlink_alloc_expect()
3545 exp->class = class; in ctnetlink_alloc_expect()
3546 exp->master = ct; in ctnetlink_alloc_expect()
3547 exp->helper = helper; in ctnetlink_alloc_expect()
3548 exp->tuple = *tuple; in ctnetlink_alloc_expect()
3549 exp->mask.src.u3 = mask->src.u3; in ctnetlink_alloc_expect()
3550 exp->mask.src.u.all = mask->src.u.all; in ctnetlink_alloc_expect()
3554 exp, nf_ct_l3num(ct)); in ctnetlink_alloc_expect()
3558 return exp; in ctnetlink_alloc_expect()
3560 nf_ct_expect_put(exp); in ctnetlink_alloc_expect()
3573 struct nf_conntrack_expect *exp; in ctnetlink_create_expect() local
3624 exp = ctnetlink_alloc_expect(cda, ct, helper, &tuple, &mask); in ctnetlink_create_expect()
3625 if (IS_ERR(exp)) { in ctnetlink_create_expect()
3626 err = PTR_ERR(exp); in ctnetlink_create_expect()
3630 err = nf_ct_expect_related_report(exp, portid, report, 0); in ctnetlink_create_expect()
3631 nf_ct_expect_put(exp); in ctnetlink_create_expect()
3645 struct nf_conntrack_expect *exp; in ctnetlink_new_expect() local
3664 exp = __nf_ct_expect_find(info->net, &zone, &tuple); in ctnetlink_new_expect()
3665 if (!exp) { in ctnetlink_new_expect()
3678 err = ctnetlink_change_expect(exp, cda); in ctnetlink_new_expect()