In order to allow our test tool iptables-tests to dump a table
we need an dump function. The only user will be this tool. That allows
the linker to remove this code, so no additional code size.
connman_bool_t roaming,
struct connman_stats_data *data);
+int __connman_iptables_dump(const char *table_name);
int __connman_iptables_new_chain(const char *table_name,
const char *chain);
int __connman_iptables_delete_chain(const char *table_name,
g_free(ctx);
}
+int __connman_iptables_dump(const char *table_name)
+{
+ struct connman_iptables *table;
+
+ DBG("-t %s -L", table_name);
+
+ table = pre_load_table(table_name, NULL);
+ if (table == NULL)
+ return -EINVAL;
+
+ dump_table(table);
+
+ return 0;
+}
+
int __connman_iptables_new_chain(const char *table_name,
const char *chain)
{