Mercurial > dropbear
comparison tcpfwd.h @ 551:c3f2ec71e3d4 agent-client
New standard linked list to use, rather than adhoc SignKeyList or TCPFwdList
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 06 Jul 2009 12:59:13 +0000 |
parents | 805e557fdff7 |
children | 44f486b72427 |
comparison
equal
deleted
inserted
replaced
550:61c3513825b0 | 551:c3f2ec71e3d4 |
---|---|
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 unsigned int listenport; | 51 unsigned int listenport; |
52 unsigned int have_reply; /* is set to 1 after a reply has been received | 52 unsigned int have_reply; /* is set to 1 after a reply has been received |
53 when setting up the forwarding */ | 53 when setting up the forwarding */ |
54 struct TCPFwdList * next; | |
55 | |
56 }; | 54 }; |
57 | 55 |
58 /* Server */ | 56 /* Server */ |
59 void recv_msg_global_request_remotetcp(); | 57 void recv_msg_global_request_remotetcp(); |
60 | 58 |
68 void cli_recv_msg_request_failure(); | 66 void cli_recv_msg_request_failure(); |
69 | 67 |
70 /* Common */ | 68 /* Common */ |
71 int listen_tcpfwd(struct TCPListener* tcpinfo); | 69 int listen_tcpfwd(struct TCPListener* tcpinfo); |
72 | 70 |
73 | |
74 #endif | 71 #endif |