/* Define to 1 if you have the <nettle/eddsa.h> header file. */
#undef HAVE_NETTLE_EDDSA_H
+/* Define to 1 if you have the <net/pfvar.h> header file. */
+#undef HAVE_NET_PFVAR_H
+
+ /* Define to 1 if you have the <net/if.h> header file. */
+ #undef HAVE_NET_IF_H
+
+ /* Define this to use nghttp2 client. */
+ #undef HAVE_NGHTTP2
+
+ /* Define to 1 if you have the <nghttp2/nghttp2.h> header file. */
+ #undef HAVE_NGHTTP2_NGHTTP2_H
+
/* Use libnss for crypto */
#undef HAVE_NSS
IPSET_OBJ="ipset.lo"
AC_SUBST(IPSET_OBJ)
- # mnl
- AC_ARG_WITH(libmnl, AS_HELP_STRING([--with-libmnl=path],[specify explicit path for libmnl.]),
- [ ],[ withval="yes" ])
- found_libmnl="no"
- AC_MSG_CHECKING(for libmnl)
- if test x_$withval = x_ -o x_$withval = x_yes; then
- withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
- fi
- for dir in $withval ; do
- if test -f "$dir/include/libmnl/libmnl.h"; then
- found_libmnl="yes"
- dnl assume /usr is in default path.
- if test "$dir" != "/usr"; then
- CPPFLAGS="$CPPFLAGS -I$dir/include"
- LDFLAGS="$LDFLAGS -L$dir/lib"
- fi
- AC_MSG_RESULT(found in $dir)
- LIBS="$LIBS -lmnl"
- break;
- fi
- done
- if test x_$found_libmnl != x_yes; then
- AC_MSG_ERROR([Could not find libmnl, libmnl.h])
- fi
+ # BSD's pf
+ AC_CHECK_HEADERS([net/pfvar.h], [], [
+ # mnl
- AC_ARG_WITH(libmnl, AC_HELP_STRING([--with-libmnl=path],
- [specify explicit path for libmnl.]),
++ AC_ARG_WITH(libmnl, AS_HELP_STRING([--with-libmnl=path],[specify explicit path for libmnl.]),
+ [ ],[ withval="yes" ])
+ found_libmnl="no"
+ AC_MSG_CHECKING(for libmnl)
+ if test x_$withval = x_ -o x_$withval = x_yes; then
+ withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
+ fi
+ for dir in $withval ; do
+ if test -f "$dir/include/libmnl/libmnl.h"; then
+ found_libmnl="yes"
+ dnl assume /usr is in default path.
+ if test "$dir" != "/usr"; then
+ CPPFLAGS="$CPPFLAGS -I$dir/include"
+ LDFLAGS="$LDFLAGS -L$dir/lib"
+ fi
+ AC_MSG_RESULT(found in $dir)
+ LIBS="$LIBS -lmnl"
+ break;
+ fi
+ done
- if test x_$found_libmnl != x_yes
- then
- AC_ERROR([Could not find libmnl, libmnl.h])
++ if test x_$found_libmnl != x_yes; then
++ AC_MSG_ERROR([Could not find libmnl, libmnl.h])
+ fi
+ ], [
+ #include <netinet/in.h>
+ #include <net/if.h>
+ ])
;;
no|*)
# nothing
/* in msec */
int UNKNOWN_SERVER_NICENESS = 376;
+ static void target_count_increase_nx(struct iter_qstate* iq, int num);
+
int
-iter_init(struct module_env* env, int id)
+iter_setup(struct module_env* env, int id)
{
struct iter_env* iter_env = (struct iter_env*)calloc(1,
sizeof(struct iter_env));
ub_randfree(ctx->seed_rnd);
config_delete(ctx->env->cfg);
modstack_desetup(&ctx->mods, ctx->env);
+ modstack_deinit(&ctx->mods, ctx->env);
edns_known_options_delete(ctx->env);
+ edns_strings_delete(ctx->env->edns_strings);
free(ctx->env);
free(ctx);
errno = e;
ub_randfree(ctx->seed_rnd);
config_delete(ctx->env->cfg);
modstack_desetup(&ctx->mods, ctx->env);
+ modstack_deinit(&ctx->mods, ctx->env);
edns_known_options_delete(ctx->env);
+ edns_strings_delete(ctx->env->edns_strings);
free(ctx->env);
free(ctx);
errno = e;
return 0;
}
-int
+int
fptr_whitelist_mod_init(int (*fptr)(struct module_env* env, int id))
{
- if(fptr == &iter_init) return 1;
- else if(fptr == &val_init) return 1;
- else if(fptr == &dns64_init) return 1;
- else if(fptr == &respip_init) return 1;
+ if(fptr == &module_dummy_init) return 1;
+#ifdef USE_IPSET
+ else if(fptr == &ipset_init) return 1;
+#endif
+ return 0;
+}
+
+int
+fptr_whitelist_mod_deinit(int (*fptr)(struct module_env* env, int id))
+{
+ if(fptr == &module_dummy_init) return 1;
+#ifdef USE_IPSET
+ else if(fptr == &ipset_deinit) return 1;
+#endif
+ return 0;
+}
+
+int
+fptr_whitelist_mod_setup(int (*fptr)(struct module_env* env, int id))
+{
+ if(fptr == &iter_setup) return 1;
+ else if(fptr == &val_setup) return 1;
+ else if(fptr == &dns64_setup) return 1;
+ else if(fptr == &respip_setup) return 1;
#ifdef WITH_PYTHONMODULE
- else if(fptr == &pythonmod_init) return 1;
+ else if(fptr == &pythonmod_setup) return 1;
#endif
+ #ifdef WITH_DYNLIBMODULE
+ else if(fptr == &dynlibmod_init) return 1;
+ #endif
#ifdef USE_CACHEDB
- else if(fptr == &cachedb_init) return 1;
+ else if(fptr == &cachedb_setup) return 1;
#endif
#ifdef USE_IPSECMOD
- else if(fptr == &ipsecmod_init) return 1;
+ else if(fptr == &ipsecmod_setup) return 1;
#endif
#ifdef CLIENT_SUBNET
- else if(fptr == &subnetmod_init) return 1;
+ else if(fptr == &subnetmod_setup) return 1;
#endif
#ifdef USE_IPSET
- else if(fptr == &ipset_init) return 1;
+ else if(fptr == &ipset_setup) return 1;
#endif
return 0;
}
int
-fptr_whitelist_mod_deinit(void (*fptr)(struct module_env* env, int id))
+fptr_whitelist_mod_desetup(void (*fptr)(struct module_env* env, int id))
{
- if(fptr == &iter_deinit) return 1;
- else if(fptr == &val_deinit) return 1;
- else if(fptr == &dns64_deinit) return 1;
- else if(fptr == &respip_deinit) return 1;
+ if(fptr == &iter_desetup) return 1;
+ else if(fptr == &val_desetup) return 1;
+ else if(fptr == &dns64_desetup) return 1;
+ else if(fptr == &respip_desetup) return 1;
#ifdef WITH_PYTHONMODULE
- else if(fptr == &pythonmod_deinit) return 1;
+ else if(fptr == &pythonmod_desetup) return 1;
#endif
+ #ifdef WITH_DYNLIBMODULE
+ else if(fptr == &dynlibmod_deinit) return 1;
+ #endif
#ifdef USE_CACHEDB
- else if(fptr == &cachedb_deinit) return 1;
+ else if(fptr == &cachedb_desetup) return 1;
#endif
#ifdef USE_IPSECMOD
- else if(fptr == &ipsecmod_deinit) return 1;
+ else if(fptr == &ipsecmod_desetup) return 1;
#endif
#ifdef CLIENT_SUBNET
- else if(fptr == &subnetmod_deinit) return 1;
+ else if(fptr == &subnetmod_desetup) return 1;
#endif
#ifdef USE_IPSET
- else if(fptr == &ipset_deinit) return 1;
+ else if(fptr == &ipset_desetup) return 1;
#endif
return 0;
}