From d137c0bd736985444f5ed43860d47d626250b67a Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Mon, 13 Dec 2010 12:31:12 +0100 Subject: Buffered commands are just ... buffered. Calculate the free buffer size when adding the existing attributes at the buffered commands. If the buffer is full, cancel the unfinished nested attribute and commit the previously buffered commands. Then restart with the current buffered command. Thus we can get rid of the ugly maxsize parameter of the set types. --- include/libipset/types.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'include/libipset') diff --git a/include/libipset/types.h b/include/libipset/types.h index f1847aa..f9c8f2d 100644 --- a/include/libipset/types.h +++ b/include/libipset/types.h @@ -58,13 +58,6 @@ enum { IPSET_KERNEL_OK, }; -/* Max sizes for aggregated ADD (and DEL) commands */ -enum { - IPSET_MAXSIZE_INET, - IPSET_MAXSIZE_INET6, - IPSET_MAXSIZE_MAX, -}; - /* How element parts are parsed */ struct ipset_elem { ipset_parsefn parse; /* elem parser function */ @@ -88,7 +81,6 @@ struct ipset_type { 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 */ -- cgit v1.2.3