aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/socket.h
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/include/openbsc/socket.h
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/include/openbsc/socket.h')
-rw-r--r--openbsc/include/openbsc/socket.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/openbsc/include/openbsc/socket.h b/openbsc/include/openbsc/socket.h
index faca7647b..dac4ca7ae 100644
--- a/openbsc/include/openbsc/socket.h
+++ b/openbsc/include/openbsc/socket.h
@@ -8,7 +8,8 @@
#define IPPROTO_GRE 47
#endif
-int make_sock(struct bsc_fd *bfd, int proto, u_int32_t ip, u_int16_t port,
- int (*cb)(struct bsc_fd *fd, unsigned int what));
+int make_sock(struct bsc_fd *bfd, int proto,
+ u_int32_t ip, u_int16_t port, int priv_nr,
+ int (*cb)(struct bsc_fd *fd, unsigned int what), void *data);
#endif /* _BSC_SOCKET_H */