summaryrefslogtreecommitdiffstats
path: root/ipset_iphash.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipset_iphash.c')
-rw-r--r--ipset_iphash.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/ipset_iphash.c b/ipset_iphash.c
index 8d6cda6..a17efac 100644
--- a/ipset_iphash.c
+++ b/ipset_iphash.c
@@ -127,11 +127,13 @@ int create_parse(int c, char *argv[], void *data, unsigned *flags)
/* Final check; exit if not ok. */
void create_final(void *data, unsigned int flags)
{
+#ifdef IPSET_DEBUG
struct ip_set_req_iphash_create *mydata =
(struct ip_set_req_iphash_create *) data;
DP("hashsize %u probes %u resize %u",
mydata->hashsize, mydata->probes, mydata->resize);
+#endif
}
/* Create commandline options */
@@ -238,7 +240,8 @@ void saveips(struct set *set, void *data, size_t len, unsigned options)
while (offset < len) {
ip = data + offset;
if (*ip)
- printf("-A %s %s\n", set->name, ip_tostring(*ip, options));
+ printf("-A %s %s\n", set->name,
+ ip_tostring(*ip, options));
offset += sizeof(ip_set_ip_t);
}
}
@@ -255,7 +258,6 @@ void usage(void)
static struct settype settype_iphash = {
.typename = SETTYPE_NAME,
- .typecode = IPSET_TYPE_IP,
.protocol_version = IP_SET_PROTOCOL_VERSION,
/* Create */
@@ -277,6 +279,11 @@ static struct settype settype_iphash = {
.printips_sorted = &printips,
.saveheader = &saveheader,
.saveips = &saveips,
+
+ /* Bindings */
+ .bindip_tostring = &ip_tostring,
+ .bindip_parse = &parse_ip,
+
.usage = &usage,
};