aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libabis
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2011-04-05 18:33:24 +0200
committerPablo Neira Ayuso <pablo@gnumonks.org>2011-04-05 18:33:24 +0200
commit165fe562608cc9691b9f4da449b4977c68dc32a4 (patch)
treecd32c841fdcb15a00c4e933768cfd034d921f943 /openbsc/src/libabis
parentf22e348287409d2ec63b0f21e2baa88a248be678 (diff)
libcommon: socket: extend make_sock() prototype
This patch extends the make_sock() prototype so you can fully set the fields priv_nr and data of the bsc_fd structure. This is the first step to get rid of the internal make_sock() implementation that ipaccess-proxy uses. This patch includes a minor cleanup to pass INADDR_ANY instead of zero, if you do not want to bind the socket to one specific address.
Diffstat (limited to 'openbsc/src/libabis')
-rw-r--r--openbsc/src/libabis/input/hsl.c4
-rw-r--r--openbsc/src/libabis/input/ipaccess.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/openbsc/src/libabis/input/hsl.c b/openbsc/src/libabis/input/hsl.c
index d8f284e3f..2b9ab1d1e 100644
--- a/openbsc/src/libabis/input/hsl.c
+++ b/openbsc/src/libabis/input/hsl.c
@@ -451,8 +451,8 @@ int hsl_setup(struct gsm_network *gsmnet)
e1h->gsmnet = gsmnet;
/* Listen for connections */
- ret = make_sock(&e1h->listen_fd, IPPROTO_TCP, 0, HSL_TCP_PORT,
- listen_fd_cb);
+ ret = make_sock(&e1h->listen_fd, IPPROTO_TCP, INADDR_ANY, HSL_TCP_PORT,
+ 0, listen_fd_cb, NULL);
if (ret < 0)
return ret;
diff --git a/openbsc/src/libabis/input/ipaccess.c b/openbsc/src/libabis/input/ipaccess.c
index f0746161a..ab1d41d8b 100644
--- a/openbsc/src/libabis/input/ipaccess.c
+++ b/openbsc/src/libabis/input/ipaccess.c
@@ -782,14 +782,14 @@ int ipaccess_setup(struct gsm_network *gsmnet)
e1h->gsmnet = gsmnet;
/* Listen for OML connections */
- ret = make_sock(&e1h->listen_fd, IPPROTO_TCP, 0, IPA_TCP_PORT_OML,
- listen_fd_cb);
+ ret = make_sock(&e1h->listen_fd, IPPROTO_TCP, INADDR_ANY,
+ IPA_TCP_PORT_OML, 0, listen_fd_cb, NULL);
if (ret < 0)
return ret;
/* Listen for RSL connections */
- ret = make_sock(&e1h->rsl_listen_fd, IPPROTO_TCP, 0,
- IPA_TCP_PORT_RSL, rsl_listen_fd_cb);
+ ret = make_sock(&e1h->rsl_listen_fd, IPPROTO_TCP, INADDR_ANY,
+ IPA_TCP_PORT_RSL, 0, rsl_listen_fd_cb, NULL);
if (ret < 0)
return ret;