Add osmo_sock_init2() function, allowing both BIND *and* CONNECT

The old osmo_sock_init() function allows only either a bind (for a
server socket), or a connect (for a client socket), but not both
together.  So there's no way to have a client socket that is bound to a
specific local IP and/or port, which is needed for some use cases.

Change-Id: Idab124bcca47872f55311a82d6818aed590965e6
diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h
index 4f00e30..e19e8f2 100644
--- a/include/osmocom/core/socket.h
+++ b/include/osmocom/core/socket.h
@@ -24,6 +24,10 @@
 int osmo_sock_init(uint16_t family, uint16_t type, uint8_t proto,
 		   const char *host, uint16_t port, unsigned int flags);
 
+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_init_ofd(struct osmo_fd *ofd, int family, int type, int proto,
 			const char *host, uint16_t port, unsigned int flags);