Searched refs:nfacct (Results 1 - 4 of 4) sorted by relevance

/linux-4.4.14/include/uapi/linux/netfilter/
H A Dxt_nfacct.h10 struct nf_acct *nfacct; member in struct:xt_nfacct_match_info
/linux-4.4.14/net/netfilter/
H A Dxt_nfacct.c27 nfnl_acct_update(skb, info->nfacct); nfacct_mt()
29 overquota = nfnl_acct_overquota(skb, info->nfacct); nfacct_mt()
38 struct nf_acct *nfacct; nfacct_mt_checkentry() local
40 nfacct = nfnl_acct_find_get(par->net, info->name); nfacct_mt_checkentry()
41 if (nfacct == NULL) { nfacct_mt_checkentry()
46 info->nfacct = nfacct; nfacct_mt_checkentry()
55 nfnl_acct_put(info->nfacct); nfacct_mt_destroy()
59 .name = "nfacct",
H A Dnfnetlink_acct.c28 MODULE_DESCRIPTION("nfacct: Extended Netfilter accounting infrastructure");
53 struct nf_acct *nfacct, *matching = NULL; nfnl_acct_new() local
66 list_for_each_entry(nfacct, &net->nfnl_acct_list, head) { nfnl_acct_new()
67 if (strncmp(nfacct->name, acct_name, NFACCT_NAME_MAX) != 0) nfnl_acct_new()
73 matching = nfacct; nfnl_acct_new()
104 nfacct = kzalloc(sizeof(struct nf_acct) + size, GFP_KERNEL); nfnl_acct_new()
105 if (nfacct == NULL) nfnl_acct_new()
109 u64 *quota = (u64 *)nfacct->data; nfnl_acct_new()
112 nfacct->flags = flags; nfnl_acct_new()
115 strncpy(nfacct->name, nla_data(tb[NFACCT_NAME]), NFACCT_NAME_MAX); nfnl_acct_new()
118 atomic64_set(&nfacct->bytes, nfnl_acct_new()
122 atomic64_set(&nfacct->pkts, nfnl_acct_new()
125 atomic_set(&nfacct->refcnt, 1); nfnl_acct_new()
126 list_add_tail_rcu(&nfacct->head, &net->nfnl_acct_list); nfnl_acct_new()
434 void nfnl_acct_update(const struct sk_buff *skb, struct nf_acct *nfacct) nfnl_acct_update() argument
436 atomic64_inc(&nfacct->pkts); nfnl_acct_update()
437 atomic64_add(skb->len, &nfacct->bytes); nfnl_acct_update()
441 static void nfnl_overquota_report(struct nf_acct *nfacct) nfnl_overquota_report() argument
451 nfacct); nfnl_overquota_report()
460 int nfnl_acct_overquota(const struct sk_buff *skb, struct nf_acct *nfacct) nfnl_acct_overquota() argument
467 if (!(nfacct->flags & NFACCT_F_QUOTA)) nfnl_acct_overquota()
470 quota = (u64 *)nfacct->data; nfnl_acct_overquota()
471 now = (nfacct->flags & NFACCT_F_QUOTA_PKTS) ? nfnl_acct_overquota()
472 atomic64_read(&nfacct->pkts) : atomic64_read(&nfacct->bytes); nfnl_acct_overquota()
477 !test_and_set_bit(NFACCT_OVERQUOTA_BIT, &nfacct->flags)) { nfnl_acct_overquota()
478 nfnl_overquota_report(nfacct); nfnl_acct_overquota()
/linux-4.4.14/include/linux/netfilter/
H A Dnfnetlink_acct.h17 void nfnl_acct_update(const struct sk_buff *skb, struct nf_acct *nfacct);
19 struct nf_acct *nfacct);

Completed in 399 milliseconds