xref: /linux/include/uapi/linux/netfilter/nfnetlink_acct.h (revision 498495dba268b20e8eadd7fe93c140c68b6cc9d2)
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef _UAPI_NFNL_ACCT_H_
3 #define _UAPI_NFNL_ACCT_H_
4 
5 #ifndef NFACCT_NAME_MAX
6 #define NFACCT_NAME_MAX		32
7 #endif
8 
9 enum nfnl_acct_msg_types {
10 	NFNL_MSG_ACCT_NEW,
11 	NFNL_MSG_ACCT_GET,
12 	NFNL_MSG_ACCT_GET_CTRZERO,
13 	NFNL_MSG_ACCT_DEL,
14 	NFNL_MSG_ACCT_OVERQUOTA,
15 	NFNL_MSG_ACCT_MAX
16 };
17 
18 enum nfnl_acct_flags {
19 	NFACCT_F_QUOTA_PKTS	= (1 << 0),
20 	NFACCT_F_QUOTA_BYTES	= (1 << 1),
21 	NFACCT_F_OVERQUOTA	= (1 << 2), /* can't be set from userspace */
22 };
23 
24 enum nfnl_acct_type {
25 	NFACCT_UNSPEC,
26 	NFACCT_NAME,
27 	NFACCT_PKTS,
28 	NFACCT_BYTES,
29 	NFACCT_USE,
30 	NFACCT_FLAGS,
31 	NFACCT_QUOTA,
32 	NFACCT_FILTER,
33 	NFACCT_PAD,
34 	__NFACCT_MAX
35 };
36 #define NFACCT_MAX (__NFACCT_MAX - 1)
37 
38 enum nfnl_attr_filter_type {
39 	NFACCT_FILTER_UNSPEC,
40 	NFACCT_FILTER_MASK,
41 	NFACCT_FILTER_VALUE,
42 	__NFACCT_FILTER_MAX
43 };
44 #define NFACCT_FILTER_MAX (__NFACCT_FILTER_MAX - 1)
45 
46 #endif /* _UAPI_NFNL_ACCT_H_ */
47