summaryrefslogtreecommitdiffstats
path: root/include/osmocom/core
diff options
context:
space:
mode:
authorHarald Welte2011-05-22 21:47:29 +0200
committerHarald Welte2011-05-22 21:47:29 +0200
commit68b1574257fdbf4b06d225c116cfa6a2a6929965 (patch)
tree9fd6453614ce2e171c91cb9cf743913f21bdafdf /include/osmocom/core
parentremove debug printf from socket.c (diff)
downloadlibosmocore-68b1574257fdbf4b06d225c116cfa6a2a6929965.tar.gz
libosmocore-68b1574257fdbf4b06d225c116cfa6a2a6929965.tar.xz
libosmocore-68b1574257fdbf4b06d225c116cfa6a2a6929965.zip
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.
Diffstat (limited to 'include/osmocom/core')
-rw-r--r--include/osmocom/core/socket.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h
index a3baa9d..b2601c7 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);