From 3f464fc007ace5a829e8d43e72a88055f14b52e3 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Thu, 10 Oct 2019 17:38:35 +0200 Subject: socket: Introduce API osmo_sock_init2_multiaddr() This API will be used by libosmo-netif's osmo_stream for SCTP sockets, which in turn will be used by libosmo-sccp to support multi-homed connections. Related: OS#3608 Change-Id: Ic8681d9e093216c99c6bca4be81c31ef83688ed1 --- include/osmocom/core/socket.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/osmocom') diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h index 37b1eaef..e26ca0d3 100644 --- a/include/osmocom/core/socket.h +++ b/include/osmocom/core/socket.h @@ -36,6 +36,9 @@ struct osmo_fd; /*! use SO_REUSEADDR on UDP ports (required for multicast) */ #define OSMO_SOCK_F_UDP_REUSEADDR (1 << 5) +/*! maximum number of local or remote addresses supported by an osmo_sock instance */ +#define OSMO_SOCK_MAX_ADDRS 32 + int osmo_sock_init(uint16_t family, uint16_t type, uint8_t proto, const char *host, uint16_t port, unsigned int flags); @@ -43,6 +46,10 @@ int osmo_sock_init2(uint16_t family, uint16_t type, uint8_t proto, const char *local_host, uint16_t local_port, const char *remote_host, uint16_t remote_port, unsigned int flags); +int osmo_sock_init2_multiaddr(uint16_t family, uint16_t type, uint8_t proto, + const char **local_hosts, size_t local_hosts_cnt, uint16_t local_port, + const char **remote_hosts, size_t remote_hosts_cnt, uint16_t remote_port, unsigned int flags); + int osmo_sock_init_ofd(struct osmo_fd *ofd, int family, int type, int proto, const char *host, uint16_t port, unsigned int flags); -- cgit v1.2.3