iptables: Add split out iptables commands
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Tue, 12 Feb 2013 09:19:46 +0000 (10:19 +0100)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Tue, 12 Feb 2013 10:34:30 +0000 (12:34 +0200)
commitba052f1fa25d330b188027f41b4c88a23cc02431
treead3e655f0d8721d7b2a22c2ece8d92991a3c0f49
parent4cf7b8f2c0f4202b9e76dcfd439cf857ff71de91
iptables: Add split out iptables commands

Instead of having a pure string based API, we add two new
main functions, __connman_iptables_append() and
__connman_iptables_remove(). The missing commands will be added later.

To simplify the whole code, the __connman_iptables_command() code
is refactored into smaller pieces: parse_rule_spec() calls a few
functions such as clear_tables_flags() and parse_xt_modules()
which should make the reading of the main parser loop simpler.

Also added a few comments on the parser which is really tricky.
src/connman.h
src/iptables.c