X-Git-Url: https://git.distorted.org.uk/~mdw/userv-utils/blobdiff_plain/88332428d953a2b6eb4e219e521cdfdc54d2af78..84f87e82eb7ab4fb0bb39d5d9800b740d528e6c9:/ipif/udptunnel diff --git a/ipif/udptunnel b/ipif/udptunnel index 65226b0..e84f36d 100755 --- a/ipif/udptunnel +++ b/ipif/udptunnel @@ -3,20 +3,26 @@ # # usage: # udptunnel -# [ -l[] ... . ] -# , -# , +# [ -l[] ... . +# -e[/...] +# ... +# ] +# , +# , # ,,, # , # # [ [ ...] ] # +# +# <..-addr> may also be hostname +# # may be number or `print' or `silent' # # may number or `command', in which case # must be specified and should run udptunnel at the # remote end; it will be invoked as -# ,print +# ,print # , # ,,, # , @@ -44,7 +50,7 @@ # 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.9 2000/05/28 18:27:09 ian Exp $ +# $Id: udptunnel,v 1.10 2000/05/29 17:16:29 ian Exp $ use Socket; use POSIX; @@ -63,7 +69,7 @@ sub warning ($) { warn "$progname - $hostname: $_[0]\n"; } sub eat_addr_port ($) { my ($x) = @_; - @ARGV or quit(", missing"); + @ARGV or quit(", missing"); $_= shift(@ARGV); $_ =~ m/^([^,]+)\,(\d+|$x)$/ or quit("$_: , bad syntax"); return ($1,$2); @@ -96,7 +102,7 @@ while ($ARGV[0] =~ m/^-/) { last if $_ eq '--'; if (s/^-l//) { push @lcmd,$_ if length; - while (@ARGV && ($_= shift @ARGV) ne '-') { push @lcmd, $_; } + while (@ARGV && ($_= shift @ARGV) ne '.') { push @lcmd, $_; } } else { quit("unknown option \`$_'"); }