Commit 4b216e21cfca77132ef0215f553eda91eb1d038b
Committed by
Pablo Neira Ayuso
1 parent
a0badcc665
netfilter: conntrack: un-export seq_print_acct
Only one caller, just place it where its needed. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Showing 3 changed files with 18 additions and 22 deletions Side-by-side Diff
include/net/netfilter/nf_conntrack_acct.h
net/netfilter/nf_conntrack_acct.c
... | ... | @@ -38,25 +38,6 @@ |
38 | 38 | }; |
39 | 39 | #endif /* CONFIG_SYSCTL */ |
40 | 40 | |
41 | -unsigned int | |
42 | -seq_print_acct(struct seq_file *s, const struct nf_conn *ct, int dir) | |
43 | -{ | |
44 | - struct nf_conn_acct *acct; | |
45 | - struct nf_conn_counter *counter; | |
46 | - | |
47 | - acct = nf_conn_acct_find(ct); | |
48 | - if (!acct) | |
49 | - return 0; | |
50 | - | |
51 | - counter = acct->counter; | |
52 | - seq_printf(s, "packets=%llu bytes=%llu ", | |
53 | - (unsigned long long)atomic64_read(&counter[dir].packets), | |
54 | - (unsigned long long)atomic64_read(&counter[dir].bytes)); | |
55 | - | |
56 | - return 0; | |
57 | -}; | |
58 | -EXPORT_SYMBOL_GPL(seq_print_acct); | |
59 | - | |
60 | 41 | static const struct nf_ct_ext_type acct_extend = { |
61 | 42 | .len = sizeof(struct nf_conn_acct), |
62 | 43 | .align = __alignof__(struct nf_conn_acct), |
net/netfilter/nf_conntrack_standalone.c
... | ... | @@ -267,6 +267,24 @@ |
267 | 267 | return "unknown"; |
268 | 268 | } |
269 | 269 | |
270 | +static unsigned int | |
271 | +seq_print_acct(struct seq_file *s, const struct nf_conn *ct, int dir) | |
272 | +{ | |
273 | + struct nf_conn_acct *acct; | |
274 | + struct nf_conn_counter *counter; | |
275 | + | |
276 | + acct = nf_conn_acct_find(ct); | |
277 | + if (!acct) | |
278 | + return 0; | |
279 | + | |
280 | + counter = acct->counter; | |
281 | + seq_printf(s, "packets=%llu bytes=%llu ", | |
282 | + (unsigned long long)atomic64_read(&counter[dir].packets), | |
283 | + (unsigned long long)atomic64_read(&counter[dir].bytes)); | |
284 | + | |
285 | + return 0; | |
286 | +} | |
287 | + | |
270 | 288 | /* return 0 on success, 1 in case of error */ |
271 | 289 | static int ct_seq_show(struct seq_file *s, void *v) |
272 | 290 | { |