9
0
Fork 0

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.
This commit is contained in:
Holger Hans Peter Freyther 2011-01-30 00:24:15 +01:00
parent d3f412bbd5
commit f603f28488
3 changed files with 25 additions and 2 deletions

View File

@ -124,6 +124,9 @@ struct bsc_data {
int ni_ni;
int ni_spare;
/* isup handling */
int isup_pass;
/* LAC of the cell */
struct gsm48_loc_area_id lai;
uint16_t mcc;

View File

@ -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;

View File

@ -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);