firewall: Add firewall API
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Tue, 19 Mar 2013 12:46:32 +0000 (13:46 +0100)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Mon, 25 Mar 2013 11:17:58 +0000 (13:17 +0200)
commit8d9d64c7f2deda60e668bd74c09dfd4b16cfa0d2
treeadab483ab7708ee9dbb9f243d6fe3242f8006dbc
parenta6b73c60cf555ea6e02daca913f08bfa0b48b723
firewall: Add firewall API

The main idea behind this API is to collect several iptables rules
together and enable or disable in one go.

For this a context is created via __connman_firewall_create() and
the rules added to this context via __connman_firewall_add_rule().

In order to append all rules __connman_firewall_enable() has
to be called. To remove all rules associated with one context
__connman_firewall_disable() has to be used.

If something goes awry the code tries to get back to the initial
state.
src/connman.h
src/firewall.c