various: split functions to IPv4 and IPv6 versions

The code selection will be set with function pointer, which avoids
numerous IP version checks.  As a result with some inputs the analysis
runs quicker.  Most users will not notice much of difference.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2013-09-21 11:38:24 +01:00
parent 97c6f0292f
commit 8da98bbc89
5 changed files with 215 additions and 89 deletions

View file

@ -248,7 +248,7 @@ int main(int argc, char **argv)
/* Do the job */
prepare_memory();
xstrstr = xstrstr_init;
set_ipv_functions(VERSION_UNKNOWN);
parse_config(true, config.dhcpdconf_file, shared_networks);
parse_leases();