summaryrefslogtreecommitdiffstats
path: root/rfb/rfbclient.h
diff options
context:
space:
mode:
authorLuca Stauble <gnekoz@gmail.com>2012-02-04 01:25:04 +0100
committerJohannes Schindelin <johannes.schindelin@gmx.de>2012-02-03 22:13:11 -0600
commitfe2e2e4b59454f1dcc23715f57b17db331ad36ff (patch)
tree16d263d20fd2e7784c3ee8c242f33b1c1d8b9f3a /rfb/rfbclient.h
parent5ea7e51e6bd25f3753a3943271e7410e2cb78f5e (diff)
downloadlibtdevnc-fe2e2e4b59454f1dcc23715f57b17db331ad36ff.tar.gz
libtdevnc-fe2e2e4b59454f1dcc23715f57b17db331ad36ff.zip
Add an optional parameter to specify the ip address for reverse connections
For security reasons, it can be important to limit which IP addresses a LibVNCClient-based client should listen for reverse connections. This commit adds that option. To preserve binary backwards-compatibility, the field was added to the end of the rfbclient struct, and the function ListenAtTcpPort retains its signature (but calls the new ListenAtTcpPortAndAddress). [jes: shortened the commit subject, added a longer explanation in the commit body and adjusted style] Signed-off-by: Luca Stauble <gnekoz@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 'rfb/rfbclient.h')
-rw-r--r--rfb/rfbclient.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h
index b3f2cd7..36ffe13 100644
--- a/rfb/rfbclient.h
+++ b/rfb/rfbclient.h
@@ -345,6 +345,9 @@ typedef struct _rfbClient {
int listenSock;
FinishedFrameBufferUpdateProc FinishedFrameBufferUpdate;
+
+ char *listenAddress;
+
} rfbClient;
/* cursor.c */
@@ -541,6 +544,7 @@ extern rfbBool ReadFromRFBServer(rfbClient* client, char *out, unsigned int n);
extern rfbBool WriteToRFBServer(rfbClient* client, char *buf, int n);
extern int FindFreeTcpPort(void);
extern int ListenAtTcpPort(int port);
+extern int ListenAtTcpPortAndAddress(int port, const char *address);
extern int ConnectClientToTcpAddr(unsigned int host, int port);
extern int ConnectClientToTcpAddr6(const char *hostname, int port);
extern int ConnectClientToUnixSock(const char *sockFile);