comparison debug.h @ 296:6b41e2cbf071 dbclient-netcat-alike

A hack to make dbclient to tcp forwarding netcat style. eg ./dbclient -i testkey -L 1234:remotehost:remoteport tunnelhost will ssh to tunnelhost (using testkey, there's no way to ask for a password) and then tcpfwd to remotehost:remoteport on stdin/stdout. There's no way to give a cmdline password, so -i for a keyfile will have to do. Yet another reason for agent forwarding. The 1234 is a dummy var, I think it has to be a valid portnumber though.
author Matt Johnston <matt@ucc.asn.au>
date Tue, 21 Mar 2006 16:16:41 +0000
parents 161557a9dde8
children d4f32c3443ac
comparison
equal deleted inserted replaced
295:03f65e461915 296:6b41e2cbf071
37 * You'll need to run programs with "-v" to turn this on. 37 * You'll need to run programs with "-v" to turn this on.
38 * 38 *
39 * Caution: Don't use this in an unfriendly environment (ie unfirewalled), 39 * Caution: Don't use this in an unfriendly environment (ie unfirewalled),
40 * since the printing may not sanitise strings etc. This will add a reasonable 40 * since the printing may not sanitise strings etc. This will add a reasonable
41 * amount to your executable size. */ 41 * amount to your executable size. */
42 /*#define DEBUG_TRACE */ 42 #define DEBUG_TRACE
43 43
44 /* All functions writing to the cleartext payload buffer call 44 /* All functions writing to the cleartext payload buffer call
45 * CHECKCLEARTOWRITE() before writing. This is only really useful if you're 45 * CHECKCLEARTOWRITE() before writing. This is only really useful if you're
46 * attempting to track down a problem */ 46 * attempting to track down a problem */
47 #define CHECKCLEARTOWRITE() assert(ses.writepayload->len == 0 && \ 47 #define CHECKCLEARTOWRITE() assert(ses.writepayload->len == 0 && \