return (void *)entry - (void *)table->blob_entries->entrytable;
}
-static int target_to_verdict(char *target_name)
+static int target_to_verdict(const char *target_name)
{
if (!strcmp(target_name, LABEL_ACCEPT))
return -NF_ACCEPT - 1;
return 0;
}
-static gboolean is_builtin_target(char *target_name)
+static gboolean is_builtin_target(const char *target_name)
{
if (!strcmp(target_name, LABEL_ACCEPT) ||
!strcmp(target_name, LABEL_DROP) ||
}
static GList *find_chain_head(struct connman_iptables *table,
- char *chain_name)
+ const char *chain_name)
{
GList *list;
struct connman_iptables_entry *head;
}
static GList *find_chain_tail(struct connman_iptables *table,
- char *chain_name)
+ const char *chain_name)
{
struct connman_iptables_entry *tail;
GList *chain_head, *list;
}
static int iptables_flush_chain(struct connman_iptables *table,
- char *name)
+ const char *name)
{
GList *chain_head, *chain_tail, *list, *next;
struct connman_iptables_entry *entry;
}
static int iptables_add_chain(struct connman_iptables *table,
- char *name)
+ const char *name)
{
GList *last;
struct ipt_entry *entry_head;
return -ENOMEM;
}
-static int iptables_delete_chain(struct connman_iptables *table, char *name)
+static int iptables_delete_chain(struct connman_iptables *table,
+ const char *name)
{
struct connman_iptables_entry *entry;
GList *chain_head, *chain_tail;
}
static struct ipt_entry *new_rule(struct ipt_ip *ip,
- char *target_name, struct xtables_target *xt_t,
+ const char *target_name, struct xtables_target *xt_t,
struct xtables_rule_match *xt_rm)
{
struct xtables_rule_match *tmp_xt_rm;
}
static struct ipt_entry *prepare_rule_inclusion(struct connman_iptables *table,
- struct ipt_ip *ip, char *chain_name,
- char *target_name, struct xtables_target *xt_t,
+ struct ipt_ip *ip, const char *chain_name,
+ const char *target_name,
+ struct xtables_target *xt_t,
int *builtin, struct xtables_rule_match *xt_rm)
{
GList *chain_tail, *chain_head;
}
static int iptables_insert_rule(struct connman_iptables *table,
- struct ipt_ip *ip, char *chain_name,
- char *target_name, struct xtables_target *xt_t,
+ struct ipt_ip *ip, const char *chain_name,
+ const char *target_name,
+ struct xtables_target *xt_t,
struct xtables_rule_match *xt_rm)
{
struct ipt_entry *new_entry;
}
static GList *find_existing_rule(struct connman_iptables *table,
- struct ipt_ip *ip, char *chain_name,
- char *target_name, struct xtables_target *xt_t,
+ struct ipt_ip *ip, const char *chain_name,
+ const char *target_name,
+ struct xtables_target *xt_t,
struct xtables_match *xt_m,
struct xtables_rule_match *xt_rm)
{
}
static int iptables_delete_rule(struct connman_iptables *table,
- struct ipt_ip *ip, char *chain_name,
- char *target_name, struct xtables_target *xt_t,
+ struct ipt_ip *ip, const char *chain_name,
+ const char *target_name,
+ struct xtables_target *xt_t,
struct xtables_match *xt_m,
struct xtables_rule_match *xt_rm)
{
}
static int iptables_compare_rule(struct connman_iptables *table,
- struct ipt_ip *ip, char *chain_name,
- char *target_name, struct xtables_target *xt_t,
+ struct ipt_ip *ip, const char *chain_name,
+ const char *target_name,
+ struct xtables_target *xt_t,
struct xtables_match *xt_m,
struct xtables_rule_match *xt_rm)
{
static int iptables_change_policy(struct connman_iptables *table,
- char *chain_name, char *policy)
+ const char *chain_name, const char *policy)
{
GList *chain_head;
struct connman_iptables_entry *entry;
g_free(table);
}
-static struct connman_iptables *iptables_init(char *table_name)
+static struct connman_iptables *iptables_init(const char *table_name)
{
struct connman_iptables *table = NULL;
char *module = NULL;
};
static struct xtables_target *prepare_target(struct connman_iptables *table,
- char *target_name)
+ const char *target_name)
{
struct xtables_target *xt_t = NULL;
gboolean is_builtin, is_user_defined;
}
static struct xtables_match *prepare_matches(struct connman_iptables *table,
- struct xtables_rule_match **xt_rm, char *match_name)
+ struct xtables_rule_match **xt_rm,
+ const char *match_name)
{
struct xtables_match *xt_m;
size_t match_size;
return err;
}
-static struct connman_iptables *pre_load_table(char *table_name,
+static struct connman_iptables *pre_load_table(const char *table_name,
struct connman_iptables *table)
{
if (table != NULL)