Mercurial > dropbear
comparison svr-tcpfwd.c @ 1342:8747c2b19152
merge 2017.75
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 18 May 2017 22:59:38 +0800 |
parents | c8114a48837c 750ec4ec4cbe |
children | 58a74cb829b8 |
comparison
equal
deleted
inserted
replaced
1341:ab35a9ccc2eb | 1342:8747c2b19152 |
---|---|
33 #include "listener.h" | 33 #include "listener.h" |
34 #include "runopts.h" | 34 #include "runopts.h" |
35 #include "auth.h" | 35 #include "auth.h" |
36 #include "netio.h" | 36 #include "netio.h" |
37 | 37 |
38 #ifndef ENABLE_SVR_REMOTETCPFWD | 38 #ifndef DROPBEAR_SVR_REMOTETCPFWD |
39 | 39 |
40 /* This is better than SSH_MSG_UNIMPLEMENTED */ | 40 /* This is better than SSH_MSG_UNIMPLEMENTED */ |
41 void recv_msg_global_request_remotetcp() { | 41 void recv_msg_global_request_remotetcp() { |
42 TRACE(("recv_msg_global_request_remotetcp: remote tcp forwarding not compiled in")) | 42 TRACE(("recv_msg_global_request_remotetcp: remote tcp forwarding not compiled in")) |
43 send_msg_request_failure(); | 43 send_msg_request_failure(); |
44 } | 44 } |
45 | 45 |
46 /* */ | 46 /* */ |
47 #endif /* !ENABLE_SVR_REMOTETCPFWD */ | 47 #endif /* !DROPBEAR_SVR_REMOTETCPFWD */ |
48 | 48 |
49 static int svr_cancelremotetcp(void); | 49 static int svr_cancelremotetcp(void); |
50 static int svr_remotetcpreq(void); | 50 static int svr_remotetcpreq(void); |
51 static int newtcpdirect(struct Channel * channel); | 51 static int newtcpdirect(struct Channel * channel); |
52 | 52 |
53 #ifdef ENABLE_SVR_REMOTETCPFWD | 53 #if DROPBEAR_SVR_REMOTETCPFWD |
54 static const struct ChanType svr_chan_tcpremote = { | 54 static const struct ChanType svr_chan_tcpremote = { |
55 1, /* sepfds */ | 55 1, /* sepfds */ |
56 "forwarded-tcpip", | 56 "forwarded-tcpip", |
57 tcp_prio_inithandler, | 57 tcp_prio_inithandler, |
58 NULL, | 58 NULL, |
213 } | 213 } |
214 TRACE(("leave remotetcpreq")) | 214 TRACE(("leave remotetcpreq")) |
215 return ret; | 215 return ret; |
216 } | 216 } |
217 | 217 |
218 #endif /* ENABLE_SVR_REMOTETCPFWD */ | 218 #endif /* DROPBEAR_SVR_REMOTETCPFWD */ |
219 | 219 |
220 #ifdef ENABLE_SVR_LOCALTCPFWD | 220 #if DROPBEAR_SVR_LOCALTCPFWD |
221 | 221 |
222 const struct ChanType svr_chan_tcpdirect = { | 222 const struct ChanType svr_chan_tcpdirect = { |
223 1, /* sepfds */ | 223 1, /* sepfds */ |
224 "direct-tcpip", | 224 "direct-tcpip", |
225 newtcpdirect, /* init */ | 225 newtcpdirect, /* init */ |
281 m_free(orighost); | 281 m_free(orighost); |
282 TRACE(("leave newtcpdirect: err %d", err)) | 282 TRACE(("leave newtcpdirect: err %d", err)) |
283 return err; | 283 return err; |
284 } | 284 } |
285 | 285 |
286 #endif /* ENABLE_SVR_LOCALTCPFWD */ | 286 #endif /* DROPBEAR_SVR_LOCALTCPFWD */ |