#include "iptables_common.h"
#include "libiptc/libip6tc.h"
+#ifndef IP6T_LIB_DIR
+#define IP6T_LIB_DIR "/usr/local/lib/iptables"
+#endif
+
struct ip6tables_rule_match
{
struct ip6tables_rule_match *next;
#include "iptables_common.h"
#include "libiptc/libiptc.h"
+#ifndef IPT_LIB_DIR
+#define IPT_LIB_DIR "/usr/local/lib/iptables"
+#endif
+
#ifndef IPPROTO_SCTP
#define IPPROTO_SCTP 132
#endif
void exit_error(enum exittype, char *, ...)__attribute__((noreturn,
format(printf,2,3)));
extern const char *program_name, *program_version;
+extern char *lib_dir;
#ifdef NO_SHARED_LIBS
# ifdef _INIT
* Rusty Russell <rusty@linuxcare.com.au>
* This code is distributed under the terms of GNU GPL v2
*
- * $Id: ip6tables-restore.c,v 1.22 2004/05/26 16:04:48 gandalf Exp $
+ * $Id$
*/
#include <getopt.h>
program_version = IPTABLES_VERSION;
line = 0;
+ lib_dir = getenv("IP6TABLES_LIB_DIR");
+ if (!lib_dir)
+ lib_dir = IP6T_LIB_DIR;
+
#ifdef NO_SHARED_LIBS
init_extensions();
#endif
program_name = "ip6tables-save";
program_version = IPTABLES_VERSION;
+ lib_dir = getenv("IP6TABLES_LIB_DIR");
+ if (!lib_dir)
+ lib_dir = IP6T_LIB_DIR;
+
#ifdef NO_SHARED_LIBS
init_extensions();
#endif
program_name = "ip6tables";
program_version = IPTABLES_VERSION;
+ lib_dir = getenv("IP6TABLES_LIB_DIR");
+ if (!lib_dir)
+ lib_dir = IP6T_LIB_DIR;
+
#ifdef NO_SHARED_LIBS
init_extensions();
#endif
#define FALSE 0
#endif
-#ifndef IP6T_LIB_DIR
-#define IP6T_LIB_DIR "/usr/local/lib/iptables"
-#endif
-
#ifndef PROC_SYS_MODPROBE
#define PROC_SYS_MODPROBE "/proc/sys/kernel/modprobe"
#endif
const char *program_version;
const char *program_name;
-
-static char *lib_dir;
+char *lib_dir;
/* Keeping track of external matches and targets: linked lists. */
struct ip6tables_match *ip6tables_matches = NULL;
memset(&fw, 0, sizeof(fw));
- lib_dir = getenv("IP6TABLES_LIB_DIR");
- if (!lib_dir)
- lib_dir = IP6T_LIB_DIR;
-
/* re-set optind to 0 in case do_command gets called
* a second time */
optind = 0;
*
* This code is distributed under the terms of GNU GPL v2
*
- * $Id: iptables-restore.c,v 1.35 2004/06/25 11:18:57 kadlec Exp $
+ * $Id$
*/
#include <getopt.h>
program_version = IPTABLES_VERSION;
line = 0;
+ lib_dir = getenv("IPTABLES_LIB_DIR");
+ if (!lib_dir)
+ lib_dir = IPT_LIB_DIR;
+
#ifdef NO_SHARED_LIBS
init_extensions();
#endif
program_name = "iptables-save";
program_version = IPTABLES_VERSION;
+ lib_dir = getenv("IPTABLES_LIB_DIR");
+ if (!lib_dir)
+ lib_dir = IPT_LIB_DIR;
+
#ifdef NO_SHARED_LIBS
init_extensions();
#endif
program_name = "iptables";
program_version = IPTABLES_VERSION;
+ lib_dir = getenv("IPTABLES_LIB_DIR");
+ if (!lib_dir)
+ lib_dir = IPT_LIB_DIR;
+
#ifdef NO_SHARED_LIBS
init_extensions();
#endif
#define FALSE 0
#endif
-#ifndef IPT_LIB_DIR
-#define IPT_LIB_DIR "/usr/local/lib/iptables"
-#endif
-
#ifndef PROC_SYS_MODPROBE
#define PROC_SYS_MODPROBE "/proc/sys/kernel/modprobe"
#endif
const char *program_version;
const char *program_name;
+char *lib_dir;
/* Keeping track of external matches and targets: linked lists. */
struct iptables_match *iptables_matches = NULL;
u_int8_t num;
};
-static char *lib_dir;
-
/* Primitive headers... */
/* defined in netinet/in.h */
#if 0
memset(&fw, 0, sizeof(fw));
- lib_dir = getenv("IPTABLES_LIB_DIR");
- if (!lib_dir)
- lib_dir = IPT_LIB_DIR;
-
/* re-set optind to 0 in case do_command gets called
* a second time */
optind = 0;