From 5208806f2708f761e97e62550561e3164b541770 Mon Sep 17 00:00:00 2001 From: Yasuyuki KOZAKAI Date: Tue, 24 Jul 2007 05:44:11 +0000 Subject: Adds xtables.[ch] and change Makefile to compile it --- Makefile | 14 +++++++------- include/xtables.h | 4 ++++ xtables.c | 19 +++++++++++++++++++ 3 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 include/xtables.h create mode 100644 xtables.c diff --git a/Makefile b/Makefile index a090a019..0a0e4ef6 100644 --- a/Makefile +++ b/Makefile @@ -102,10 +102,10 @@ iptables.o: iptables.c $(CC) $(CFLAGS) -DIPT_LIB_DIR=\"$(IPT_LIBDIR)\" -c -o $@ $< ifeq ($(DO_MULTI), 1) -iptables: iptables-multi.c iptables-save.c iptables-restore.c iptables-xml.c iptables-standalone.c iptables.o $(STATIC_LIBS) libiptc/libiptc.a +iptables: iptables-multi.c iptables-save.c iptables-restore.c iptables-xml.c iptables-standalone.c iptables.o xtables.o $(STATIC_LIBS) libiptc/libiptc.a $(CC) $(CFLAGS) -DIPTABLES_MULTI -DIPT_LIB_DIR=\"$(IPT_LIBDIR)\" $(LDFLAGS) -o $@ $^ $(LDLIBS) else -iptables: iptables-standalone.c iptables.o $(STATIC_LIBS) libiptc/libiptc.a +iptables: iptables-standalone.c iptables.o xtables.o $(STATIC_LIBS) libiptc/libiptc.a $(CC) $(CFLAGS) -DIPT_LIB_DIR=\"$(IPT_LIBDIR)\" $(LDFLAGS) -o $@ $^ $(LDLIBS) endif @@ -113,7 +113,7 @@ $(DESTDIR)$(BINDIR)/iptables: iptables @[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) cp $< $@ -iptables-save: iptables-save.c iptables.o $(STATIC_LIBS) libiptc/libiptc.a +iptables-save: iptables-save.c iptables.o xtables.o $(STATIC_LIBS) libiptc/libiptc.a $(CC) $(CFLAGS) -DIPT_LIB_DIR=\"$(IPT_LIBDIR)\" $(LDFLAGS) -o $@ $^ $(LDLIBS) ifeq ($(DO_MULTI), 1) @@ -126,7 +126,7 @@ $(DESTDIR)$(BINDIR)/iptables-save: iptables-save cp $< $@ endif -iptables-restore: iptables-restore.c iptables.o $(STATIC_LIBS) libiptc/libiptc.a +iptables-restore: iptables-restore.c iptables.o xtables.o $(STATIC_LIBS) libiptc/libiptc.a $(CC) $(CFLAGS) -DIPT_LIB_DIR=\"$(IPT_LIBDIR)\" $(LDFLAGS) -o $@ $^ $(LDLIBS) ifeq ($(DO_MULTI), 1) @@ -155,21 +155,21 @@ endif ip6tables.o: ip6tables.c $(CC) $(CFLAGS) -DIP6T_LIB_DIR=\"$(IPT_LIBDIR)\" -c -o $@ $< -ip6tables: ip6tables-standalone.c ip6tables.o $(STATIC6_LIBS) libiptc/libiptc.a +ip6tables: ip6tables-standalone.c ip6tables.o xtables.o $(STATIC6_LIBS) libiptc/libiptc.a $(CC) $(CFLAGS) -DIP6T_LIB_DIR=\"$(IPT_LIBDIR)\" $(LDFLAGS) -o $@ $^ $(LDLIBS) $(DESTDIR)$(BINDIR)/ip6tables: ip6tables @[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) cp $< $@ -ip6tables-save: ip6tables-save.c ip6tables.o $(STATIC6_LIBS) libiptc/libiptc.a +ip6tables-save: ip6tables-save.c ip6tables.o xtables.o $(STATIC6_LIBS) libiptc/libiptc.a $(CC) $(CFLAGS) -DIP6T_LIB_DIR=\"$(IPT_LIBDIR)\" $(LDFLAGS) -o $@ $^ $(LDLIBS) $(DESTDIR)$(BINDIR)/ip6tables-save: ip6tables-save @[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) cp $< $@ -ip6tables-restore: ip6tables-restore.c ip6tables.o $(STATIC6_LIBS) libiptc/libiptc.a +ip6tables-restore: ip6tables-restore.c ip6tables.o xtables.o $(STATIC6_LIBS) libiptc/libiptc.a $(CC) $(CFLAGS) -DIP6T_LIB_DIR=\"$(IPT_LIBDIR)\" $(LDFLAGS) -o $@ $^ $(LDLIBS) $(DESTDIR)$(BINDIR)/ip6tables-restore: ip6tables-restore diff --git a/include/xtables.h b/include/xtables.h new file mode 100644 index 00000000..eed1dffc --- /dev/null +++ b/include/xtables.h @@ -0,0 +1,4 @@ +#ifndef _XTABLES_H +#define _XTABLES_H + +#endif /* _XTABLES_H */ diff --git a/xtables.c b/xtables.c new file mode 100644 index 00000000..cc4d2184 --- /dev/null +++ b/xtables.c @@ -0,0 +1,19 @@ +/* + * (C) 2000-2006 by the netfilter coreteam : + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include -- cgit v1.2.3