mirror of
https://repo.or.cz/socat.git
synced 2024-12-22 23:42:34 +00:00
Options so-rcvtimeo and so-sndtimeo do not work with poll()
This commit is contained in:
parent
40f6fa29e1
commit
9f41543aad
6 changed files with 4 additions and 30 deletions
4
CHANGES
4
CHANGES
|
@ -39,6 +39,10 @@ corrections:
|
||||||
Test: UDP4MAXCHILDREN UDP6MAXCHILDREN
|
Test: UDP4MAXCHILDREN UDP6MAXCHILDREN
|
||||||
Thanks to Leander Berwers for reporting this issue.
|
Thanks to Leander Berwers for reporting this issue.
|
||||||
|
|
||||||
|
Options so-rcvtimeo and so-sndtimeo do not work with poll()/select()
|
||||||
|
and therefore were useless.
|
||||||
|
Thanks to Steve Borenstein for reporting this issue.
|
||||||
|
|
||||||
porting:
|
porting:
|
||||||
Type conflict between int and sig_atomic_t between declaration and
|
Type conflict between int and sig_atomic_t between declaration and
|
||||||
definition of diag_immediate_type and diag_immediate_exit broke
|
definition of diag_immediate_type and diag_immediate_exit broke
|
||||||
|
|
|
@ -1850,8 +1850,6 @@ label(OPTION_RCVBUF_LATE)dit(bf(tt(rcvbuf-late=<bytes>)))
|
||||||
label(OPTION_RCVLOWAT)dit(bf(tt(rcvlowat=<bytes>)))
|
label(OPTION_RCVLOWAT)dit(bf(tt(rcvlowat=<bytes>)))
|
||||||
Specifies the minimum number of received bytes [link(int)(TYPE_INT)] until
|
Specifies the minimum number of received bytes [link(int)(TYPE_INT)] until
|
||||||
the socket layer will pass the buffered data to socat().
|
the socket layer will pass the buffered data to socat().
|
||||||
label(OPTION_RCVTIMEO)dit(bf(tt(rcvtimeo=<seconds>)))
|
|
||||||
Sets the receive timeout [link(timeval)(TYPE_TIMEVAL)].
|
|
||||||
label(OPTION_REUSEADDR)dit(bf(tt(reuseaddr)))
|
label(OPTION_REUSEADDR)dit(bf(tt(reuseaddr)))
|
||||||
Allows other sockets to bind to an address even if parts of it (e.g. the
|
Allows other sockets to bind to an address even if parts of it (e.g. the
|
||||||
local port) are already in use by socat() (link(example)(EXAMPLE_OPTION_REUSEADDR)).
|
local port) are already in use by socat() (link(example)(EXAMPLE_OPTION_REUSEADDR)).
|
||||||
|
@ -1864,8 +1862,6 @@ label(OPTION_SNDBUF_LATE)dit(bf(tt(sndbuf-late=<bytes>)))
|
||||||
label(OPTION_SNDLOWAT)dit(bf(tt(sndlowat=<bytes>)))
|
label(OPTION_SNDLOWAT)dit(bf(tt(sndlowat=<bytes>)))
|
||||||
Specifies the minimum number of bytes in the send buffer until the socket
|
Specifies the minimum number of bytes in the send buffer until the socket
|
||||||
layer will send the data to <bytes> [link(int)(TYPE_INT)].
|
layer will send the data to <bytes> [link(int)(TYPE_INT)].
|
||||||
label(OPTION_SNDTIMEO)dit(bf(tt(sndtimeo=<seconds>)))
|
|
||||||
Sets the send timeout to seconds [link(timeval)(TYPE_TIMEVAL)].
|
|
||||||
label(OPTION_PROTOCOL_FAMILY)dit(bf(tt(pf=<string>)))
|
label(OPTION_PROTOCOL_FAMILY)dit(bf(tt(pf=<string>)))
|
||||||
Forces the use of the specified IP version or protocol. <string> can be
|
Forces the use of the specified IP version or protocol. <string> can be
|
||||||
something like "ip4" or "ip6". The resulting value is
|
something like "ip4" or "ip6". The resulting value is
|
||||||
|
|
6
test.sh
6
test.sh
|
@ -512,12 +512,6 @@ filloptionvalues() {
|
||||||
*,linger,*) OPTS=$(echo "$OPTS" |sed "s/,linger,/,linger=2,/g");;
|
*,linger,*) OPTS=$(echo "$OPTS" |sed "s/,linger,/,linger=2,/g");;
|
||||||
esac
|
esac
|
||||||
case "$OPTS" in
|
case "$OPTS" in
|
||||||
*,rcvtimeo,*) OPTS=$(echo "$OPTS" |sed "s/,rcvtimeo,/,rcvtimeo=1,/g");;
|
|
||||||
esac
|
|
||||||
case "$OPTS" in
|
|
||||||
*,sndtimeo,*) OPTS=$(echo "$OPTS" |sed "s/,sndtimeo,/,sndtimeo=1,/g");;
|
|
||||||
esac
|
|
||||||
case "$OPTS" in
|
|
||||||
*,connect-timeout,*) OPTS=$(echo "$OPTS" |sed "s/,connect-timeout,/,connect-timeout=1,/g");;
|
*,connect-timeout,*) OPTS=$(echo "$OPTS" |sed "s/,connect-timeout,/,connect-timeout=1,/g");;
|
||||||
esac
|
esac
|
||||||
# IP
|
# IP
|
||||||
|
|
|
@ -103,15 +103,9 @@ const struct optdesc opt_so_dontroute= { "so-dontroute", "dontroute", OPT_SO_DON
|
||||||
#ifdef SO_RCVLOWAT
|
#ifdef SO_RCVLOWAT
|
||||||
const struct optdesc opt_so_rcvlowat = { "so-rcvlowat", "rcvlowat", OPT_SO_RCVLOWAT, GROUP_SOCKET, PH_PASTSOCKET, TYPE_INT, OFUNC_SOCKOPT, SOL_SOCKET, SO_RCVLOWAT };
|
const struct optdesc opt_so_rcvlowat = { "so-rcvlowat", "rcvlowat", OPT_SO_RCVLOWAT, GROUP_SOCKET, PH_PASTSOCKET, TYPE_INT, OFUNC_SOCKOPT, SOL_SOCKET, SO_RCVLOWAT };
|
||||||
#endif
|
#endif
|
||||||
#ifdef SO_RCVTIMEO
|
|
||||||
const struct optdesc opt_so_rcvtimeo = { "so-rcvtimeo", "rcvtimeo", OPT_SO_RCVTIMEO, GROUP_SOCKET, PH_PASTSOCKET, TYPE_TIMEVAL,OFUNC_SOCKOPT,SOL_SOCKET,SO_RCVTIMEO };
|
|
||||||
#endif
|
|
||||||
#ifdef SO_SNDLOWAT
|
#ifdef SO_SNDLOWAT
|
||||||
const struct optdesc opt_so_sndlowat = { "so-sndlowat", "sndlowat", OPT_SO_SNDLOWAT, GROUP_SOCKET, PH_PASTSOCKET, TYPE_INT, OFUNC_SOCKOPT, SOL_SOCKET, SO_SNDLOWAT };
|
const struct optdesc opt_so_sndlowat = { "so-sndlowat", "sndlowat", OPT_SO_SNDLOWAT, GROUP_SOCKET, PH_PASTSOCKET, TYPE_INT, OFUNC_SOCKOPT, SOL_SOCKET, SO_SNDLOWAT };
|
||||||
#endif
|
#endif
|
||||||
#ifdef SO_SNDTIMEO
|
|
||||||
const struct optdesc opt_so_sndtimeo = { "so-sndtimeo", "sndtimeo", OPT_SO_SNDTIMEO, GROUP_SOCKET, PH_PASTSOCKET, TYPE_TIMEVAL,OFUNC_SOCKOPT,SOL_SOCKET,SO_SNDTIMEO };
|
|
||||||
#endif
|
|
||||||
/* end of setsockopt options of UNIX98 standard */
|
/* end of setsockopt options of UNIX98 standard */
|
||||||
|
|
||||||
#ifdef SO_AUDIT /* AIX 4.3.3 */
|
#ifdef SO_AUDIT /* AIX 4.3.3 */
|
||||||
|
|
|
@ -35,9 +35,7 @@ extern const struct optdesc opt_so_error;
|
||||||
extern const struct optdesc opt_so_type;
|
extern const struct optdesc opt_so_type;
|
||||||
extern const struct optdesc opt_so_dontroute;
|
extern const struct optdesc opt_so_dontroute;
|
||||||
extern const struct optdesc opt_so_rcvlowat;
|
extern const struct optdesc opt_so_rcvlowat;
|
||||||
extern const struct optdesc opt_so_rcvtimeo;
|
|
||||||
extern const struct optdesc opt_so_sndlowat;
|
extern const struct optdesc opt_so_sndlowat;
|
||||||
extern const struct optdesc opt_so_sndtimeo;
|
|
||||||
extern const struct optdesc opt_so_audit;
|
extern const struct optdesc opt_so_audit;
|
||||||
extern const struct optdesc opt_so_attach_filter;
|
extern const struct optdesc opt_so_attach_filter;
|
||||||
extern const struct optdesc opt_so_detach_filter;
|
extern const struct optdesc opt_so_detach_filter;
|
||||||
|
|
12
xioopts.c
12
xioopts.c
|
@ -1202,9 +1202,6 @@ const struct optname optionnames[] = {
|
||||||
IF_SOCKET ("rcvbuf-late", &opt_so_rcvbuf_late)
|
IF_SOCKET ("rcvbuf-late", &opt_so_rcvbuf_late)
|
||||||
#ifdef SO_RCVLOWAT
|
#ifdef SO_RCVLOWAT
|
||||||
IF_SOCKET ("rcvlowat", &opt_so_rcvlowat)
|
IF_SOCKET ("rcvlowat", &opt_so_rcvlowat)
|
||||||
#endif
|
|
||||||
#ifdef SO_RCVTIMEO
|
|
||||||
IF_SOCKET ("rcvtimeo", &opt_so_rcvtimeo)
|
|
||||||
#endif
|
#endif
|
||||||
IF_OPEN ("rdonly", &opt_o_rdonly)
|
IF_OPEN ("rdonly", &opt_o_rdonly)
|
||||||
IF_OPEN ("rdwr", &opt_o_rdwr)
|
IF_OPEN ("rdwr", &opt_o_rdwr)
|
||||||
|
@ -1374,9 +1371,6 @@ const struct optname optionnames[] = {
|
||||||
#ifdef SO_SNDLOWAT
|
#ifdef SO_SNDLOWAT
|
||||||
IF_SOCKET ("sndlowat", &opt_so_sndlowat)
|
IF_SOCKET ("sndlowat", &opt_so_sndlowat)
|
||||||
#endif
|
#endif
|
||||||
#ifdef SO_SNDTIMEO
|
|
||||||
IF_SOCKET ("sndtimeo", &opt_so_sndtimeo)
|
|
||||||
#endif
|
|
||||||
#ifdef SO_ACCEPTCONN /* AIX433 */
|
#ifdef SO_ACCEPTCONN /* AIX433 */
|
||||||
IF_SOCKET ("so-acceptconn", &opt_so_acceptconn)
|
IF_SOCKET ("so-acceptconn", &opt_so_acceptconn)
|
||||||
#endif /* SO_ACCEPTCONN */
|
#endif /* SO_ACCEPTCONN */
|
||||||
|
@ -1436,9 +1430,6 @@ const struct optname optionnames[] = {
|
||||||
IF_SOCKET ("so-rcvbuf-late", &opt_so_rcvbuf_late)
|
IF_SOCKET ("so-rcvbuf-late", &opt_so_rcvbuf_late)
|
||||||
#ifdef SO_RCVLOWAT
|
#ifdef SO_RCVLOWAT
|
||||||
IF_SOCKET ("so-rcvlowat", &opt_so_rcvlowat)
|
IF_SOCKET ("so-rcvlowat", &opt_so_rcvlowat)
|
||||||
#endif
|
|
||||||
#ifdef SO_RCVTIMEO
|
|
||||||
IF_SOCKET ("so-rcvtimeo", &opt_so_rcvtimeo)
|
|
||||||
#endif
|
#endif
|
||||||
IF_SOCKET ("so-reuseaddr", &opt_so_reuseaddr)
|
IF_SOCKET ("so-reuseaddr", &opt_so_reuseaddr)
|
||||||
#ifdef SO_REUSEPORT /* AIX 4.3.3 */
|
#ifdef SO_REUSEPORT /* AIX 4.3.3 */
|
||||||
|
@ -1458,9 +1449,6 @@ const struct optname optionnames[] = {
|
||||||
#ifdef SO_SNDLOWAT
|
#ifdef SO_SNDLOWAT
|
||||||
IF_SOCKET ("so-sndlowat", &opt_so_sndlowat)
|
IF_SOCKET ("so-sndlowat", &opt_so_sndlowat)
|
||||||
#endif
|
#endif
|
||||||
#ifdef SO_SNDTIMEO
|
|
||||||
IF_SOCKET ("so-sndtimeo", &opt_so_sndtimeo)
|
|
||||||
#endif
|
|
||||||
#ifdef SO_TIMESTAMP
|
#ifdef SO_TIMESTAMP
|
||||||
IF_SOCKET ("so-timestamp", &opt_so_timestamp)
|
IF_SOCKET ("so-timestamp", &opt_so_timestamp)
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue