From 9695eff6941c93668e680f92e52ed287d2dac64c Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Tue, 19 Mar 2013 13:46:30 +0100 Subject: [PATCH] firewall: Add firewall file --- Makefile.am | 2 +- src/connman.h | 4 ++++ src/firewall.c | 38 ++++++++++++++++++++++++++++++++++++++ src/main.c | 2 ++ 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 src/firewall.c diff --git a/Makefile.am b/Makefile.am index d54c693..4c99ff5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -97,7 +97,7 @@ src_connmand_SOURCES = $(gdbus_sources) $(gdhcp_sources) $(gweb_sources) \ src/session.c src/tethering.c src/wpad.c src/wispr.c \ src/stats.c src/iptables.c src/dnsproxy.c src/6to4.c \ src/ippool.c src/bridge.c src/nat.c src/ipaddress.c \ - src/inotify.c + src/inotify.c src/firewall.c src_connmand_LDADD = $(builtin_libadd) @GLIB_LIBS@ @DBUS_LIBS@ \ @XTABLES_LIBS@ @GNUTLS_LIBS@ -lresolv -ldl -lrt diff --git a/src/connman.h b/src/connman.h index 6b81477..e09c22e 100644 --- a/src/connman.h +++ b/src/connman.h @@ -879,3 +879,7 @@ void __connman_nat_cleanup(void); int __connman_nat_enable(const char *name, const char *address, unsigned char prefixlen); void __connman_nat_disable(const char *name); + + +int __connman_firewall_init(void); +void __connman_firewall_cleanup(void); diff --git a/src/firewall.c b/src/firewall.c new file mode 100644 index 0000000..e8b7e20 --- /dev/null +++ b/src/firewall.c @@ -0,0 +1,38 @@ +/* + * + * Connection Manager + * + * Copyright (C) 2013 BMW Car IT GmbH. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include "connman.h" + +int __connman_firewall_init(void) +{ + DBG(""); + + return 0; +} + +void __connman_firewall_cleanup(void) +{ + DBG(""); +} diff --git a/src/main.c b/src/main.c index e21d056..0f47943 100644 --- a/src/main.c +++ b/src/main.c @@ -633,6 +633,7 @@ int main(int argc, char *argv[]) __connman_ippool_init(); __connman_iptables_init(); + __connman_firewall_init(); __connman_nat_init(); __connman_tethering_init(); __connman_counter_init(); @@ -693,6 +694,7 @@ int main(int argc, char *argv[]) __connman_counter_cleanup(); __connman_tethering_cleanup(); __connman_nat_cleanup(); + __connman_firewall_cleanup(); __connman_iptables_cleanup(); __connman_ippool_cleanup(); __connman_device_cleanup(); -- 2.7.4