diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-01-17 22:37:11 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-01-20 11:49:39 +0100 |
commit | d8a73e24d280338e7f2e57e1f137ef8fbaa7a255 (patch) | |
tree | 920eb9ea7db849b2d80e271cd7e87017d720e7a2 | |
parent | a79ac9be8d19bb66c2774ec6b45108b54f208586 (diff) |
isup: Allow to have a different OPC for ISUP messages.
-rw-r--r-- | include/bsc_data.h | 1 | ||||
-rw-r--r-- | include/mtp_data.h | 2 | ||||
-rw-r--r-- | src/links.c | 1 | ||||
-rw-r--r-- | src/main.c | 1 | ||||
-rw-r--r-- | src/main_stp.c | 2 | ||||
-rw-r--r-- | src/main_udt.c | 1 | ||||
-rw-r--r-- | src/mtp_layer3.c | 2 |
7 files changed, 8 insertions, 2 deletions
diff --git a/include/bsc_data.h b/include/bsc_data.h index 2cd0257..3d10bb3 100644 --- a/include/bsc_data.h +++ b/include/bsc_data.h @@ -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; diff --git a/include/mtp_data.h b/include/mtp_data.h index b144ba5..e00f13a 100644 --- a/include/mtp_data.h +++ b/include/mtp_data.h @@ -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; diff --git a/src/links.c b/src/links.c index 1134e59..8802662 100644 --- a/src/links.c +++ b/src/links.c @@ -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; @@ -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; diff --git a/src/main_stp.c b/src/main_stp.c index c9a790b..d81b860 100644 --- a/src/main_stp.c +++ b/src/main_stp.c @@ -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; diff --git a/src/main_udt.c b/src/main_udt.c index 385f3f5..b47ea66 100644 --- a/src/main_udt.c +++ b/src/main_udt.c @@ -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; diff --git a/src/mtp_layer3.c b/src/mtp_layer3.c index fa428ed..e9d01c9 100644 --- a/src/mtp_layer3.c +++ b/src/mtp_layer3.c @@ -576,7 +576,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, |