Mercurial > dropbear
diff cli-tcpfwd.c @ 156:8c2b3506f112
Rearrange preprocessor parts so that compilation with various options
disabled works OK.
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 22 Dec 2004 15:37:50 +0000 |
parents | 10f4d3319780 |
children | 0cfba3034be5 |
line wrap: on
line diff
--- a/cli-tcpfwd.c Mon Dec 20 14:46:12 2004 +0000 +++ b/cli-tcpfwd.c Wed Dec 22 15:37:50 2004 +0000 @@ -31,8 +31,7 @@ #include "session.h" #include "ssh.h" -static int cli_localtcp(unsigned int listenport, const char* remoteaddr, - unsigned int remoteport); +#ifdef ENABLE_CLI_REMOTETCPFWD static int newtcpforwarded(struct Channel * channel); const struct ChanType cli_chan_tcpremote = { @@ -43,6 +42,11 @@ NULL, NULL }; +#endif + +#ifdef ENABLE_CLI_LOCALTCPFWD +static int cli_localtcp(unsigned int listenport, const char* remoteaddr, + unsigned int remoteport); static const struct ChanType cli_chan_tcplocal = { 1, /* sepfds */ "direct-tcpip", @@ -51,7 +55,9 @@ NULL, NULL }; +#endif +#ifdef ENABLE_CLI_LOCALTCPFWD void setup_localtcp() { int ret; @@ -102,7 +108,9 @@ TRACE(("leave cli_localtcp: %d", ret)); return ret; } +#endif /* ENABLE_CLI_LOCALTCPFWD */ +#ifdef ENABLE_CLI_REMOTETCPFWD static void send_msg_global_request_remotetcp(int port) { TRACE(("enter send_msg_global_request_remotetcp")); @@ -191,3 +199,4 @@ TRACE(("leave newtcpdirect: err %d", err)); return err; } +#endif /* ENABLE_CLI_REMOTETCPFWD */