Mercurial > dropbear
comparison 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 |
comparison
equal
deleted
inserted
replaced
62:20563735e8b5 | 63:dcc43965928f |
---|---|
1 #ifndef _REMOTETCPFWD_H | 1 #ifndef _REMOTETCPFWD_H |
2 #define _REMOTETCPFWD_H | 2 #define _REMOTETCPFWD_H |
3 | 3 |
4 struct TCPListener { | 4 struct TCPListener { |
5 | 5 |
6 /* Local ones */ | 6 /* sendaddr/sendport are what we send in the channel init request. For a |
7 unsigned char *localaddr; /* Can be NULL */ | 7 * forwarded-tcpip request, it's the addr/port we were binding to. |
8 unsigned int localport; | 8 * For a direct-tcpip request, it's the addr/port we want the other |
9 /* Remote ones: */ | 9 * end to connect to */ |
10 unsigned char *remoteaddr; | 10 |
11 unsigned int remoteport; | 11 unsigned char *sendaddr; |
12 unsigned int sendport; | |
13 | |
14 /* This is for direct-tcpip (ie the client listening), and specifies the | |
15 * port to listen on. Is unspecified for the server */ | |
16 unsigned int listenport; | |
17 | |
12 const struct ChanType *chantype; | 18 const struct ChanType *chantype; |
13 | 19 |
14 }; | 20 }; |
15 | 21 |
16 void recv_msg_global_request_remotetcp(); | 22 void recv_msg_global_request_remotetcp(); |