Mercurial > dropbear
diff tcp-accept.h @ 63:dcc43965928f
- A nice cleaner structure for tcp (acceptor) forwarding.
- still a checkpoint-ish commit
- sorted out listening on localhost only
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 11 Aug 2004 17:26:47 +0000 |
parents | 20563735e8b5 |
children |
line wrap: on
line diff
--- a/tcp-accept.h Tue Aug 10 17:09:52 2004 +0000 +++ b/tcp-accept.h Wed Aug 11 17:26:47 2004 +0000 @@ -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; };