diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2012-01-05 21:30:20 +0100 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2012-01-05 21:30:20 +0100 |
commit | e57d6caa8ddbe268adea991bcf6e58dc6ca43389 (patch) | |
tree | 187e09fd0bcb6d4e536a7aa27e4f4c6976c622be /src/ipset.c | |
parent | f4b2c3b617333b5a0f359edccc9a9be34d9f36bd (diff) |
Set types moved into libipset library
The libipset library is complete by this step, and "ipset" just
a CLI interface based on the lib.
Diffstat (limited to 'src/ipset.c')
-rw-r--r-- | src/ipset.c | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/src/ipset.c b/src/ipset.c index e835f06..4a20ca1 100644 --- a/src/ipset.c +++ b/src/ipset.c @@ -33,22 +33,6 @@ static char cmdline[1024]; static char *newargv[255]; static int newargc; -/* The known set types: (typename, revision, family) is unique */ -extern struct ipset_type ipset_bitmap_ip0; -extern struct ipset_type ipset_bitmap_ipmac0; -extern struct ipset_type ipset_bitmap_port0; -extern struct ipset_type ipset_hash_ip0; -extern struct ipset_type ipset_hash_net0; -extern struct ipset_type ipset_hash_net1; -extern struct ipset_type ipset_hash_netport1; -extern struct ipset_type ipset_hash_netport2; -extern struct ipset_type ipset_hash_netiface0; -extern struct ipset_type ipset_hash_ipport1; -extern struct ipset_type ipset_hash_ipportip1; -extern struct ipset_type ipset_hash_ipportnet1; -extern struct ipset_type ipset_hash_ipportnet2; -extern struct ipset_type ipset_list_set0; - enum exittype { NO_PROBLEM = 0, OTHER_PROBLEM, @@ -725,21 +709,8 @@ main(int argc, char *argv[]) { int ret; - /* Register types */ - ipset_type_add(&ipset_bitmap_ip0); - ipset_type_add(&ipset_bitmap_ipmac0); - ipset_type_add(&ipset_bitmap_port0); - ipset_type_add(&ipset_hash_ip0); - ipset_type_add(&ipset_hash_net0); - ipset_type_add(&ipset_hash_net1); - ipset_type_add(&ipset_hash_netport1); - ipset_type_add(&ipset_hash_netport2); - ipset_type_add(&ipset_hash_netiface0); - ipset_type_add(&ipset_hash_ipport1); - ipset_type_add(&ipset_hash_ipportip1); - ipset_type_add(&ipset_hash_ipportnet1); - ipset_type_add(&ipset_hash_ipportnet2); - ipset_type_add(&ipset_list_set0); + /* Load set types */ + ipset_load_types(); /* Initialize session */ session = ipset_session_init(printf); |