diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-08 10:14:44 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-15 20:24:21 +0800 |
commit | 29c67039fe449e9e44f6422fcf122d4263aa56b6 (patch) | |
tree | 27dca0dfb3c79601103e67f7dbf1bdab2c6fd83f /openbsc/src/nat | |
parent | e4900a074ab86f13d36eab8468272e7bcf390ad3 (diff) |
nat: Shorten the access-list struct and method names (still way too long)
Diffstat (limited to 'openbsc/src/nat')
-rw-r--r-- | openbsc/src/nat/bsc_nat_utils.c | 22 | ||||
-rw-r--r-- | openbsc/src/nat/bsc_nat_vty.c | 16 |
2 files changed, 19 insertions, 19 deletions
diff --git a/openbsc/src/nat/bsc_nat_utils.c b/openbsc/src/nat/bsc_nat_utils.c index 71d572279..663d8bc18 100644 --- a/openbsc/src/nat/bsc_nat_utils.c +++ b/openbsc/src/nat/bsc_nat_utils.c @@ -205,11 +205,11 @@ static int auth_imsi(struct bsc_connection *bsc, const char *mi_string) * 3.) Reject if the IMSI not allowed at the global level. * 4.) Allow directly if the IMSI is allowed at the global level */ - struct bsc_nat_access_list *nat_lst = NULL; - struct bsc_nat_access_list *bsc_lst = NULL; + struct bsc_nat_acc_lst *nat_lst = NULL; + struct bsc_nat_acc_lst *bsc_lst = NULL; - bsc_lst = bsc_nat_accs_list_find(bsc->nat, bsc->cfg->acc_lst_name); - nat_lst = bsc_nat_accs_list_find(bsc->nat, bsc->nat->acc_lst_name); + bsc_lst = bsc_nat_acc_lst_find(bsc->nat, bsc->cfg->acc_lst_name); + nat_lst = bsc_nat_acc_lst_find(bsc->nat, bsc->nat->acc_lst_name); /* 1. BSC deny */ @@ -412,9 +412,9 @@ const char *bsc_con_type_to_string(int type) return con_types[type]; } -struct bsc_nat_access_list *bsc_nat_accs_list_find(struct bsc_nat *nat, const char *name) +struct bsc_nat_acc_lst *bsc_nat_acc_lst_find(struct bsc_nat *nat, const char *name) { - struct bsc_nat_access_list *lst; + struct bsc_nat_acc_lst *lst; if (!name) return NULL; @@ -426,15 +426,15 @@ struct bsc_nat_access_list *bsc_nat_accs_list_find(struct bsc_nat *nat, const ch return NULL; } -struct bsc_nat_access_list *bsc_nat_accs_list_get(struct bsc_nat *nat, const char *name) +struct bsc_nat_acc_lst *bsc_nat_acc_lst_get(struct bsc_nat *nat, const char *name) { - struct bsc_nat_access_list *lst; + struct bsc_nat_acc_lst *lst; - lst = bsc_nat_accs_list_find(nat, name); + lst = bsc_nat_acc_lst_find(nat, name); if (lst) return lst; - lst = talloc_zero(nat, struct bsc_nat_access_list); + lst = talloc_zero(nat, struct bsc_nat_acc_lst); if (!lst) { LOGP(DNAT, LOGL_ERROR, "Failed to allocate access list"); return NULL; @@ -445,7 +445,7 @@ struct bsc_nat_access_list *bsc_nat_accs_list_get(struct bsc_nat *nat, const cha return lst; } -void bsc_nat_accs_list_delete(struct bsc_nat_access_list *lst) +void bsc_nat_acc_lst_delete(struct bsc_nat_acc_lst *lst) { llist_del(&lst->list); talloc_free(lst); diff --git a/openbsc/src/nat/bsc_nat_vty.c b/openbsc/src/nat/bsc_nat_vty.c index 3f2d7ac5c..fdd7886e5 100644 --- a/openbsc/src/nat/bsc_nat_vty.c +++ b/openbsc/src/nat/bsc_nat_vty.c @@ -51,7 +51,7 @@ static struct cmd_node bsc_node = { static int config_write_nat(struct vty *vty) { - struct bsc_nat_access_list *lst; + struct bsc_nat_acc_lst *lst; vty_out(vty, "nat%s", VTY_NEWLINE); vty_out(vty, " msc ip %s%s", _nat->msc_ip, VTY_NEWLINE); @@ -386,9 +386,9 @@ DEFUN(cfg_lst_imsi_allow, "The name of the access-list\n" "The regexp of allowed IMSIs\n") { - struct bsc_nat_access_list *acc; + struct bsc_nat_acc_lst *acc; - acc = bsc_nat_accs_list_get(_nat, argv[0]); + acc = bsc_nat_acc_lst_get(_nat, argv[0]); if (!acc) return CMD_WARNING; @@ -403,9 +403,9 @@ DEFUN(cfg_lst_imsi_deny, "The name of the access-list\n" "The regexp of to be denied IMSIs\n") { - struct bsc_nat_access_list *acc; + struct bsc_nat_acc_lst *acc; - acc = bsc_nat_accs_list_get(_nat, argv[0]); + acc = bsc_nat_acc_lst_get(_nat, argv[0]); if (!acc) return CMD_WARNING; @@ -420,12 +420,12 @@ DEFUN(cfg_lst_no, NO_STR "Remove an access-list by name\n" "The access-list to remove\n") { - struct bsc_nat_access_list *acc; - acc = bsc_nat_accs_list_find(_nat, argv[0]); + struct bsc_nat_acc_lst *acc; + acc = bsc_nat_acc_lst_find(_nat, argv[0]); if (!acc) return CMD_WARNING; - bsc_nat_accs_list_delete(acc); + bsc_nat_acc_lst_delete(acc); return CMD_SUCCESS; } |