aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-02-15 15:45:32 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-02-17 19:34:27 +0100
commitf7ce2c6417b2cda3b0672d84f1ac9085c6f86f3a (patch)
treeeb69cf14594fb69d4604961eecfcc79a6a83173c /include
parent694337f8939aadeff60d931f827184f6c37f1926 (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 'include')
-rw-r--r--include/bsc_data.h4
-rw-r--r--include/sctp_m2ua.h19
2 files changed, 18 insertions, 5 deletions
diff --git a/include/bsc_data.h b/include/bsc_data.h
index df62493..6fb5b26 100644
--- a/include/bsc_data.h
+++ b/include/bsc_data.h
@@ -39,6 +39,7 @@
struct bsc_data;
struct snmp_mtp_session;
+struct mtp_m2ua_transport;
/**
* Struct holding the BSC to MSC forwarding state.
@@ -155,6 +156,9 @@ struct bsc_data {
/* MSC related data... currently only one is supported */
struct bsc_msc_forward msc_forward;
+
+ /* m2ua code */
+ struct sctp_m2ua_transport *m2ua_trans;
};
/* bsc related functions */
diff --git a/include/sctp_m2ua.h b/include/sctp_m2ua.h
index 2627d7d..dcb6269 100644
--- a/include/sctp_m2ua.h
+++ b/include/sctp_m2ua.h
@@ -33,12 +33,20 @@ struct mtp_link;
* Drive M2UA over a SCTP link. Right now we have no
* real concept for failover and such for the link.
*/
-struct mtp_m2ua_link {
- struct mtp_link base;
-
+struct sctp_m2ua_transport {
int started;
struct llist_head conns;
struct bsc_fd bsc;
+
+ struct llist_head links;
+};
+
+struct mtp_m2ua_link {
+ struct mtp_link base;
+
+ int link_index;
+ struct llist_head entry;
+ struct sctp_m2ua_transport *transport;
};
/*
@@ -52,9 +60,10 @@ struct sctp_m2ua_conn {
int established;
struct write_queue queue;
- struct mtp_m2ua_link *trans;
+ struct sctp_m2ua_transport *trans;
};
-struct mtp_m2ua_link *sctp_m2ua_transp_create(const char *ip, int port);
+struct sctp_m2ua_transport *sctp_m2ua_transp_create(const char *ip, int port);
+struct mtp_m2ua_link *mtp_m2ua_link_create(struct mtp_link_set *);
#endif