diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-02-15 15:45:32 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-02-17 19:34:27 +0100 |
commit | f7ce2c6417b2cda3b0672d84f1ac9085c6f86f3a (patch) | |
tree | eb69cf14594fb69d4604961eecfcc79a6a83173c /src/main_stp.c | |
parent | 694337f8939aadeff60d931f827184f6c37f1926 (diff) |
m2ua: Start to separate the SCTP code and M2UA to allow multiple links
We want to be able to support multiple links over different SCTP
connection and in the future also over the same connection. This
is the first step to separate the SCTP connection handling from the
link handling inside these messages.
Diffstat (limited to 'src/main_stp.c')
-rw-r--r-- | src/main_stp.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main_stp.c b/src/main_stp.c index a26823d..203ce12 100644 --- a/src/main_stp.c +++ b/src/main_stp.c @@ -356,6 +356,12 @@ int main(int argc, char **argv) if (!set) return -1; + bsc->m2ua_trans = sctp_m2ua_transp_create("0.0.0.0", 2904); + if (!bsc->m2ua_trans) { + LOGP(DINP, LOGL_ERROR, "Failed to create SCTP transport.\n"); + return -1; + } + m2ua_set = mtp_link_set_alloc(bsc); m2ua_set->dpc = 92; m2ua_set->opc = 9; @@ -372,7 +378,7 @@ int main(int argc, char **argv) m2ua_set->pass_all_isup = bsc->isup_pass; m2ua_set->forward = set; - lnk = sctp_m2ua_transp_create("0.0.0.0", 2904); + lnk = mtp_m2ua_link_create(m2ua_set); lnk->base.pcap_fd = -1; mtp_link_set_add_link(m2ua_set, (struct mtp_link *) lnk); |