From 3fd6b24ace319b139ec3c4e3031a5f05d21e304e Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Tue, 15 Jun 2010 13:30:55 +0200 Subject: ipset 5 in an almost ready state - milestone Reworked protocol and internal interfaces, missing set types added, backward compatibility verified, lots of tests added (and thanks to the tests, bugs fixed), even the manpage is rewritten ;-). Countless changes everywhere... The missing bits before announcing ipset 5: - net namespace support - new iptables/ip6tables extension library - iptables/ip6tables match and target tests (backward/forward compatibility) - tests on catching syntax errors --- src/ipset_tree_ip.c | 75 ----------------------------------------------------- 1 file changed, 75 deletions(-) delete mode 100644 src/ipset_tree_ip.c (limited to 'src/ipset_tree_ip.c') diff --git a/src/ipset_tree_ip.c b/src/ipset_tree_ip.c deleted file mode 100644 index 7f7d842..0000000 --- a/src/ipset_tree_ip.c +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright 2007-2010 Jozsef Kadlecsik (kadlec@blackhole.kfki.hu) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -#include /* IPSET_OPT_* */ -#include /* parser functions */ -#include /* printing functions */ -#include /* prototypes */ - -/* Parse commandline arguments */ -static const struct ipset_arg tree_ip_create_args[] = { - { .name = { "gc", "--gc", NULL }, - .has_arg = IPSET_MANDATORY_ARG, .opt = IPSET_OPT_GC, - .parse = ipset_parse_uint32, .print = ipset_print_number, - }, - { .name = { "timeout", "--timeout", NULL }, - .has_arg = IPSET_MANDATORY_ARG, .opt = IPSET_OPT_TIMEOUT, - .parse = ipset_parse_uint32, .print = ipset_print_number, - }, - { }, -}; - -static const struct ipset_arg tree_ip_add_args[] = { - { .name = { "timeout", "--timeout", NULL }, - .has_arg = IPSET_MANDATORY_ARG, .opt = IPSET_OPT_TIMEOUT, - .parse = ipset_parse_uint32, .print = ipset_print_number, - }, - { }, -}; - -static const char tree_ip_usage[] = -"create SETNAME tree:ip\n" -" [gc VALUE] [timeout VALUE]\n" -"add SETNAME IP|IP/CIDR|FROM-TO [timeout VALUE]\n" -"del SETNAME IP|IP/CIDR|FROM-TO\n" -"test SETNAME IP\n"; - -struct ipset_type ipset_tree_ip0 = { - .name = "tree:ip", - .alias = "iptree", - .revision = 0, - .family = AF_INET, - .dimension = IPSET_DIM_ONE, - .elem = { - [IPSET_DIM_ONE] = { - .parse = ipset_parse_ip, - .print = ipset_print_ip, - .opt = IPSET_OPT_IP - }, - }, - .args = { - [IPSET_CREATE] = tree_ip_create_args, - [IPSET_ADD] = tree_ip_add_args, - }, - .mandatory = { - [IPSET_CREATE] = 0, - [IPSET_ADD] = IPSET_FLAG(IPSET_OPT_IP), - [IPSET_DEL] = IPSET_FLAG(IPSET_OPT_IP), - [IPSET_TEST] = IPSET_FLAG(IPSET_OPT_IP), - }, - .full = { - [IPSET_CREATE] = IPSET_FLAG(IPSET_OPT_GC) - | IPSET_FLAG(IPSET_OPT_TIMEOUT), - [IPSET_ADD] = IPSET_FLAG(IPSET_OPT_IP) - | IPSET_FLAG(IPSET_OPT_IP_TO) - | IPSET_FLAG(IPSET_OPT_TIMEOUT), - [IPSET_DEL] = IPSET_FLAG(IPSET_OPT_IP) - | IPSET_FLAG(IPSET_OPT_IP_TO), - [IPSET_TEST] = IPSET_FLAG(IPSET_OPT_IP), - }, - - .usage = tree_ip_usage, -}; -- cgit v1.2.3