diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/bsc_data.h | 6 | ||||
-rw-r--r-- | include/mtp_data.h | 11 | ||||
-rw-r--r-- | include/sctp_m2ua.h | 20 |
3 files changed, 19 insertions, 18 deletions
diff --git a/include/bsc_data.h b/include/bsc_data.h index b1e0fbe..9c1145f 100644 --- a/include/bsc_data.h +++ b/include/bsc_data.h @@ -36,7 +36,6 @@ struct bsc_data; struct snmp_mtp_session; struct msc_connection; -struct mtp_m2ua_transport; struct mtp_udp_data { struct osmo_wqueue write_queue; @@ -76,8 +75,6 @@ struct bsc_data { char *udp_ip; int udp_nr_links; - int m2ua_src_port; - /* MTP Links */ struct llist_head linksets; int num_linksets; @@ -87,7 +84,8 @@ struct bsc_data { struct osmo_fd inject_fd; /* m2ua code */ - struct sctp_m2ua_transport *m2ua_trans; + struct mtp_transport *m2ua_trans; + int m2ua_src_port; /* MSCs */ struct llist_head mscs; diff --git a/include/mtp_data.h b/include/mtp_data.h index 69db8f7..295afb2 100644 --- a/include/mtp_data.h +++ b/include/mtp_data.h @@ -23,6 +23,7 @@ #include <osmocom/core/msgb.h> #include <osmocom/core/timer.h> #include <osmocom/core/utils.h> +#include <osmocom/core/select.h> struct bsc_data; struct mtp_link; @@ -150,6 +151,16 @@ struct mtp_link { void *data; }; +/** + * @brief Base structure shared by SCTP/M2UA and SCCP-lite + */ +struct mtp_transport { + int started; + struct llist_head conns; + struct osmo_fd bsc; + + struct llist_head links; +}; void mtp_link_set_stop(struct mtp_link_set *set); void mtp_link_set_reset(struct mtp_link_set *set); diff --git a/include/sctp_m2ua.h b/include/sctp_m2ua.h index ee46a66..cf89379 100644 --- a/include/sctp_m2ua.h +++ b/include/sctp_m2ua.h @@ -33,14 +33,6 @@ struct mtp_link; * Drive M2UA over a SCTP link. Right now we have no * real concept for failover and such for the link. */ -struct sctp_m2ua_transport { - int started; - struct llist_head conns; - struct osmo_fd bsc; - - struct llist_head links; -}; - struct mtp_m2ua_link { struct mtp_link *base; @@ -56,7 +48,7 @@ struct mtp_m2ua_link { int link_index; struct llist_head entry; - struct sctp_m2ua_transport *transport; + struct mtp_transport *transport; char *as; }; @@ -70,16 +62,16 @@ struct sctp_m2ua_conn { int asp_up; struct osmo_wqueue queue; - struct sctp_m2ua_transport *trans; + struct mtp_transport *trans; }; -struct sctp_m2ua_transport *sctp_m2ua_transp_create(struct bsc_data *bsc); -int sctp_m2ua_transport_bind(struct sctp_m2ua_transport *, const char *ip, int port); -struct mtp_m2ua_link *mtp_m2ua_link_create(struct sctp_m2ua_transport *transport, +struct mtp_transport *sctp_m2ua_transp_create(struct bsc_data *bsc); +int sctp_m2ua_transport_bind(struct mtp_transport *, const char *ip, int port); +struct mtp_m2ua_link *mtp_m2ua_link_create(struct mtp_transport *transport, struct mtp_link_set *); struct mtp_m2ua_link *mtp_m2ua_link_init(struct mtp_link *link); -int sctp_m2ua_conn_count(struct sctp_m2ua_transport *tran); +int sctp_m2ua_conn_count(struct mtp_transport *tran); #endif |