Searched refs:nfacct (Results 1 - 4 of 4) sorted by relevance
/linux-4.1.27/include/uapi/linux/netfilter/ |
H A D | xt_nfacct.h | 10 struct nf_acct *nfacct; member in struct:xt_nfacct_match_info
|
/linux-4.1.27/net/netfilter/ |
H A D | xt_nfacct.c | 27 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(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 D | nfnetlink_acct.c | 28 MODULE_DESCRIPTION("nfacct: Extended Netfilter accounting infrastructure"); 55 struct nf_acct *nfacct, *matching = NULL; nfnl_acct_new() local 67 list_for_each_entry(nfacct, &nfnl_acct_list, head) { nfnl_acct_new() 68 if (strncmp(nfacct->name, acct_name, NFACCT_NAME_MAX) != 0) nfnl_acct_new() 74 matching = nfacct; nfnl_acct_new() 105 nfacct = kzalloc(sizeof(struct nf_acct) + size, GFP_KERNEL); nfnl_acct_new() 106 if (nfacct == NULL) nfnl_acct_new() 110 u64 *quota = (u64 *)nfacct->data; nfnl_acct_new() 113 nfacct->flags = flags; nfnl_acct_new() 116 strncpy(nfacct->name, nla_data(tb[NFACCT_NAME]), NFACCT_NAME_MAX); nfnl_acct_new() 119 atomic64_set(&nfacct->bytes, nfnl_acct_new() 123 atomic64_set(&nfacct->pkts, nfnl_acct_new() 126 atomic_set(&nfacct->refcnt, 1); nfnl_acct_new() 127 list_add_tail_rcu(&nfacct->head, &nfnl_acct_list); nfnl_acct_new() 430 void nfnl_acct_update(const struct sk_buff *skb, struct nf_acct *nfacct) nfnl_acct_update() argument 432 atomic64_inc(&nfacct->pkts); nfnl_acct_update() 433 atomic64_add(skb->len, &nfacct->bytes); nfnl_acct_update() 437 static void nfnl_overquota_report(struct nf_acct *nfacct) nfnl_overquota_report() argument 447 nfacct); nfnl_overquota_report() 456 int nfnl_acct_overquota(const struct sk_buff *skb, struct nf_acct *nfacct) nfnl_acct_overquota() argument 463 if (!(nfacct->flags & NFACCT_F_QUOTA)) nfnl_acct_overquota() 466 quota = (u64 *)nfacct->data; nfnl_acct_overquota() 467 now = (nfacct->flags & NFACCT_F_QUOTA_PKTS) ? nfnl_acct_overquota() 468 atomic64_read(&nfacct->pkts) : atomic64_read(&nfacct->bytes); nfnl_acct_overquota() 473 !test_and_set_bit(NFACCT_OVERQUOTA_BIT, &nfacct->flags)) { nfnl_acct_overquota() 474 nfnl_overquota_report(nfacct); nfnl_acct_overquota()
|
/linux-4.1.27/include/linux/netfilter/ |
H A D | nfnetlink_acct.h | 16 void nfnl_acct_update(const struct sk_buff *skb, struct nf_acct *nfacct); 18 struct nf_acct *nfacct);
|
Completed in 246 milliseconds