From 68b1574257fdbf4b06d225c116cfa6a2a6929965 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 22 May 2011 21:47:29 +0200 Subject: socket: use listen() and SO_REUSEADDR, new osmo_sock_init_ofd() function osmo_sock_init_ofd() is a wrapper around osmo_sock_init() which will take care of initializing and registering a 'struct osmo_fd' for the newly-created socket. --- include/osmocom/core/socket.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h index a3baa9d5..b2601c76 100644 --- a/include/osmocom/core/socket.h +++ b/include/osmocom/core/socket.h @@ -8,6 +8,9 @@ struct sockaddr; int osmo_sock_init(uint16_t family, uint16_t type, uint8_t proto, const char *host, uint16_t port, int connect0_bind1); +int osmo_sock_init_ofd(struct osmo_fd *ofd, int family, int type, int proto, + const char *host, uint16_t port, int connect0_bind1); + int osmo_sock_init_sa(struct sockaddr *ss, uint16_t type, uint8_t proto, int connect0_bind1); -- cgit v1.2.3