1 #ifndef _IPTABLES_USER_H
2 #define _IPTABLES_USER_H
4 #include "iptables_common.h"
8 #define IPT_LIB_DIR "/usr/local/lib/iptables"
12 #define IPPROTO_SCTP 132
15 #ifndef IPT_SO_GET_REVISION_MATCH
16 #define IPT_SO_GET_REVISION_MATCH (IPT_BASE_CTL + 2)
17 #define IPT_SO_GET_REVISION_TARGET (IPT_BASE_CTL + 3)
21 char name[IPT_FUNCTION_MAXNAMELEN-1];
56 void (*
init)(
struct ipt_entry_match *
m,
unsigned int *nfcache);
60 int (*
parse)(
int c,
char **argv,
int invert,
unsigned int *
flags,
61 const struct ipt_entry *entry,
62 unsigned int *nfcache,
63 struct ipt_entry_match **match);
69 void (*
print)(
const struct ipt_ip *ip,
70 const struct ipt_entry_match *match,
int numeric);
73 void (*
save)(
const struct ipt_ip *ip,
74 const struct ipt_entry_match *match);
81 struct ipt_entry_match *
m;
109 void (*
init)(
struct ipt_entry_target *
t,
unsigned int *nfcache);
113 int (*
parse)(
int c,
char **argv,
int invert,
unsigned int *
flags,
114 const struct ipt_entry *entry,
115 struct ipt_entry_target **target);
121 void (*
print)(
const struct ipt_ip *ip,
122 const struct ipt_entry_target *target,
int numeric);
125 void (*
save)(
const struct ipt_ip *ip,
126 const struct ipt_entry_target *target);
133 struct ipt_entry_target *
t;
136 #ifdef NO_SHARED_LIBS
153 struct in_addr *maskp,
unsigned int *naddrs);
155 extern void parse_interface(
const char *arg,
char *vianame,
unsigned char *mask);
157 extern int do_command(
int argc,
char *argv[],
char **table,
182 #define LINUX_VERSION(x,y,z) (0x10000*(x) + 0x100*(y) + z)
183 #define LINUX_VERSION_MAJOR(x) (((x)>>16) & 0xFF)
184 #define LINUX_VERSION_MINOR(x) (((x)>> 8) & 0xFF)
185 #define LINUX_VERSION_PATCH(x) ( (x) & 0xFF)
int delete_chain(const ipt_chainlabel chain, int verbose, iptc_handle_t *handle)
size_t userspacesize
Definition: iptables.h:103
unsigned int option_offset
Definition: iptables.h:132
struct iptables_match * find_match(const char *name, enum ipt_tryload, struct iptables_rule_match **match)
Definition: iptables.h:35
Definition: iptables.h:165
unsigned int option_offset
Definition: iptables.h:80
struct iptables_rule_match * next
Definition: iptables.h:29
void(* init)(struct ipt_entry_target *t, unsigned int *nfcache)
Definition: iptables.h:109
const struct option * extra_opts
Definition: iptables.h:77
unsigned int used
Definition: iptables.h:135
struct iptables_target * next
Definition: iptables.h:90
char * addr_to_dotted(const struct in_addr *addrp)
unsigned int mflags
Definition: iptables.h:82
ipt_chainlabel name
Definition: iptables.h:39
char * addr_to_anyname(const struct in_addr *addr)
struct iptables_match * next
Definition: iptables.h:37
int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
void(* print)(const struct ipt_ip *ip, const struct ipt_entry_target *target, int numeric)
Definition: iptables.h:121
Definition: iptables.h:19
void(* save)(const struct ipt_ip *ip, const struct ipt_entry_target *target)
Definition: iptables.h:125
struct current_globals me
void parse_hostnetworkmask(const char *name, struct in_addr **addrpp, struct in_addr *maskp, unsigned int *naddrs)
struct iptc_handle * iptc_handle_t
Definition: libiptc.h:51
u_int16_t parse_protocol(const char *s)
const char * version
Definition: iptables.h:44
void(* save)(const struct ipt_ip *ip, const struct ipt_entry_match *match)
Definition: iptables.h:73
int for_each_chain(int(*fn)(const ipt_chainlabel, int, iptc_handle_t *), int verbose, int builtinstoo, iptc_handle_t *handle)
struct iptables_match * iptables_matches
char name[IPT_FUNCTION_MAXNAMELEN-1]
Definition: iptables.h:21
void(* final_check)(unsigned int flags)
Definition: iptables.h:66
const char * version
Definition: iptables.h:97
void parse_interface(const char *arg, char *vianame, unsigned char *mask)
void(* help)(void)
Definition: iptables.h:106
struct iptables_match * match
Definition: iptables.h:31
Definition: iptables.h:88
Definition: iptables.h:27
void(* init)(struct ipt_entry_match *m, unsigned int *nfcache)
Definition: iptables.h:56
struct iptables_target * iptables_targets
struct option * extra_opts
Definition: iptables.h:129
Definition: iptables.h:164
u_int8_t revision
Definition: iptables.h:95
int flush_entries(const ipt_chainlabel chain, int verbose, iptc_handle_t *handle)
u_int8_t revision
Definition: iptables.h:23
struct ipt_entry_target * t
Definition: iptables.h:133
size_t size
Definition: iptables.h:100
void(* help)(void)
Definition: iptables.h:53
ipt_chainlabel name
Definition: iptables.h:92
char * mask_to_dotted(const struct in_addr *mask)
void(* final_check)(unsigned int flags)
Definition: iptables.h:118
int(* parse)(int c, char **argv, int invert, unsigned int *flags, const struct ipt_entry *entry, unsigned int *nfcache, struct ipt_entry_match **match)
Definition: iptables.h:60
int(* parse)(int c, char **argv, int invert, unsigned int *flags, const struct ipt_entry *entry, struct ipt_entry_target **target)
Definition: iptables.h:113
ipt_tryload
Definition: iptables.h:163
unsigned int tflags
Definition: iptables.h:134
void register_match(struct iptables_match *me)
size_t userspacesize
Definition: iptables.h:50
int flags
Definition: if.c:39
struct iptables_target * find_target(const char *name, enum ipt_tryload)
void(* print)(const struct ipt_ip *ip, const struct ipt_entry_match *match, int numeric)
Definition: iptables.h:69
void register_target(struct iptables_target *me)
u_int8_t revision
Definition: iptables.h:42
void get_kernel_version(void)
Definition: iptables.h:166
struct ipt_entry_match * m
Definition: iptables.h:81
struct in_addr * dotted_to_addr(const char *dotted)
size_t size
Definition: iptables.h:47
char ipt_chainlabel[32]
Definition: libiptc.h:43