From 80b135581909fef595d48436ab04dbcb147e3895 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Fri, 11 Oct 2019 17:58:07 +0200 Subject: ss7: Support multiple addresses in SCTP connections After this patch, Several "local-ip" and "remote-ip" lines are accepted under "listen" and "asp" VTY nodes, allowing to configure an SCTP connection with multiple connections, hence allowing control of SCTP multi-homing features. libosmo-sccp clients such as osmo-bsc and osmo-msc also gain support for this feature with this commit. Related: OS#3608 Depends: libosmocore.git Ic8681d9e093216c99c6bca4be81c31ef83688ed1 Depends: libosmo-netif.git I0fe62f518e195db4e34f3b0ad1762bb57ba9d92a Change-Id: Ibd15de7a4e00dbec78ff2e2dd6a686b0f3af22de --- include/osmocom/sigtran/osmo_ss7.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 9e8f2b3..12aeea4 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -8,6 +8,7 @@ #include #include #include +#include extern struct llist_head osmo_ss7_instances; @@ -348,7 +349,8 @@ void osmo_ss7_asp_disconnect(struct osmo_ss7_asp *asp); ***********************************************************************/ struct osmo_ss7_asp_peer { - char *host; + char *host[OSMO_SOCK_MAX_ADDRS]; + size_t host_cnt; uint16_t port; }; @@ -409,6 +411,8 @@ struct osmo_ss7_asp { } cfg; }; +int osmo_ss7_asp_peer_snprintf(char* buf, size_t buf_len, struct osmo_ss7_asp_peer *peer); + struct osmo_ss7_asp * osmo_ss7_asp_find_by_name(struct osmo_ss7_instance *inst, const char *name); struct osmo_ss7_asp @@ -480,7 +484,9 @@ osmo_ss7_xua_server_bind(struct osmo_xua_server *xs); int osmo_ss7_xua_server_set_local_host(struct osmo_xua_server *xs, const char *local_host); - +int +osmo_ss7_xua_server_set_local_hosts(struct osmo_xua_server *xs, const char **local_hosts, size_t local_host_cnt); +int osmo_ss7_xua_server_add_local_host(struct osmo_xua_server *xs, const char *local_host); void osmo_ss7_xua_server_destroy(struct osmo_xua_server *xs); struct osmo_sccp_instance * -- cgit v1.2.3