summaryrefslogtreecommitdiffstats
path: root/ipset.h
diff options
context:
space:
mode:
author/C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu </C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu>2008-11-13 09:36:37 +0000
committer/C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu </C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu>2008-11-13 09:36:37 +0000
commit4eec8b3824d49c1c0503ebbf7844a4e312bc29e1 (patch)
tree9b67c7a33f683e5a607517dc3ca5a0ddaefeb449 /ipset.h
parentb3259c8f91a689e01469b4eca8ada7924011be25 (diff)
2.4.4
- Premature checking prevents to add valid elements to hash types, fixed (bug reported by JC Janos). - Local variable shadows another variable, fixed (reported by Jan Engelhardt). - More compiler warning options added and warnings fixed.
Diffstat (limited to 'ipset.h')
-rw-r--r--ipset.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/ipset.h b/ipset.h
index 1c8b0c1..35a2055 100644
--- a/ipset.h
+++ b/ipset.h
@@ -68,11 +68,10 @@ enum set_commands {
CMD_ADT_GET,
};
-enum exittype {
- OTHER_PROBLEM = 1,
- PARAMETER_PROBLEM,
- VERSION_PROBLEM
-};
+/* Exit codes */
+#define OTHER_PROBLEM 1
+#define PARAMETER_PROBLEM 2
+#define VERSION_PROBLEM 3
/* The view of an ipset in userspace */
struct set {
@@ -118,7 +117,7 @@ struct settype {
size_t adt_size;
/* Function which parses command options */
- ip_set_ip_t (*adt_parser) (unsigned cmd, const char *optarg, void *data);
+ ip_set_ip_t (*adt_parser) (int cmd, const char *optarg, void *data);
/*
* Printing
@@ -157,7 +156,7 @@ struct settype {
/* Internal data */
void *header;
void *data;
- unsigned int option_offset;
+ int option_offset;
unsigned int flags;
};
@@ -165,7 +164,7 @@ extern void settype_register(struct settype *settype);
/* extern void unregister_settype(set_type_t *set_type); */
-extern void exit_error(enum exittype status, const char *msg, ...);
+extern void exit_error(int status, const char *msg, ...);
extern char *binding_ip_tostring(struct set *set,
ip_set_ip_t ip, unsigned options);
@@ -194,4 +193,9 @@ extern unsigned warn_once;
#define ID2MASK(id) (1 << ((id)%BITSPERBYTE))
#define test_bit(id, heap) ((((char *)(heap))[ID2BYTE(id)] & ID2MASK(id)) != 0)
+#define UNUSED __attribute__ ((unused))
+#define CONSTRUCTOR(module) \
+void __attribute__ ((constructor)) module##_init(void); \
+void module##_init(void)
+
#endif /* __IPSET_H */