From 165fe562608cc9691b9f4da449b4977c68dc32a4 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 5 Apr 2011 18:33:24 +0200 Subject: 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. --- openbsc/include/openbsc/socket.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'openbsc/include/openbsc/socket.h') 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 */ -- cgit v1.2.3