diff --git a/CHANGES b/CHANGES index 07151bb..893e422 100644 --- a/CHANGES +++ b/CHANGES @@ -29,6 +29,9 @@ corrections: corrected option handling with STDIO; usecase: cool-write + corrected name of option intervall to interval (old form still valid + for us German speaking guys) + corrected some print statements and variable names make uninstall did not uninstall procan diff --git a/VERSION b/VERSION index e1b9ae7..5865eb9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -"1.6.0.0+execpty+servres+fd_setsize+udp_sigchld+stdio_opts" +"1.6.0.0+execpty+servres+fd_setsize+udp_sigchld+stdio_opts+interval" diff --git a/doc/socat.yo b/doc/socat.yo index 0893b57..f2bc252 100644 --- a/doc/socat.yo +++ b/doc/socat.yo @@ -163,7 +163,7 @@ label(option_t)dit(bf(tt(-t))tt()) down. Then, socat() waits [link(timeval)(TYPE_TIMEVAL)] seconds before terminating. Default is 0.5 seconds. This timeout only applies to addresses where write and read part can be closed independently. When during - the timeout intervall the read part gives EOF, socat terminates without + the timeout interval the read part gives EOF, socat terminates without awaiting the timeout. label(option_T)dit(bf(tt(-T))tt()) Total inactivity timeout: when socat is already in the transfer loop and @@ -1774,7 +1774,7 @@ label(OPTION_KEEPIDLE)dit(bf(tt(keepidle=))) Sets the idle time before sending the first keepalive to [link(int)(TYPE_INT)]. label(OPTION_KEEPINTVL)dit(bf(tt(keepintvl=))) - Sets the intervall between two keepalives to + Sets the interval between two keepalives to [link(int)(TYPE_INT)]. label(OPTION_LINGER2)dit(bf(tt(linger2=))) Sets the time to keep the socket in FIN-WAIT-2 state to @@ -2227,11 +2227,11 @@ label(OPTION_PTY_WAIT_SLAVE)dit(bf(tt(wait-slave))) system call. And it depends on an undocumented behaviour of pty's, so it does not work on all operating systems. It has successfully been tested on Linux, FreeBSD, NetBSD, and on Tru64 with openpty. -label(OPTION_PTY_INTERVALL)dit(bf(tt(pty-intervall=))) +label(OPTION_PTY_INTERVAL)dit(bf(tt(pty-interval=))) When the link(wait-slave)(OPTION_PTY_WAIT_SLAVE) option is set, socat periodically checks the HUP condition using tt(poll()) to find if the pty's - slave side has been opened. The default polling intervall is 1s. Use the - pty-intervall option [link(timeval)(TYPE_TIMEVAL)] to change this value. + slave side has been opened. The default polling interval is 1s. Use the + pty-interval option [link(timeval)(TYPE_TIMEVAL)] to change this value. enddit() @@ -2326,7 +2326,7 @@ startdit() label(OPTION_RETRY)dit(bf(tt(retry=))) Number of retries before the connection or listen attempt is aborted. Default is 0, which means just one attempt. -label(OPTION_INTERVALL)dit(bf(tt(intervall=))) +label(OPTION_INTERVAL)dit(bf(tt(interval=))) Time between consecutive attempts (seconds, [link(timespec)(TYPE_TIMESPEC)]). Default is 1 second. label(OPTION_FOREVER)dit(bf(tt(forever))) diff --git a/doc/xio.help b/doc/xio.help index 1c3c1ef..c1ac403 100644 --- a/doc/xio.help +++ b/doc/xio.help @@ -1789,7 +1789,7 @@ Platforms: all Linux, FreeBSD, NetBSD, and on Tru64 with openpty. -Option: pty-intervall +Option: pty-interval Type: TIMESPEC Option group: PTY @@ -1799,7 +1799,7 @@ Platforms: all When the wait-slave option is set, socat periodically checks the HUP condition using poll() to find if the pty's slave side has been opened. The default - polling intervall is 1s. Use the pty-intervall option to change this value. + polling interval is 1s. Use the pty-interval option to change this value. =============================================================================== @@ -3008,7 +3008,7 @@ Option group: IP_TCP Phase: PASTSOCKET Platforms: Linux -Sets the TCP_KEEPINTVL value of the socket with setsockopt(). Intervall between +Sets the TCP_KEEPINTVL value of the socket with setsockopt(). Interval between keepalives (in seconds?) @@ -4703,7 +4703,7 @@ Number of retries before the connection or listen attempt is aborted. Default is 0, which means just one attempt. -Option: intervall= +Option: interval= Type: TIMESPEC Option group: RETRY diff --git a/test.sh b/test.sh index baf94a6..a6d550b 100755 --- a/test.sh +++ b/test.sh @@ -370,11 +370,11 @@ filloptionvalues() { esac # PTY case "$OPTS" in - *,pty-intervall,*) OPTS=$(echo "$OPTS" |sed "s/,pty-intervall,/,pty-intervall=$INTERFACE,/g");; + *,pty-interval,*) OPTS=$(echo "$OPTS" |sed "s/,pty-interval,/,pty-interval=$INTERFACE,/g");; esac # RETRY case "$OPTS" in - *,intervall,*) OPTS=$(echo "$OPTS" |sed "s/,intervall,/,intervall=1,/g");; + *,interval,*) OPTS=$(echo "$OPTS" |sed "s/,interval,/,interval=1,/g");; esac # READLINE case "$OPTS" in @@ -4400,7 +4400,7 @@ da=$(date) # this is the server in the protected network that we want to reach CMD1="$SOCAT -lpserver $opts tcp4-l:$PORT,reuseaddr,bind=$LOCALHOST echo" # this is the double client in the protected network -CMD2="$SOCAT -lp2client $opts tcp4:$LOCALHOST:$((PORT+1)),retry=10,intervall=1 tcp4:$LOCALHOST:$PORT" +CMD2="$SOCAT -lp2client $opts tcp4:$LOCALHOST:$((PORT+1)),retry=10,interval=1 tcp4:$LOCALHOST:$PORT" # this is the double server in the outside network CMD3="$SOCAT -lp2server $opts tcp4-l:$((PORT+2)),reuseaddr,bind=$LOCALHOST tcp4-l:$((PORT+1)),reuseaddr,bind=$LOCALHOST" # this is the outside client that wants to use the protected server @@ -4461,7 +4461,7 @@ CMD2="$SOCAT $opts -lpproxy tcp4-l:$((PORT+1)),reuseaddr,bind=$LOCALHOST,fork ex # this is our proxy connect wrapper in the protected network CMD3="$SOCAT $opts -lpwrapper tcp4-l:$((PORT+2)),reuseaddr,bind=$LOCALHOST,fork proxy:$LOCALHOST:$LOCALHOST:$((PORT+3)),pf=ip4,proxyport=$((PORT+1)),resolve" # this is our double client in the protected network using SSL -#CMD4="$SOCAT $opts -lp2client ssl:$LOCALHOST:$((PORT+2)),pf=ip4,retry=10,intervall=1,cert=testcli.pem,cafile=testsrv.crt,$SOCAT_EGD tcp4:$LOCALHOST:$PORT" +#CMD4="$SOCAT $opts -lp2client ssl:$LOCALHOST:$((PORT+2)),pf=ip4,retry=10,interval=1,cert=testcli.pem,cafile=testsrv.crt,$SOCAT_EGD tcp4:$LOCALHOST:$PORT" CMD4="$SOCAT $opts -lp2client ssl:$LOCALHOST:$((PORT+2)),pf=ip4,cert=testcli.pem,cafile=testsrv.crt,$SOCAT_EGD tcp4:$LOCALHOST:$PORT" # this is the double server in the outside network CMD5="$SOCAT $opts -lp2server -t1 tcp4-l:$((PORT+4)),reuseaddr,bind=$LOCALHOST ssl-l:$((PORT+3)),pf=ip4,reuseaddr,bind=$LOCALHOST,$SOCAT_EGD,cert=testsrv.pem,cafile=testcli.crt" @@ -4541,7 +4541,7 @@ CMD2="$SOCAT $opts -lpproxy -t1 tcp4-l:$((PORT+1)),reuseaddr,bind=$LOCALHOST,for # this is our proxy connect wrapper in the protected network CMD3="$SOCAT $opts -lpwrapper -t3 tcp4-l:$((PORT+2)),reuseaddr,bind=$LOCALHOST,fork proxy:$LOCALHOST:$LOCALHOST:$((PORT+3)),pf=ip4,proxyport=$((PORT+1)),resolve" # this is our double client in the protected network using SSL -CMD4="$SOCAT $opts -lp2client -t3 ssl:$LOCALHOST:$((PORT+2)),retry=10,intervall=1,cert=testcli.pem,cafile=testsrv.crt,verify,fork,$SOCAT_EGD tcp4:$LOCALHOST:$PORT" +CMD4="$SOCAT $opts -lp2client -t3 ssl:$LOCALHOST:$((PORT+2)),retry=10,interval=1,cert=testcli.pem,cafile=testsrv.crt,verify,fork,$SOCAT_EGD tcp4:$LOCALHOST:$PORT" # this is the double server in the outside network CMD5="$SOCAT $opts -lp2server -t4 tcp4-l:$((PORT+4)),reuseaddr,bind=$LOCALHOST,fork ssl-l:$((PORT+3)),pf=ip4,reuseaddr,bind=$LOCALHOST,$SOCAT_EGD,cert=testsrv.pem,cafile=testcli.crt,retry=10" # this is the outside client that wants to use the protected server diff --git a/xio-pty.c b/xio-pty.c index fabc32f..290f676 100644 --- a/xio-pty.c +++ b/xio-pty.c @@ -1,5 +1,5 @@ /* source: xio-pty.c */ -/* Copyright Gerhard Rieger 2002-2007 */ +/* Copyright Gerhard Rieger 2002-2008 */ /* Published under the GNU General Public License V.2, see file COPYING */ /* this file contains the source for creating pty addresses */ @@ -25,7 +25,7 @@ const struct addrdesc addr_pty = { "pty", 3, xioopen_pty, GROUP_NAMED|GROUP_FD const struct optdesc opt_symbolic_link = { "symbolic-link", "link", OPT_SYMBOLIC_LINK, GROUP_PTY, PH_LATE, TYPE_FILENAME, OFUNC_SPEC, 0, 0 }; #if HAVE_POLL const struct optdesc opt_pty_wait_slave = { "pty-wait-slave", "wait-slave", OPT_PTY_WAIT_SLAVE, GROUP_PTY, PH_EARLY, TYPE_BOOL, OFUNC_SPEC, 0, 0 }; -const struct optdesc opt_pty_intervall = { "pty-intervall", NULL, OPT_PTY_INTERVALL, GROUP_PTY, PH_EARLY, TYPE_TIMESPEC, OFUNC_SPEC, 0, 0 }; +const struct optdesc opt_pty_intervall = { "pty-interval", NULL, OPT_PTY_INTERVALL, GROUP_PTY, PH_EARLY, TYPE_TIMESPEC, OFUNC_SPEC, 0, 0 }; #endif /* HAVE_POLL */ static int xioopen_pty(int argc, const char *argv[], struct opt *opts, int xioflags, xiofile_t *xfd, unsigned groups, int dummy1, int dummy2, int dummy3) { diff --git a/xiolayer.c b/xiolayer.c index ff34823..4801b92 100644 --- a/xiolayer.c +++ b/xiolayer.c @@ -1,5 +1,5 @@ /* source: xiolayer.c */ -/* Copyright Gerhard Rieger 2001-2005 */ +/* Copyright Gerhard Rieger 2001-2008 */ /* Published under the GNU General Public License V.2, see file COPYING */ /* this file contains the source for common options */ @@ -19,7 +19,7 @@ const struct optdesc opt_waitlock = { "waitlock", NULL, OPT_WAITLOCK, GROUP_A /****** APPL addresses ******/ #if WITH_RETRY const struct optdesc opt_forever = { "forever", NULL, OPT_FOREVER, GROUP_RETRY, PH_INIT, TYPE_BOOL, OFUNC_EXT, (int)(&((struct single *)0)->forever), sizeof(((struct single *)0)->forever) }; -const struct optdesc opt_intervall = { "intervall", NULL, OPT_INTERVALL, GROUP_RETRY, PH_INIT, TYPE_TIMESPEC, OFUNC_EXT, (int)(&((struct single *)0)->intervall), sizeof(((struct single *)0)->intervall) }; +const struct optdesc opt_intervall = { "interval", NULL, OPT_INTERVALL, GROUP_RETRY, PH_INIT, TYPE_TIMESPEC, OFUNC_EXT, (int)(&((struct single *)0)->intervall), sizeof(((struct single *)0)->intervall) }; const struct optdesc opt_retry = { "retry", NULL, OPT_RETRY, GROUP_RETRY, PH_INIT, TYPE_UINT, OFUNC_EXT, (int)(&((struct single *)0)->retry), sizeof(((struct single *)0)->retry) }; #endif diff --git a/xioopts.c b/xioopts.c index 6345a72..57c4f47 100644 --- a/xioopts.c +++ b/xioopts.c @@ -1,5 +1,5 @@ /* source: xioopts.c */ -/* Copyright Gerhard Rieger 2001-2007 */ +/* Copyright Gerhard Rieger 2001-2008 */ /* Published under the GNU General Public License V.2, see file COPYING */ /* this file contains the source for address options handling */ @@ -580,6 +580,7 @@ const struct optname optionnames[] = { #ifdef SO_BINDTODEVICE IF_SOCKET ("interface", &opt_so_bindtodevice) #endif + IF_RETRY ("interval", &opt_intervall) IF_RETRY ("intervall", &opt_intervall) IF_TERMIOS("intr", &opt_vintr) #ifdef IP_ADD_MEMBERSHIP @@ -1061,6 +1062,7 @@ const struct optname optionnames[] = { IF_EXEC ("pty", &opt_pty) #endif #if HAVE_PTY && HAVE_POLL + IF_PTY ("pty-interval", &opt_pty_intervall) IF_PTY ("pty-intervall", &opt_pty_intervall) IF_PTY ("pty-wait-slave", &opt_pty_wait_slave) #endif /* HAVE_PTY && HAVE_POLL */