# | -m (`masquerade support': subcommand gets `Wait' instead of our addr/port)
# | -d (`dump keys': when no subcmd, spew keys rather than reading them;
# we always send keys to our subcmd if there is one)
+# | -Dcrypto (debug crypto - use with care, prints keys, packets &c on screen!)
# | -f<path-to-udptunnel-forwarder>
# ...
# ]
# along with userv-utils; if not, write to the Free Software
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: udptunnel,v 1.11 2000/05/30 22:49:36 ian Exp $
+# $Id: udptunnel,v 1.12 2000/05/30 23:06:46 ian Exp $
use Socket;
use POSIX;
$masq= 0;
$dump= 0;
$fcmd= 'udptunnel-forwarder';
+$xfwdopts= '';
while ($ARGV[0] =~ m/^-/) {
$_= shift @ARGV;
$masq= 1;
} elsif (s/^-d/-/) {
$dump= 1;
+ } elsif (s/^-Dcrypto$/-/) {
+ $xfwdopts.= 'K';
} else {
quit("unknown option \`$_'");
}
close UW;
close DR;
-@fcmd= ($fcmd,
- fileno(L), fileno(DW), fileno(UR),
+$xfwdopts.= 'w' if $dump;
+
+@fcmd= ($fcmd, $xfwdopts,
+ fileno(L), fileno(DW), fileno(UR), fileno(DUMPKEYS),
$mtu, $keepalive, $timeout,
@rapf,
- fileno(DUMPKEYS), $dump ? 'y' : '',
@encryption);
debug("forwarding command @fcmd.");