xref: /aosp_15_r20/external/iproute2/include/libiptc/xtcshared.h (revision de1e4e894b0c224df933550f0afdecc354b238c4)
1*de1e4e89SAndroid Build Coastguard Worker #ifndef _LIBXTC_SHARED_H
2*de1e4e89SAndroid Build Coastguard Worker #define _LIBXTC_SHARED_H 1
3*de1e4e89SAndroid Build Coastguard Worker 
4*de1e4e89SAndroid Build Coastguard Worker typedef char xt_chainlabel[32];
5*de1e4e89SAndroid Build Coastguard Worker struct xtc_handle;
6*de1e4e89SAndroid Build Coastguard Worker struct xt_counters;
7*de1e4e89SAndroid Build Coastguard Worker 
8*de1e4e89SAndroid Build Coastguard Worker struct xtc_ops {
9*de1e4e89SAndroid Build Coastguard Worker 	int (*commit)(struct xtc_handle *);
10*de1e4e89SAndroid Build Coastguard Worker 	void (*free)(struct xtc_handle *);
11*de1e4e89SAndroid Build Coastguard Worker 	int (*builtin)(const char *, struct xtc_handle *const);
12*de1e4e89SAndroid Build Coastguard Worker 	int (*is_chain)(const char *, struct xtc_handle *const);
13*de1e4e89SAndroid Build Coastguard Worker 	int (*flush_entries)(const xt_chainlabel, struct xtc_handle *);
14*de1e4e89SAndroid Build Coastguard Worker 	int (*create_chain)(const xt_chainlabel, struct xtc_handle *);
15*de1e4e89SAndroid Build Coastguard Worker 	int (*set_policy)(const xt_chainlabel, const xt_chainlabel,
16*de1e4e89SAndroid Build Coastguard Worker 			  struct xt_counters *, struct xtc_handle *);
17*de1e4e89SAndroid Build Coastguard Worker 	const char *(*strerror)(int);
18*de1e4e89SAndroid Build Coastguard Worker };
19*de1e4e89SAndroid Build Coastguard Worker 
20*de1e4e89SAndroid Build Coastguard Worker #endif /* _LIBXTC_SHARED_H */
21