aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-01-30 00:24:15 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-01-30 00:24:15 +0100
commitf603f28488c6c6f04d8314d9f049b535d74d6307 (patch)
treeb31b2388271c21c29276efda47c95f4086f74f4b /src
parentd3f412bbd59cff82acc6876d86cd14183412b317 (diff)
isup: Make it possible for the STP to handle/not handle ISUP messages
Add an option to decide if we should handle GROUP BLOCK and RESET messages inside the STP or if we should forward those as well.
Diffstat (limited to 'src')
-rw-r--r--src/main_stp.c7
-rw-r--r--src/vty_interface.c17
2 files changed, 22 insertions, 2 deletions
diff --git a/src/main_stp.c b/src/main_stp.c
index 45a89aa..444e7be 100644
--- a/src/main_stp.c
+++ b/src/main_stp.c
@@ -256,8 +256,11 @@ int main(int argc, char **argv)
bsc.m2ua_set->name = talloc_strdup(bsc.m2ua_set, "M2UA");
/* for both links we want to have all isup messages */
- bsc.m2ua_set->pass_all_isup = 1;
- bsc.link_set->pass_all_isup = 1;
+ if (bsc.isup_pass) {
+ LOGP(DINP, LOGL_NOTICE, "Going to pass through all ISUP messages.\n");
+ bsc.m2ua_set->pass_all_isup = 1;
+ bsc.link_set->pass_all_isup = 1;
+ }
lnk = sctp_m2ua_transp_create("0.0.0.0", 2904);
lnk->base.pcap_fd = -1;
diff --git a/src/vty_interface.c b/src/vty_interface.c
index ec85f30..8185406 100644
--- a/src/vty_interface.c
+++ b/src/vty_interface.c
@@ -83,6 +83,7 @@ static int config_write_cell(struct vty *vty)
vty_out(vty, " msc ip %s%s", bsc.msc_address, VTY_NEWLINE);
vty_out(vty, " msc ip-dscp %d%s", bsc.msc_ip_dscp, VTY_NEWLINE);
vty_out(vty, " msc token %s%s", bsc.token, VTY_NEWLINE);
+ vty_out(vty, " isup pass-through %d%s", bsc.isup_pass, VTY_NEWLINE);
return CMD_SUCCESS;
}
@@ -290,6 +291,21 @@ DEFUN(cfg_lac, cfg_lac_cmd,
return CMD_SUCCESS;
}
+DEFUN(cfg_isup_pass, cfg_isup_pass_cmd,
+ "isup pass-through (0|1)",
+ "ISUP related functionality\n"
+ "Pass through all ISUP messages directly\n"
+ "Handle some messages locally\n" "Pass through everything\n")
+{
+ bsc.isup_pass = atoi(argv[0]);
+ if (bsc.m2ua_set)
+ bsc.m2ua_set->pass_all_isup = bsc.isup_pass;
+ if (bsc.link_set)
+ bsc.link_set->pass_all_isup = bsc.isup_pass;
+
+ return CMD_SUCCESS;
+}
+
static void dump_stats(struct vty *vty, const char *name, struct mtp_link_set *set)
{
struct mtp_link *link;
@@ -532,6 +548,7 @@ void cell_vty_init(void)
install_element(CELLMGR_NODE, &cfg_mcc_cmd);
install_element(CELLMGR_NODE, &cfg_mnc_cmd);
install_element(CELLMGR_NODE, &cfg_lac_cmd);
+ install_element(CELLMGR_NODE, &cfg_isup_pass_cmd);
/* special commands */
install_element(ENABLE_NODE, &pcap_set_cmd);