9
0
Fork 0

isup: Allow to have a different OPC for ISUP messages.

This commit is contained in:
Holger Hans Peter Freyther 2011-01-17 22:37:11 +01:00
parent 0512cbde66
commit 943578ea1d
7 changed files with 8 additions and 2 deletions

View File

@ -91,6 +91,7 @@ struct bsc_data {
int dpc;
int opc;
int sccp_opc;
int isup_opc;
int src_port;
int udp_port;
char *udp_ip;

View File

@ -39,7 +39,7 @@ struct mtp_link;
*/
struct mtp_link_set {
/* routing info.. */
int dpc, opc, sccp_opc;
int dpc, opc, sccp_opc, isup_opc;
int ni;
int spare;

View File

@ -104,6 +104,7 @@ int link_init(struct bsc_data *bsc)
bsc->link_set->dpc = bsc->dpc;
bsc->link_set->opc = bsc->opc;
bsc->link_set->sccp_opc = bsc->sccp_opc > -1 ? bsc->sccp_opc : bsc->opc;
bsc->link_set->isup_opc = bsc->isup_opc > -1 ? bsc->isup_opc : bsc->opc;
bsc->link_set->sltm_once = bsc->once;
bsc->link_set->ni = bsc->ni_ni;
bsc->link_set->spare = bsc->ni_spare;

View File

@ -629,6 +629,7 @@ int main(int argc, char **argv)
bsc.dpc = 1;
bsc.opc = 0;
bsc.sccp_opc = -1;
bsc.isup_opc = -1;
bsc.udp_port = 3456;
bsc.udp_ip = NULL;
bsc.src_port = 1313;

View File

@ -187,6 +187,7 @@ int main(int argc, char **argv)
bsc.dpc = 1;
bsc.opc = 0;
bsc.sccp_opc = -1;
bsc.isup_opc = -1;
bsc.udp_port = 3456;
bsc.udp_ip = NULL;
bsc.src_port = 1313;
@ -243,6 +244,7 @@ int main(int argc, char **argv)
bsc.m2ua_set->dpc = 92;
bsc.m2ua_set->opc = 9;
bsc.m2ua_set->sccp_opc = 9;
bsc.m2ua_set->isup_opc = 9;
bsc.m2ua_set->ni = 3;
bsc.m2ua_set->bsc = &bsc;

View File

@ -186,6 +186,7 @@ int main(int argc, char **argv)
bsc.dpc = 1;
bsc.opc = 0;
bsc.sccp_opc = -1;
bsc.isup_opc = -1;
bsc.udp_port = 3456;
bsc.udp_ip = NULL;
bsc.src_port = 1313;

View File

@ -524,7 +524,7 @@ int mtp_link_set_submit_sccp_data(struct mtp_link_set *link, int sls, const uint
int mtp_link_set_submit_isup_data(struct mtp_link_set *link, int sls,
const uint8_t *data, unsigned int length)
{
return mtp_int_submit(link, link->opc, sls, MTP_SI_MNT_ISUP, data, length);
return mtp_int_submit(link, link->isup_opc, sls, MTP_SI_MNT_ISUP, data, length);
}
static int mtp_int_submit(struct mtp_link_set *link, int pc, int sls, int type,