comparison tcpfwd.h @ 641:2b1bb792cd4d dropbear-tfm

- Update tfm changes to current default tip
author Matt Johnston <matt@ucc.asn.au>
date Mon, 21 Nov 2011 19:52:28 +0800
parents 8c737cd7c1af
children dfdb9d9189ff
comparison
equal deleted inserted replaced
640:76097ec1a29a 641:2b1bb792cd4d
23 * SOFTWARE. */ 23 * SOFTWARE. */
24 #ifndef _TCPFWD_H 24 #ifndef _TCPFWD_H
25 #define _TCPFWD_H 25 #define _TCPFWD_H
26 26
27 #include "channel.h" 27 #include "channel.h"
28 #include "list.h"
28 29
29 struct TCPListener { 30 struct TCPListener {
30 31
31 /* For a direct-tcpip request, it's the addr/port we want the other 32 /* For a direct-tcpip request, it's the addr/port we want the other
32 * end to connect to */ 33 * end to connect to */
41 42
42 const struct ChanType *chantype; 43 const struct ChanType *chantype;
43 enum {direct, forwarded} tcp_type; 44 enum {direct, forwarded} tcp_type;
44 }; 45 };
45 46
46 /* A link in a list of forwards */ 47 /* A forwarding entry */
47 struct TCPFwdList { 48 struct TCPFwdEntry {
48
49 const unsigned char* connectaddr; 49 const unsigned char* connectaddr;
50 unsigned int connectport; 50 unsigned int connectport;
51 const unsigned char* listenaddr;
51 unsigned int listenport; 52 unsigned int listenport;
52 unsigned int have_reply; /* is set to 1 after a reply has been received 53 unsigned int have_reply; /* is set to 1 after a reply has been received
53 when setting up the forwarding */ 54 when setting up the forwarding */
54 struct TCPFwdList * next;
55
56 }; 55 };
57 56
58 /* Server */ 57 /* Server */
59 void recv_msg_global_request_remotetcp(); 58 void recv_msg_global_request_remotetcp();
60 59
68 void cli_recv_msg_request_failure(); 67 void cli_recv_msg_request_failure();
69 68
70 /* Common */ 69 /* Common */
71 int listen_tcpfwd(struct TCPListener* tcpinfo); 70 int listen_tcpfwd(struct TCPListener* tcpinfo);
72 71
73
74 #endif 72 #endif