summaryrefslogtreecommitdiffhomepage
path: root/tcp-accept.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2004-08-11 17:26:47 +0000
committerMatt Johnston <matt@ucc.asn.au>2004-08-11 17:26:47 +0000
commit453261a0420a1e4ee5d0feb3df6806c39ae3e0ff (patch)
treedffe7a4d63c88753c9763cbbe584d3d95d1a95f2 /tcp-accept.h
parenta712baa8e566bfd8403a3e2bfdf350a0dc50ea9f (diff)
- A nice cleaner structure for tcp (acceptor) forwarding.
- still a checkpoint-ish commit - sorted out listening on localhost only --HG-- extra : convert_revision : c030ac0a3950dba81f2324e2ba9d4b77fc8f8149
Diffstat (limited to 'tcp-accept.h')
-rw-r--r--tcp-accept.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/tcp-accept.h b/tcp-accept.h
index 96ddb76..8c795dc 100644
--- a/tcp-accept.h
+++ b/tcp-accept.h
@@ -3,12 +3,18 @@
struct TCPListener {
- /* Local ones */
- unsigned char *localaddr; /* Can be NULL */
- unsigned int localport;
- /* Remote ones: */
- unsigned char *remoteaddr;
- unsigned int remoteport;
+ /* sendaddr/sendport are what we send in the channel init request. For a
+ * forwarded-tcpip request, it's the addr/port we were binding to.
+ * For a direct-tcpip request, it's the addr/port we want the other
+ * end to connect to */
+
+ unsigned char *sendaddr;
+ unsigned int sendport;
+
+ /* This is for direct-tcpip (ie the client listening), and specifies the
+ * port to listen on. Is unspecified for the server */
+ unsigned int listenport;
+
const struct ChanType *chantype;
};