]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxtables: set names of programs
authorJamal Hadi Salim <hadi@cyberus.ca>
Wed, 11 Feb 2009 21:28:31 +0000 (16:28 -0500)
committerJan Engelhardt <jengelh@medozas.de>
Thu, 12 Feb 2009 17:54:37 +0000 (18:54 +0100)
Set proper name of application.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
include/ip6tables.h
include/iptables.h
ip6tables-restore.c
ip6tables-save.c
ip6tables-standalone.c
ip6tables.c
iptables-restore.c
iptables-save.c
iptables-standalone.c
iptables.c

index 86587e6f65d3e2006d4e80ffb153f2185a1279b8..ca0f9a0536c26c80621aae515b491d55c48a2840 100644 (file)
@@ -15,4 +15,6 @@ extern int flush_entries(const ip6t_chainlabel chain, int verbose, struct ip6tc_
 extern int delete_chain(const ip6t_chainlabel chain, int verbose, struct ip6tc_handle *handle);
 void print_rule(const struct ip6t_entry *e, struct ip6tc_handle *h, const char *chain, int counters);
 
+extern struct xtables_globals ip6tables_globals;
+
 #endif /*_IP6TABLES_USER_H*/
index f0aa345594b2e9ca8ee241b8d72dc902a383e826..84211c32f87be3c74727442757f7977e2da0498b 100644 (file)
@@ -26,4 +26,6 @@ extern void get_kernel_version(void);
 #define LINUX_VERSION_MINOR(x) (((x)>> 8) & 0xFF)
 #define LINUX_VERSION_PATCH(x) ( (x)      & 0xFF)
 
+extern struct xtables_globals iptables_globals;
+
 #endif /*_IPTABLES_USER_H*/
index acaf97b4c515bf78ca0c852f57957df19243e02e..3d535defc9819595ecb0b8fa1392b15273974662 100644 (file)
@@ -133,6 +133,7 @@ int main(int argc, char *argv[])
        xtables_program_name = program_name;
        xtables_init();
        xtables_set_nfproto(NFPROTO_IPV6);
+       ip6tables_globals.program_name = "ip6tables-restore";
 #ifdef NO_SHARED_LIBS
        init_extensions();
 #endif
index 32b5992615f3efd95143b15faf6d4bc3bf5d1c64..3af81abd78a1e0fced7fe800b1518f4ff5bcd737 100644 (file)
@@ -142,6 +142,7 @@ int main(int argc, char *argv[])
        xtables_program_name = program_name;
        xtables_init();
        xtables_set_nfproto(NFPROTO_IPV6);
+       ip6tables_globals.program_name = "ip6tables-save";
 #ifdef NO_SHARED_LIBS
        init_extensions();
 #endif
index cea481860a33ce713c194f906df8ba19a234ddcd..ab770655968ce86406a2798de0fc20109a842edc 100644 (file)
@@ -55,6 +55,7 @@ main(int argc, char *argv[])
        xtables_program_name = program_name;
        xtables_init();
        xtables_set_nfproto(NFPROTO_IPV6);
+       ip6tables_globals.program_name = "ip6tables";
 #ifdef NO_SHARED_LIBS
        init_extensions();
 #endif
index a73ea9ae6dd5130385326f2372b55609e151c3f8..fad7ef2d58c3b5a074555699553876d947a1c0c3 100644 (file)
@@ -149,7 +149,6 @@ void ip6tables_exit_error(enum xtables_exittype status, const char *msg, ...) __
 struct xtables_globals ip6tables_globals = {
        .option_offset = 0,
        .program_version = IPTABLES_VERSION,
-       .program_name = "ip6tables",
        .opts = original_opts,
        .exit_err = ip6tables_exit_error,
 };
index 810806f0440f53de3d37580ae2029f619c4dda2d..01030166008465e1eec4b676ef8e80b695184f25 100644 (file)
@@ -135,6 +135,7 @@ main(int argc, char *argv[])
        xtables_program_name = program_name;
        xtables_init();
        xtables_set_nfproto(NFPROTO_IPV4);
+       iptables_globals.program_name = "iptables-restore";
 #ifdef NO_SHARED_LIBS
        init_extensions();
 #endif
index c4306fd162b0a232c6c744b7eb8090259f6d7601..396406feed84523956677e04951c98aeb4230870 100644 (file)
@@ -142,6 +142,7 @@ main(int argc, char *argv[])
        xtables_program_name = program_name;
        xtables_init();
        xtables_set_nfproto(NFPROTO_IPV4);
+       iptables_globals.program_name = "iptables-save";
 #ifdef NO_SHARED_LIBS
        init_extensions();
 #endif
index ece7cf42bf8c6f7ec29a284139b274ddd9e74e99..007f2c2d79be818d2bc475fe525d7b3b467fcdf4 100644 (file)
@@ -56,6 +56,7 @@ main(int argc, char *argv[])
        xtables_program_name = program_name;
        xtables_init();
        xtables_set_nfproto(NFPROTO_IPV4);
+       iptables_globals.program_name = "iptables";
 #ifdef NO_SHARED_LIBS
        init_extensions();
 #endif
index b90952dcec16dcd5ed76abc76ca028b254196907..670d8aa717b1a439c3b191ab4bc9442c76ce5363 100644 (file)
@@ -150,7 +150,6 @@ void iptables_exit_error(enum xtables_exittype status, const char *msg, ...) __a
 struct xtables_globals iptables_globals = {
        .option_offset = 0,
        .program_version = IPTABLES_VERSION,
-       .program_name = "iptables",
        .opts = original_opts,
        .exit_err = iptables_exit_error,
 };