#include <stdio.h>
#include <sys/socket.h>
#include <linux/netlink.h>
+#define DD(cmd) cmd
#define D(fmt, args...) \
fprintf(stderr, "%s: %s: " fmt "\n", __FILE__, __func__ , ## args)
#define IF_D(test, fmt, args...) \
D("nla[%u] does%s exist", i, nla[i] ? "" : " NOT");
}
#else
+#define DD(cmd)
#define D(fmt, args...)
#define IF_D(test, fmt, args...)
#define dump_nla(nla, maxlen)
break;
case IPSET_CMD_ADD:
case IPSET_CMD_DEL: {
- const struct ipset_type *type;
+ DD(const struct ipset_type *type);
if (!aggregate) {
/* Setname, type not checked/added yet */
open_nested(session, nlh, IPSET_ATTR_ADT);
}
}
- type = ipset_data_get(data, IPSET_OPT_TYPE);
+ DD(type = ipset_data_get(data, IPSET_OPT_TYPE));
D("family: %u, type family %u",
ipset_data_family(data), type->family);
if (open_nested(session, nlh, IPSET_ATTR_DATA)) {
break;
}
case IPSET_CMD_TEST: {
- const struct ipset_type *type;
+ DD(const struct ipset_type *type);
/* Return codes are not aggregated, so tests cannot be either */
/* Setname, type not checked/added yet */
return ipset_err(session,
"Invalid test command: missing settype");
- type = ipset_data_get(data, IPSET_OPT_TYPE);
+ DD(type = ipset_data_get(data, IPSET_OPT_TYPE));
D("family: %u, type family %u",
ipset_data_family(data), type->family);
ADDATTR_SETNAME(session, nlh, data);