summaryrefslogtreecommitdiff
path: root/cli-tcpfwd.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2004-12-22 15:37:50 +0000
committerMatt Johnston <matt@ucc.asn.au>2004-12-22 15:37:50 +0000
commite7677a5e8ddaa4787659a1a9e5320369c94564e4 (patch)
tree445e655df5d10a7b9f405bbaf0355efb8a48cc47 /cli-tcpfwd.c
parent7dfb2bfcda814cd2df7b964ec66c7f6e38db6152 (diff)
downloaddropbear-e7677a5e8ddaa4787659a1a9e5320369c94564e4.tar.gz
Rearrange preprocessor parts so that compilation with various options
disabled works OK. --HG-- extra : convert_revision : cc92f744e34125062d052b757967e167f19d6db5
Diffstat (limited to 'cli-tcpfwd.c')
-rw-r--r--cli-tcpfwd.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/cli-tcpfwd.c b/cli-tcpfwd.c
index 4dbef01..b4d99e9 100644
--- a/cli-tcpfwd.c
+++ b/cli-tcpfwd.c
@@ -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 @@ const struct ChanType cli_chan_tcpremote = {
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 @@ static const struct ChanType cli_chan_tcplocal = {
NULL,
NULL
};
+#endif
+#ifdef ENABLE_CLI_LOCALTCPFWD
void setup_localtcp() {
int ret;
@@ -102,7 +108,9 @@ static int cli_localtcp(unsigned int listenport, const char* remoteaddr,
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 @@ out:
TRACE(("leave newtcpdirect: err %d", err));
return err;
}
+#endif /* ENABLE_CLI_REMOTETCPFWD */