diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile.am | 2 | ||||
-rw-r--r-- | include/sctp_m2ua.h | 60 |
2 files changed, 61 insertions, 1 deletions
diff --git a/include/Makefile.am b/include/Makefile.am index a0a54b9..6771b84 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,5 +1,5 @@ noinst_HEADERS = mtp_level3.h mtp_data.h ipaccess.h thread.h mtp_pcap.h \ mgcp_ss7.h bss_patch.h bssap_sccp.h bsc_data.h udp_input.h \ - snmp_mtp.h cellmgr_debug.h bsc_sccp.h bsc_ussd.h + snmp_mtp.h cellmgr_debug.h bsc_sccp.h bsc_ussd.h sctp_m2ua.h SUBDIRS = mgcp diff --git a/include/sctp_m2ua.h b/include/sctp_m2ua.h new file mode 100644 index 0000000..2627d7d --- /dev/null +++ b/include/sctp_m2ua.h @@ -0,0 +1,60 @@ +/* Run M2UA over SCTP here */ +/* (C) 2011 by Holger Hans Peter Freyther <zecke@selfish.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef sctp_m2ua_h +#define sctp_m2ua_h + +#include "mtp_data.h" + +#include <osmocom/m2ua/m2ua_msg.h> +#include <osmocore/write_queue.h> + +#include <netinet/in.h> +#include <netinet/sctp.h> + +struct sctp_m2ua_conn; +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; + + int started; + struct llist_head conns; + struct bsc_fd bsc; +}; + +/* + * One ASP that can be active or such. + */ +struct sctp_m2ua_conn { + struct llist_head entry; + uint8_t asp_ident[4]; + int asp_up; + int asp_active; + int established; + + struct write_queue queue; + struct mtp_m2ua_link *trans; +}; + +struct mtp_m2ua_link *sctp_m2ua_transp_create(const char *ip, int port); + +#endif |