Mercurial > dropbear
comparison tcpfwd.h @ 579:8c737cd7c1af
merge of '48fdaa8706d1acda35e9d564adc9a1fbc96c18c8'
and '658fd03abd21e0da7c4c89b9fff9dc693c72daae'
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 27 Feb 2010 11:53:18 +0000 |
parents | 69e98c45db7c 44f486b72427 |
children | dfdb9d9189ff |
comparison
equal
deleted
inserted
replaced
577:69e98c45db7c | 579:8c737cd7c1af |
---|---|
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 const unsigned char* listenaddr; |
52 unsigned int listenport; | 52 unsigned int listenport; |
53 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 |
54 when setting up the forwarding */ | 54 when setting up the forwarding */ |
55 struct TCPFwdList * next; | |
56 | |
57 }; | 55 }; |
58 | 56 |
59 /* Server */ | 57 /* Server */ |
60 void recv_msg_global_request_remotetcp(); | 58 void recv_msg_global_request_remotetcp(); |
61 | 59 |
69 void cli_recv_msg_request_failure(); | 67 void cli_recv_msg_request_failure(); |
70 | 68 |
71 /* Common */ | 69 /* Common */ |
72 int listen_tcpfwd(struct TCPListener* tcpinfo); | 70 int listen_tcpfwd(struct TCPListener* tcpinfo); |
73 | 71 |
74 | |
75 #endif | 72 #endif |