fix for f12, gcc4.4
[iptables.git] / include / iptables_common.h
1 #ifndef _IPTABLES_COMMON_H
2 #define _IPTABLES_COMMON_H
3 /* Shared definitions between ipv4 and ipv6. */
4
5 enum exittype {
6         OTHER_PROBLEM = 1,
7         PARAMETER_PROBLEM,
8         VERSION_PROBLEM,
9         RESOURCE_PROBLEM
10 };
11
12 /* this is a special 64bit data type that is 8-byte aligned */
13 #define aligned_u64 unsigned long long __attribute__((aligned(8)))
14
15 extern void exit_printhelp() __attribute__((noreturn));
16 extern void exit_tryhelp(int) __attribute__((noreturn));
17 int check_inverse(const char option[], int *invert, int *optind, int argc);
18 extern int string_to_number(const char *, 
19                             unsigned int, 
20                             unsigned int,
21                             unsigned int *);
22 extern int string_to_number_l(const char *, 
23                             unsigned long int, 
24                             unsigned long int,
25                             unsigned long *);
26 extern int string_to_number_ll(const char *, 
27                             unsigned long long int, 
28                             unsigned long long int,
29                             unsigned long long *);
30 extern int
31 iptables_insmod(const char *modname, const char *modprobe, int quiet);
32 extern int load_iptables_ko(const char *modprobe, int quiet);
33 void exit_error(enum exittype, char *, ...)__attribute__((noreturn,
34                                                           format(printf,2,3)));
35 extern const char *program_name, *program_version;
36 extern char *lib_dir;
37
38 #define _init __attribute__((constructor)) my_init
39 #ifdef NO_SHARED_LIBS
40 # ifdef _INIT
41 #  undef _init
42 #  define _init _INIT
43 # endif
44   extern void init_extensions(void);
45 #endif
46
47 #define __be32  u_int32_t
48 #define __le32  u_int32_t
49 #define __be16  u_int16_t
50 #define __le16  u_int16_t
51
52 #endif /*_IPTABLES_COMMON_H*/