summaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_nat
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-04-04 22:40:12 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-05-03 21:42:28 +0200
commita1e6bd6768e61828823da3ba774e55b6f89559fc (patch)
tree87bd7eb5267144fd4030ebcfd7319f47bbc037a2 /openbsc/src/osmo-bsc_nat
parentd7e04b9956bb7d579697604fff6ba67fc6b9e52d (diff)
filter: Remove nat from bsc_nat_acc_lst and replace with msg
Diffstat (limited to 'openbsc/src/osmo-bsc_nat')
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c10
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat_utils.c4
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat_vty.c6
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_ussd.c6
4 files changed, 13 insertions, 13 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c
index 439bf3344..f3ca92400 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c
@@ -405,19 +405,19 @@ static int get_net_cfg_acc_cmd(struct ctrl_cmd *cmd, void *data)
static int set_net_cfg_acc_cmd(struct ctrl_cmd *cmd, void *data)
{
const char *access_name = extract_acc_name(cmd->variable);
- struct bsc_nat_acc_lst *acc;
- struct bsc_nat_acc_lst_entry *entry;
+ struct bsc_msg_acc_lst *acc;
+ struct bsc_msg_acc_lst_entry *entry;
const char *value = cmd->value;
int rc;
/* Should have been caught by verify_net_cfg_acc_cmd */
- acc = bsc_nat_acc_lst_find(g_nat, access_name);
+ acc = bsc_msg_acc_lst_find(&g_nat->access_lists, access_name);
if (!acc) {
cmd->reply = "Access list not found";
return CTRL_CMD_ERROR;
}
- entry = bsc_nat_acc_lst_entry_create(acc);
+ entry = bsc_msg_acc_lst_entry_create(acc);
if (!entry) {
cmd->reply = "OOM";
return CTRL_CMD_ERROR;
@@ -436,7 +436,7 @@ static int set_net_cfg_acc_cmd(struct ctrl_cmd *cmd, void *data)
static int verify_net_cfg_acc_cmd(struct ctrl_cmd *cmd, const char *value, void *data)
{
const char *access_name = extract_acc_name(cmd->variable);
- struct bsc_nat_acc_lst *acc = bsc_nat_acc_lst_find(g_nat, access_name);
+ struct bsc_msg_acc_lst *acc = bsc_msg_acc_lst_find(&g_nat->access_lists, access_name);
if (!acc) {
cmd->reply = "Access list not known";
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c b/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c
index 33582ffe1..89212087c 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c
@@ -112,12 +112,12 @@ struct bsc_nat *bsc_nat_alloc(void)
void bsc_nat_free(struct bsc_nat *nat)
{
struct bsc_config *cfg, *tmp;
- struct bsc_nat_acc_lst *lst, *tmp_lst;
+ struct bsc_msg_acc_lst *lst, *tmp_lst;
llist_for_each_entry_safe(cfg, tmp, &nat->bsc_configs, entry)
bsc_config_free(cfg);
llist_for_each_entry_safe(lst, tmp_lst, &nat->access_lists, list)
- bsc_nat_acc_lst_delete(lst);
+ bsc_msg_acc_lst_delete(lst);
bsc_nat_num_rewr_entry_adapt(nat, &nat->num_rewr, NULL);
bsc_nat_num_rewr_entry_adapt(nat, &nat->num_rewr_post, NULL);
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
index 3a53dd402..502bdddd4 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
@@ -87,7 +87,7 @@ static void write_pgroup_lst(struct vty *vty, struct bsc_nat_paging_group *pgrou
static int config_write_nat(struct vty *vty)
{
- struct bsc_nat_acc_lst *lst;
+ struct bsc_msg_acc_lst *lst;
struct bsc_nat_paging_group *pgroup;
vty_out(vty, "nat%s", VTY_NEWLINE);
@@ -136,7 +136,7 @@ static int config_write_nat(struct vty *vty)
_nat->num_rewr_trie_name, VTY_NEWLINE);
llist_for_each_entry(lst, &_nat->access_lists, list)
- bsc_nat_acc_lst_write(vty, lst);
+ bsc_msg_acc_lst_write(vty, lst);
llist_for_each_entry(pgroup, &_nat->paging_groups, entry)
write_pgroup_lst(vty, pgroup);
if (_nat->mgcp_ipa)
@@ -1171,7 +1171,7 @@ int bsc_nat_vty_init(struct bsc_nat *nat)
install_element(NAT_NODE, &cfg_nat_ussd_local_cmd);
install_element(NAT_NODE, &cfg_nat_use_ipa_for_mgcp_cmd);
- bsc_nat_lst_vty_init(nat, &nat->access_lists, NAT_NODE);
+ bsc_msg_lst_vty_init(nat, &nat->access_lists, NAT_NODE);
/* number rewriting */
install_element(NAT_NODE, &cfg_nat_number_rewrite_cmd);
diff --git a/openbsc/src/osmo-bsc_nat/bsc_ussd.c b/openbsc/src/osmo-bsc_nat/bsc_ussd.c
index f27453bc3..968456b95 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_ussd.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_ussd.c
@@ -374,7 +374,7 @@ int bsc_ussd_check(struct nat_sccp_connection *con, struct bsc_nat_parsed *parse
uint8_t proto;
uint8_t ti;
struct gsm48_hdr *hdr48;
- struct bsc_nat_acc_lst *lst;
+ struct bsc_msg_acc_lst *lst;
struct ussd_request req;
/*
@@ -416,12 +416,12 @@ int bsc_ussd_check(struct nat_sccp_connection *con, struct bsc_nat_parsed *parse
if (msg_type == GSM0480_MTYPE_REGISTER) {
/* now check if it is a IMSI we care about */
- lst = bsc_nat_acc_lst_find(&con->bsc->nat->access_lists,
+ lst = bsc_msg_acc_lst_find(&con->bsc->nat->access_lists,
con->bsc->nat->ussd_lst_name);
if (!lst)
return 0;
- if (bsc_nat_lst_check_allow(lst, con->imsi) != 0)
+ if (bsc_msg_acc_lst_check_allow(lst, con->imsi) != 0)
return 0;
/* now decode the message and see if we really want to handle it */