From 0d32c5c070f817229110f92d7b31df9a3e4eeec5 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Sun, 24 Oct 2010 21:42:48 +0200 Subject: Fixes, cleanups, comments - More comments added to the code - ICMP and ICMPv6 support added to the hash:ip,port, hash:ip,port,ip and hash:ip,port,net types - hash:net and hash:ip,port,net types are reworked - hash:net,port type added - Wrong direction parameters fixed in hash:ip,port - Helps and manpage are updated - More tests added - Ugly macros are rewritten to functions in parse.c (Holger Eitzenberger) - resize related bug in hash types fixed (Holger Eitzenberger) - autoreconf patches by Jan Engelhardt applied - netlink patch minimalized: dumping can be initialized by a second parsing of the message (thanks to David and Patrick for the suggestion) - IPv4/IPv6 address attributes are introduced in order to fix the context (suggested by David) --- include/libipset/types.h | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'include/libipset/types.h') diff --git a/include/libipset/types.h b/include/libipset/types.h index 6a17750..f1847aa 100644 --- a/include/libipset/types.h +++ b/include/libipset/types.h @@ -77,22 +77,23 @@ struct ipset_elem { * but for the readability the full list is supported. */ struct ipset_type { - char name[IPSET_MAXNAMELEN]; /* type name */ - uint8_t revision; /* revision number */ - uint8_t family; /* supported family */ - uint8_t dimension; /* elem dimension */ - int8_t kernel_check; /* kernel check */ - bool last_elem_optional; /* last element optional */ - struct ipset_elem elem[IPSET_DIM_MAX]; /* parse elem */ - ipset_parsefn compat_parse_elem; /* compatibility parser */ - const struct ipset_arg *args[IPSET_CADT_MAX]; /* create/ADT args except elem */ - uint64_t mandatory[IPSET_CADT_MAX]; /* create/ADT mandatory flags */ - uint64_t full[IPSET_CADT_MAX]; /* full args flags */ - size_t maxsize[IPSET_MAXSIZE_MAX]; /* max sizes */ - const char *usage; /* terse usage */ + char name[IPSET_MAXNAMELEN]; /* type name */ + uint8_t revision; /* revision number */ + uint8_t family; /* supported family */ + uint8_t dimension; /* elem dimension */ + int8_t kernel_check; /* kernel check */ + bool last_elem_optional; /* last element optional */ + struct ipset_elem elem[IPSET_DIM_MAX]; /* parse elem */ + ipset_parsefn compat_parse_elem; /* compatibility parser */ + const struct ipset_arg *args[IPSET_CADT_MAX]; /* create/ADT args besides elem */ + uint64_t mandatory[IPSET_CADT_MAX]; /* create/ADT mandatory flags */ + uint64_t full[IPSET_CADT_MAX]; /* full args flags */ + size_t maxsize[IPSET_MAXSIZE_MAX]; /* max sizes */ + const char *usage; /* terse usage */ + void (*usagefn)(void); /* additional usage */ struct ipset_type *next; - const char *alias[]; /* name alias(es) */ + const char *alias[]; /* name alias(es) */ }; extern int ipset_cache_add(const char *name, const struct ipset_type *type, -- cgit v1.2.3