xtcshared.h 867 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
#ifndef _LIBXTC_SHARED_H
#define _LIBXTC_SHARED_H 1

typedef char xt_chainlabel[32];
struct xtc_handle;
struct xt_counters;

struct xtc_ops {
	int (*commit)(struct xtc_handle *);
10
	struct xtc_handle *(*init)(const char *);
11
12
13
14
15
	void (*free)(struct xtc_handle *);
	int (*builtin)(const char *, struct xtc_handle *const);
	int (*is_chain)(const char *, struct xtc_handle *const);
	int (*flush_entries)(const xt_chainlabel, struct xtc_handle *);
	int (*create_chain)(const xt_chainlabel, struct xtc_handle *);
16
17
18
19
	const char *(*first_chain)(struct xtc_handle *);
	const char *(*next_chain)(struct xtc_handle *);
	const char *(*get_policy)(const char *, struct xt_counters *,
				  struct xtc_handle *);
20
21
22
23
24
25
	int (*set_policy)(const xt_chainlabel, const xt_chainlabel,
			  struct xt_counters *, struct xtc_handle *);
	const char *(*strerror)(int);
};

#endif /* _LIBXTC_SHARED_H */