--- /dev/null
+
+# GCC 4.x -fvisibility=hidden
+
+AC_DEFUN([CHECK_GCC_FVISIBILITY], [
+ AC_LANG_PUSH([C])
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$saved_CFLAGS -fvisibility=hidden"
+ AC_CACHE_CHECK([whether compiler accepts -fvisibility=hidden],
+ [ac_cv_fvisibility_hidden], AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE()],
+ [ac_cv_fvisibility_hidden=yes],
+ [ac_cv_fvisibility_hidden=no]
+ ))
+ if test "$ac_cv_fvisibility_hidden" = "yes"; then
+ AC_DEFINE([HAVE_VISIBILITY_HIDDEN], [1],
+ [True if compiler supports -fvisibility=hidden])
+ AC_SUBST([GCC_FVISIBILITY_HIDDEN], [-fvisibility=hidden])
+ fi
+ CFLAGS="$saved_CFLAGS"
+ AC_LANG_POP([C])
+])
-Wdeclaration-after-statement -Wsign-compare -Winit-self \
-Wformat-nonliteral -Wformat-security -Wmissing-format-attribute \
-Wcast-align -Wundef -Wbad-function-cast \
- -Waggregate-return -Wunused -Wwrite-strings
+ -Waggregate-return -Wunused -Wwrite-strings ${GCC_FVISIBILITY_HIDDEN}
AM_YFLAGS = -d
tcpopt.c \
socket.c \
print.c \
- libnftables.c
+ libnftables.c \
+ libnftables.map
# yacc and lex generate dirty code
noinst_LTLIBRARIES = libparser.la
-Wno-redundant-decls
libnftables_la_LIBADD = ${LIBMNL_LIBS} ${LIBNFTNL_LIBS} libparser.la
-libnftables_la_LDFLAGS = -version-info ${libnftables_LIBVERSION}
+libnftables_la_LDFLAGS = -version-info ${libnftables_LIBVERSION} \
+ --version-script=$(srcdir)/libnftables.map
if BUILD_MINIGMP
noinst_LTLIBRARIES += libminigmp.la
mark_table_exit();
}
+EXPORT_SYMBOL(nft_ctx_add_include_path);
int nft_ctx_add_include_path(struct nft_ctx *ctx, const char *path)
{
char **tmp;
return 0;
}
+EXPORT_SYMBOL(nft_ctx_clear_include_paths);
void nft_ctx_clear_include_paths(struct nft_ctx *ctx)
{
while (ctx->num_include_paths)
ctx->nf_sock = nft_mnl_socket_open();
}
+EXPORT_SYMBOL(nft_ctx_new);
struct nft_ctx *nft_ctx_new(uint32_t flags)
{
struct nft_ctx *ctx;
return 0;
}
+EXPORT_SYMBOL(nft_ctx_buffer_output);
int nft_ctx_buffer_output(struct nft_ctx *ctx)
{
return init_cookie(&ctx->output.output_cookie);
}
+EXPORT_SYMBOL(nft_ctx_unbuffer_output);
int nft_ctx_unbuffer_output(struct nft_ctx *ctx)
{
return exit_cookie(&ctx->output.output_cookie);
}
+EXPORT_SYMBOL(nft_ctx_buffer_error);
int nft_ctx_buffer_error(struct nft_ctx *ctx)
{
return init_cookie(&ctx->output.error_cookie);
}
+EXPORT_SYMBOL(nft_ctx_unbuffer_error);
int nft_ctx_unbuffer_error(struct nft_ctx *ctx)
{
return exit_cookie(&ctx->output.error_cookie);
return cookie->buf;
}
+EXPORT_SYMBOL(nft_ctx_get_output_buffer);
const char *nft_ctx_get_output_buffer(struct nft_ctx *ctx)
{
return get_cookie_buffer(&ctx->output.output_cookie);
}
+EXPORT_SYMBOL(nft_ctx_get_error_buffer);
const char *nft_ctx_get_error_buffer(struct nft_ctx *ctx)
{
return get_cookie_buffer(&ctx->output.error_cookie);
}
+EXPORT_SYMBOL(nft_ctx_free);
void nft_ctx_free(struct nft_ctx *ctx)
{
if (ctx->nf_sock)
nft_exit();
}
+EXPORT_SYMBOL(nft_ctx_set_output);
FILE *nft_ctx_set_output(struct nft_ctx *ctx, FILE *fp)
{
FILE *old = ctx->output.output_fp;
return old;
}
+EXPORT_SYMBOL(nft_ctx_set_error);
FILE *nft_ctx_set_error(struct nft_ctx *ctx, FILE *fp)
{
FILE *old = ctx->output.error_fp;
return old;
}
+EXPORT_SYMBOL(nft_ctx_get_dry_run);
bool nft_ctx_get_dry_run(struct nft_ctx *ctx)
{
return ctx->check;
}
+EXPORT_SYMBOL(nft_ctx_set_dry_run);
void nft_ctx_set_dry_run(struct nft_ctx *ctx, bool dry)
{
ctx->check = dry;
}
+EXPORT_SYMBOL(nft_ctx_output_get_flags);
unsigned int nft_ctx_output_get_flags(struct nft_ctx *ctx)
{
return ctx->output.flags;
}
+EXPORT_SYMBOL(nft_ctx_output_set_flags);
void nft_ctx_output_set_flags(struct nft_ctx *ctx, unsigned int flags)
{
ctx->output.flags = flags;
}
+EXPORT_SYMBOL(nft_ctx_output_get_debug);
unsigned int nft_ctx_output_get_debug(struct nft_ctx *ctx)
{
return ctx->debug_mask;
}
+EXPORT_SYMBOL(nft_ctx_output_set_debug);
void nft_ctx_output_set_debug(struct nft_ctx *ctx, unsigned int mask)
{
ctx->debug_mask = mask;
return 0;
}
+EXPORT_SYMBOL(nft_run_cmd_from_buffer);
int nft_run_cmd_from_buffer(struct nft_ctx *nft, const char *buf)
{
int rc = -EINVAL, parser_rc;
return rc;
}
+EXPORT_SYMBOL(nft_run_cmd_from_filename);
int nft_run_cmd_from_filename(struct nft_ctx *nft, const char *filename)
{
struct cmd *cmd, *next;
--- /dev/null
+LIBNFTABLES_1 {
+global:
+ nft_ctx_add_include_path;
+ nft_ctx_clear_include_pat;
+ nft_ctx_new;
+ nft_ctx_buffer_output;
+ nft_ctx_unbuffer_output;
+ nft_ctx_buffer_error;
+ nft_ctx_unbuffer_error;
+ nft_ctx_get_output_buffer;
+ nft_ctx_get_error_buffer;
+ nft_ctx_free;
+ nft_ctx_set_output;
+ nft_ctx_set_error;
+ nft_ctx_get_dry_run;
+ nft_ctx_set_dry_run;
+ nft_ctx_output_get_flags;
+ nft_ctx_output_set_flags;
+ nft_ctx_output_get_debug;
+ nft_ctx_output_set_debug;
+ nft_run_cmd_from_buffer;
+ nft_run_cmd_from_filename;
+
+local: *;
+};