mirror of
https://repo.or.cz/socat.git
synced 2025-05-23 13:12:41 +00:00
Corrected lots of misspellings etc.
This commit is contained in:
parent
d9d06eb587
commit
52e2e5a277
36 changed files with 108 additions and 1896 deletions
CHANGESCHANGES.ISO-8859-1EXAMPLESFAQPORTINGREADME.FIPSSECURITYconfigure.ac
doc
error.hfilan_main.creadline-test.shsocat.csysutils.ctest.shxio-ascii.cxio-fs.cxio-interface.cxio-ip.cxio-ip6.cxio-ipapp.cxio-openssl.cxio-openssl.hxio-socket.cxio-stdio.cxio-streams.cxio-tcpwrap.cxio-termios.cxio-tun.cxio-udp.cxio-unix.cxio.hxioinitialize.cxioopts.cxioopts.h
59
CHANGES
59
CHANGES
|
@ -110,7 +110,7 @@ Features:
|
|||
|
||||
Procan tells if char is signed or unsigned
|
||||
|
||||
Socat now prints an info message when implicitely setting SO_REUSEADDR.
|
||||
Socat now prints an info message when implicitly setting SO_REUSEADDR.
|
||||
Thanks to Michael Renner for this suggestion.
|
||||
|
||||
Added generic options setsockopt-socket and setsockopt-connected that
|
||||
|
@ -152,6 +152,12 @@ Testing:
|
|||
|
||||
Newer Linux distributions now deprecate usleep; replaced it in test.sh
|
||||
|
||||
Documentation:
|
||||
Removed obsolete CHANGES.ISO-8859-1 file.
|
||||
|
||||
Corrected lots of misspelling and typos.
|
||||
Thanks to Mario de Weerd for reporting these issues.
|
||||
|
||||
####################### V 1.8.0.2:
|
||||
|
||||
Security:
|
||||
|
@ -223,6 +229,9 @@ Corrections:
|
|||
Print warning about not checking CRLs in OpenSSL only in the first
|
||||
child process.
|
||||
|
||||
Fixed preprocessor directives in macro invocation.
|
||||
Thanks to Mario de Weerd for reporting this issue.
|
||||
|
||||
Features:
|
||||
Total inactivity timeout option -T 0 now means 0.0 seconds; up to
|
||||
version 1.8.0.0 it meant no total inactivity timeout.
|
||||
|
@ -390,11 +399,11 @@ Features:
|
|||
no IP version is preferred by build, environment, option, or address
|
||||
type, Socat chooses IPv6 because this might activate both versions (but
|
||||
check option ipv6-v6only).
|
||||
Added option ai-passive to control this flag explicitely.
|
||||
Added option ai-passive to control this flag explicitly.
|
||||
|
||||
New option ai-v4mapped (v4mapped) sets or unsets the AI_V4MAPPED flag
|
||||
of the resolver. For Socat addresses requiring IPv6 addresses, this
|
||||
resolves IPv4 addresses to the approriate IPv6 address [::ffff:*:*].
|
||||
resolves IPv4 addresses to the appropriate IPv6 address [::ffff:*:*].
|
||||
|
||||
DNS resolver Options (res-*) are now set for the complete open phase of
|
||||
the address, not per getaddrinfo() invocation.
|
||||
|
@ -587,14 +596,14 @@ Porting:
|
|||
Some corrections for better 32bit systems support.
|
||||
|
||||
Testing:
|
||||
Removed obselete parts from test.sh
|
||||
Removed obsolete parts from test.sh
|
||||
|
||||
test.sh: Introduced function checkcond
|
||||
|
||||
Renamed test.sh option -foreign to -internet
|
||||
|
||||
Documentation:
|
||||
Removed obselete file doc/xio.help
|
||||
Removed obsolete file doc/xio.help
|
||||
|
||||
Added doc for option ipv6-join-group (ipv6-add-membership)
|
||||
Thanks to Martin Buck for sending the patch.
|
||||
|
@ -607,7 +616,7 @@ Documentation:
|
|||
|
||||
Corrections:
|
||||
On connect() failure and in some other situations Socat tries to get
|
||||
detailled information about the error with recvmsg(). Error return of
|
||||
detailed information about the error with recvmsg(). Error return of
|
||||
this function is now logged as Info instead of Warn.
|
||||
|
||||
Tests of the correction of the "IP_ADD_SOURCE_MEMBERSHIP but not struct
|
||||
|
@ -651,7 +660,7 @@ Corrections:
|
|||
Thanks to Gordon W.Ross for reporting and fixing this issue.
|
||||
Test: RESTORE_TTY
|
||||
|
||||
The OpenSSL client SNI parameter, when not explicitely specified, is
|
||||
The OpenSSL client SNI parameter, when not explicitly specified, is
|
||||
derived from option commonname or rom target server name. This is not
|
||||
useful with IP addresses, which Socat now checks and avoids.
|
||||
|
||||
|
@ -682,7 +691,7 @@ Coding:
|
|||
|
||||
fcntl() trace prints flags now in hexadecimal.
|
||||
|
||||
Stream dump options -r and -R now open their pathes with CLOEXEC to
|
||||
Stream dump options -r and -R now open their paths with CLOEXEC to
|
||||
prevent leaking into sub processes.
|
||||
Test: EXEC_SNIFF
|
||||
|
||||
|
@ -981,7 +990,7 @@ Corrections:
|
|||
Print a message when readbytes option causes EOF
|
||||
|
||||
The ip-recverr option had no effect. Corrected and improved its
|
||||
handling of ancilliary messages, so it is able to analyze ICMP error
|
||||
handling of ancillary messages, so it is able to analyze ICMP error
|
||||
packets (Linux only?)
|
||||
|
||||
Setgui(), Setuid() calls in xio-progcall.c were useless.
|
||||
|
@ -1119,7 +1128,7 @@ Porting:
|
|||
ai_protocol=0 and try again
|
||||
Test: SCTP_SERVICENAME
|
||||
|
||||
Per file filesystem options were still named ext2-* and depended on
|
||||
Per file filesystem options were still named ext2-* and dependent on
|
||||
<linux/ext2_fs.h>. Now they are called fs-* and depend on <linux/fs.h>.
|
||||
These fs-* options are also available on old systems with ext2_fs.h
|
||||
|
||||
|
@ -1132,14 +1141,14 @@ Porting:
|
|||
SSL_library_init.
|
||||
|
||||
With OPENSSL_API_COMPAT=0x10000000L the files openssl/dh.h, openssl/bn.h
|
||||
must explicitely be included.
|
||||
must explicitly be included.
|
||||
Thanks to Rosen Penev for reporting and sending a patch.
|
||||
|
||||
Testing:
|
||||
test.sh now produces a list of tests that could not be performed for
|
||||
any reason. This helps to analyse these cases.
|
||||
|
||||
OpenSSL s_server appearently started to neglect TCPs half close feature.
|
||||
OpenSSL s_server apparently started to neglect TCPs half close feature.
|
||||
Test OPENSSL_TCP4 has been changed to tolerate this.
|
||||
|
||||
OpenSSL changed its behaviour when connection is rejected. Tests
|
||||
|
@ -1333,7 +1342,7 @@ Corrections:
|
|||
Porting:
|
||||
OpenSSL functions TLS1_client_method() and similar are
|
||||
deprecated. Socat now uses recommended TLS_client_method(). The old
|
||||
functions and dependend option openssl-method can still be
|
||||
functions and dependent option openssl-method can still be
|
||||
used when configuring socat with --enable-openssl-method
|
||||
|
||||
Shell scripts in socat distribution are now headed with:
|
||||
|
@ -1375,7 +1384,7 @@ Testing:
|
|||
More corrections to test.sh:
|
||||
Language settings could still influence test results
|
||||
netstat was still required
|
||||
Suppress usleep deprecated messag
|
||||
Suppress usleep deprecated message
|
||||
Force use of IPv4 with some certificates
|
||||
Set timeout for UDPxMAXCHILDREN tests
|
||||
|
||||
|
@ -1528,7 +1537,7 @@ testing:
|
|||
|
||||
docu:
|
||||
Corrected source of socat man page to correctly show man references
|
||||
like socket(2); removed obseolete entries from See Also
|
||||
like socket(2); removed obsolete entries from See Also
|
||||
|
||||
Docu and some comments mentioned addresses SSL-LISTEN and SSL-CONNECT
|
||||
that do not exist (OPENSSL-LISTEN, SSL-L; and OPENNSSL-CONNECT, SSL
|
||||
|
@ -1571,7 +1580,7 @@ security:
|
|||
parameters were chosen, the existence of a trapdoor that makes possible
|
||||
for an eavesdropper to recover the shared secret from a key exchange
|
||||
that uses them cannot be ruled out.
|
||||
Futhermore, 1024bit is not considered sufficiently secure.
|
||||
Furthermore, 1024bit is not considered sufficiently secure.
|
||||
Fix: generated a new 2048bit prime.
|
||||
Thanks to Santiago Zanella-Beguelin and Microsoft Vulnerability
|
||||
Research (MSVR) for finding and reporting this issue.
|
||||
|
@ -1585,7 +1594,7 @@ security:
|
|||
safe functions in signal handlers that could freeze socat, allowing
|
||||
denial of service attacks.
|
||||
Many changes in signal handling and the diagnostic messages system were
|
||||
applied to make the code async signal safe but still provide detailled
|
||||
applied to make the code async signal safe but still provide detailed
|
||||
logging from signal handlers:
|
||||
Coded function vsnprintf_r() as async signal safe incomplete substitute
|
||||
of libc vsnprintf()
|
||||
|
@ -1673,7 +1682,7 @@ corrections:
|
|||
Issue reported by Hendrik.
|
||||
|
||||
Added option termios-cfmakeraw that calls cfmakeraw() and is preferred
|
||||
over option raw which is now obsolote. On SysV systems this call is
|
||||
over option raw which is now obsolete. On SysV systems this call is
|
||||
simulated by appropriate setting.
|
||||
Thanks to Youfu Zhang for reporting issue with option raw.
|
||||
|
||||
|
@ -1686,7 +1695,7 @@ porting:
|
|||
Thanks to Ross Burton and Danomi Manchego for reporting this issue.
|
||||
|
||||
Debian Bug#764251: Set the build timestamp to a deterministic time:
|
||||
support external BUILD_DATE env var to allow to build reproducable
|
||||
support external BUILD_DATE env var to allow to build reproducible
|
||||
binaries
|
||||
|
||||
Joachim Fenkes provided an new adapted spec file.
|
||||
|
@ -1807,7 +1816,7 @@ porting:
|
|||
autoconf now prefers configure.ac over configure.in
|
||||
Thanks to Michael Vastola for sending a patch.
|
||||
|
||||
type of struct cmsghdr.cmsg is system dependend, determine it with
|
||||
type of struct cmsghdr.cmsg is system dependent, determine it with
|
||||
configure; some more print format corrections
|
||||
|
||||
docu:
|
||||
|
@ -1861,7 +1870,7 @@ corrections:
|
|||
socket using address GOPEN. Thanks to Martin Forssen for bug report and
|
||||
patch.
|
||||
|
||||
UDP-LISTEN would alway set SO_REUSEADDR even without fork option and
|
||||
UDP-LISTEN would always set SO_REUSEADDR even without fork option and
|
||||
when user set it to 0. Thanks to Michal Svoboda for reporting this bug.
|
||||
|
||||
UNIX-CONNECT did not support half-close. Thanks to Greg Hughes who
|
||||
|
@ -2094,7 +2103,7 @@ new features:
|
|||
|
||||
added generic socket addresses: SOCKET-CONNECT, SOCKET-LISTEN,
|
||||
SOCKET-SENDTO, SOCKET-RECVFROM, SOCKET-RECV, SOCKET-DATAGRAM allow
|
||||
protocol independent socket handling; all parameters are explicitely
|
||||
protocol independent socket handling; all parameters are explicitly
|
||||
specified as numbers or hex data
|
||||
|
||||
added address options ioctl-void, ioctl-int, ioctl-intp, ioctl-string,
|
||||
|
@ -2167,7 +2176,7 @@ corrections:
|
|||
this bug). test: EXECSPACES
|
||||
|
||||
in ignoreeof polling mode socat also blocked data transfer in the other
|
||||
direction during the 1s wait intervalls (thanks to Jorgen Cederlof for
|
||||
direction during the 1s wait intervals (thanks to Jorgen Cederlof for
|
||||
reporting this bug)
|
||||
|
||||
corrected alphabetical order of options (proxy-auth)
|
||||
|
@ -2593,7 +2602,7 @@ corrections:
|
|||
|
||||
check for /proc at runtime, even if configure found it
|
||||
|
||||
src.rpm accidently supported SuSE instead of RedHat
|
||||
src.rpm accidentally supported SuSE instead of RedHat
|
||||
|
||||
####################### V 1.3.2.0:
|
||||
|
||||
|
@ -2869,7 +2878,7 @@ solved problems and bugs:
|
|||
SOLVED: now uses common TCP service resolver
|
||||
|
||||
PROBLEM: with PIPE, wrong FDs were shown for data transfer loop
|
||||
SOLVED: retrieval of FDs now pays respect to PIPE pecularities
|
||||
SOLVED: retrieval of FDs now pays respect to PIPE peculiarities
|
||||
|
||||
PROBLEM: using address EXEC against an address with IGNOREEOF, socat
|
||||
never terminated
|
||||
|
|
1800
CHANGES.ISO-8859-1
1800
CHANGES.ISO-8859-1
File diff suppressed because it is too large
Load diff
8
EXAMPLES
8
EXAMPLES
|
@ -67,7 +67,7 @@ $ socat \
|
|||
TCP-LISTEN:8000,crlf \
|
||||
SYSTEM:"echo HTTP/1.0 200; echo Content-Type\: text/plain; echo; cat"
|
||||
|
||||
// A less primitive HTTP echo server that sends back not only the reqest but
|
||||
// A less primitive HTTP echo server that sends back not only the request but
|
||||
// also server and client address and port. Might have portability issues with
|
||||
// echo
|
||||
$ socat -T 1 -d -d \
|
||||
|
@ -131,7 +131,7 @@ $ socat \
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Intrusion testing
|
||||
|
||||
// Found an XWindow Server behind IP filters with FTP data hole? (you are
|
||||
// Found an X-Window Server behind IP filters with FTP data hole? (you are
|
||||
// lucky!)
|
||||
// prepare your host:
|
||||
# rm -f /tmp/.X11-unix/X1
|
||||
|
@ -241,7 +241,7 @@ $ socat - /tmp/postoffice
|
|||
// Uses of filan
|
||||
// See what your operating system opens for you
|
||||
$ filan
|
||||
// or if that was too detailled
|
||||
// or if that was too detailed
|
||||
$ filan -s
|
||||
// See what file descriptors are passed via exec function
|
||||
$ socat - EXEC:"filan -s",nofork
|
||||
|
@ -342,7 +342,7 @@ socat \
|
|||
// three main versions for entering password:
|
||||
// 1) from your TTY; have 10 seconds to enter password:
|
||||
(sleep 10; echo "ls"; sleep 1) |socat - EXEC:'ssh server',pty
|
||||
// 2) from XWindows (DISPLAY !); again 10 seconds
|
||||
// 2) from X-Windows (DISPLAY !); again 10 seconds
|
||||
(sleep 10; echo "ls"; sleep 1) |socat - EXEC:'ssh server',pty,setsid
|
||||
// 3) from script
|
||||
(sleep 5; echo PASSWORD; echo ls; sleep 1) |./socat - EXEC:'ssh server',pty,setsid,ctty
|
||||
|
|
2
FAQ
2
FAQ
|
@ -60,7 +60,7 @@ Q: When I specify a dual address (two partial addresses linked with "!!") on
|
|||
the command line, I get some message "event not found", and my shell history
|
||||
has the line truncated. Not even protecting the '!'s with '\' helps.
|
||||
|
||||
A: '!' is appearently used by your shell as history expansion character. Say
|
||||
A: '!' is apparently used by your shell as history expansion character. Say
|
||||
"set +H" and add this line to your (bash) profile.
|
||||
|
||||
|
||||
|
|
2
PORTING
2
PORTING
|
@ -51,7 +51,7 @@ ACTIVE PHASE:
|
|||
. xioopts.h: enum e_optcode (sorted numerically/alphabetically by name)
|
||||
. xio-*.c: select the appropriate address file (e.g., xio-tcp.c for
|
||||
TCP-options) and make a record of type struct optdesc: opt_newoption
|
||||
. xio-*.h: the declation of struct optdesc
|
||||
. xio-*.h: the declaration of struct optdesc
|
||||
. xioopts.c: add records to struct optname optionnames for all appropriate
|
||||
names (sorted strictly ASCII for binary search)
|
||||
. filan.c: add the option to the appropriate array (sockopts, ipopts,
|
||||
|
|
|
@ -29,7 +29,7 @@ initializes things so after a fork, the child must reinitialize. When the
|
|||
ssl code detects a forks occur and if FIPS mode was enabled, it reinitializes
|
||||
FIPS by disabling and then enabling it again.
|
||||
|
||||
To produce Davids enviroment, do the following:
|
||||
To produce Davids environment, do the following:
|
||||
To build openssl
|
||||
download OpenSSL 0.9.7j-fips-dev from
|
||||
http://www.openssl.org/source/OpenSSL-fips-1.0.tar.gz
|
||||
|
|
2
SECURITY
2
SECURITY
|
@ -24,7 +24,7 @@ avoid accessing files in world-writable directories like /tmp
|
|||
|
||||
* When using socat with system, exec, or in a shell script, know what you do
|
||||
|
||||
* With system and exec, use absolute pathes or set the path option
|
||||
* With system and exec, use absolute paths or set the path option
|
||||
|
||||
* When starting programs with socat, consider using the chroot option (this
|
||||
requires root, so use the substuser option too).
|
||||
|
|
|
@ -39,7 +39,7 @@ AC_PROG_RANLIB
|
|||
AC_SUBST(AR)
|
||||
AC_CHECK_PROG(AR, ar, ar, gar)
|
||||
#
|
||||
# we need to explicitely call this here; otherwise, with --disable-libwrap we
|
||||
# we need to explicitly call this here; otherwise, with --disable-libwrap we
|
||||
# fail
|
||||
AC_LANG_COMPILER_REQUIRE()
|
||||
|
||||
|
@ -2250,7 +2250,7 @@ AC_TRY_COMPILE([#include <resolv.h>],
|
|||
|
||||
dnl "tcpd" "tcpwrappers"
|
||||
# on some platforms, raw linking with libwrap fails because allow_severity and
|
||||
# deny_severity are not explicitely defined. Thus we put the libwrap part to
|
||||
# deny_severity are not explicitly defined. Thus we put the libwrap part to
|
||||
# the end
|
||||
AC_MSG_CHECKING(whether to include libwrap support)
|
||||
AC_ARG_ENABLE(libwrap, [ --disable-libwrap disable libwrap support],
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<h2>Introduction</h2>
|
||||
<p>Beginning with version 1.7.0 socat provides means to freely control
|
||||
important aspects of socket handling. This allows to experiment with socket
|
||||
types and protocols that are not explicitely implemented in socat.
|
||||
types and protocols that are not explicitly implemented in socat.
|
||||
</p>
|
||||
|
||||
<p>The related socat features fall into three major categories:<p>
|
||||
|
@ -216,7 +216,7 @@ struct sockaddr_at {
|
|||
</p>
|
||||
|
||||
<p>The address family component must be omitted from the socket address because
|
||||
it is added by socat implicitely. The resulting hexadecimal representation of
|
||||
it is added by socat implicitly. The resulting hexadecimal representation of
|
||||
the target socket address is therefore:
|
||||
</p>
|
||||
<tt>x40x00xff00xf3x00x0000000000000000</tt>
|
||||
|
@ -287,7 +287,7 @@ struct sockaddr_at {
|
|||
and for bind and range options. The basis is the <tt>struct sockaddr_*</tt> for
|
||||
the respective address family that should be declared in the C include files.
|
||||
Please keep in mind that their first two bytes (<tt>sa_family</tt> and - on BSD
|
||||
- <tt>sa_len</tt>) are implicitely prepended by socat.</p>
|
||||
- <tt>sa_len</tt>) are implicitly prepended by socat.</p>
|
||||
|
||||
<h4>Linux on 32bit Intel:</h4>
|
||||
|
||||
|
|
14
doc/socat.yo
14
doc/socat.yo
|
@ -1301,7 +1301,7 @@ label(ADDRESS_TCP6_LISTEN)dit(bf(tt(TCP6-LISTEN:<port>)))
|
|||
link(ipv6only)(OPTION_IPV6_V6ONLY)nl()
|
||||
Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(LISTEN)(GROUP_LISTEN),link(CHILD)(GROUP_CHILD),link(RANGE)(GROUP_RANGE),link(IP6)(GROUP_IP6),link(TCP)(GROUP_TCP),link(RETRY)(GROUP_RETRY) nl()
|
||||
label(ADDRESS_TUN)dit(bf(tt(TUN[:<if-addr>/<bits>])))
|
||||
Creates a Linux TUN/TAP device and optionally assignes it the address and
|
||||
Creates a Linux TUN/TAP device and optionally assigns it the address and
|
||||
netmask given by the parameters. The resulting network interface is almost
|
||||
ready for use by other processes; socat serves its "wire side". This address
|
||||
requires read and write access to the tunnel cloning device, usually
|
||||
|
@ -2150,7 +2150,7 @@ label(OPTION_SETGID)dit(bf(tt(setgid=<group>)))
|
|||
processing the address. This call might require root privilege. Please note
|
||||
that this option does not drop other group related privileges.
|
||||
label(OPTION_SETGID_EARLY)dit(bf(tt(setgid-early=<group>)))
|
||||
Like link(setgit)(OPTION_SETGID) but is performed before opening the address.
|
||||
Like link(setgid)(OPTION_SETGID) but is performed before opening the address.
|
||||
label(OPTION_SETUID)dit(bf(tt(setuid=<user>)))
|
||||
Changes the link(<user>)(TYPE_USER) (owner) of the process after processing
|
||||
the address. This call might require root privilege. Please note that this
|
||||
|
@ -2203,7 +2203,7 @@ label(OPTION_NOECHO)dit(bf(tt(noecho=<pattern>)))
|
|||
Specifies a regular pattern for a prompt that prevents the following input
|
||||
line from being displayed on the screen and from being added to the history.
|
||||
The prompt is defined as the text that was output to the readline address
|
||||
after the lastest newline character and before an input character was
|
||||
after the last newline character and before an input character was
|
||||
typed. The pattern is a regular expression, e.g.
|
||||
"^[Pp]assword:.*$" or "([Uu]ser:|[Pp]assword:)". See NOEXPAND(regex(7)) for details.
|
||||
(link(example)(EXAMPLE_OPTION_NOECHO))
|
||||
|
@ -2382,7 +2382,7 @@ COMMENT(label(OPTION_SECURITYENCRYPTIONNETWORK)dit(bf(tt(securityencryptionnetwo
|
|||
COMMENT(label(OPTION_SECURITYENCRYPTIONTRANSPORT)dit(bf(tt(securityencryptiontransport)))
|
||||
Set the code(SO_SECURITY_ENCRYPTION_TRANSPORT) socket option.)
|
||||
COMMENT(label(OPTION_SIOCSPGRP)dit(bf(tt(siocspgrp=<pid_t>)))
|
||||
Set the SIOCSPGRP with code(ioclt()) to enable SIGIO.)
|
||||
Set the SIOCSPGRP with code(ioctl()) to enable SIGIO.)
|
||||
COMMENT(label(OPTION_USEIFBUFS)dit(bf(tt(useifbufs)))
|
||||
Set the code(SO_USE_IFBUFS) socket option.)
|
||||
label(OPTION_SO_TIMESTAMP)dit(bf(tt(so-timestamp)))
|
||||
|
@ -3365,7 +3365,7 @@ label(OPTION_OPENSSL_PSEUDO)dit(bf(tt(pseudo)))
|
|||
gathering daemon can be utilized, this option activates a mechanism for
|
||||
providing pseudo entropy. This is achieved by taking the current time in
|
||||
microseconds for feeding the libc pseudo random number generator with an
|
||||
initial value. openssl is then feeded with output from NOEXPAND(random()) calls.nl()
|
||||
initial value. openssl is then fed with output from NOEXPAND(random()) calls.nl()
|
||||
NOTE:This mechanism is not sufficient for generation of secure keys!
|
||||
label(OPTION_OPENSSL_COMPRESS)dit(bf(tt(compress)))
|
||||
Enable or disable the use of compression for a connection. Setting this to
|
||||
|
@ -3612,10 +3612,10 @@ label(TYPE_LONG)dit(long)
|
|||
label(TYPE_LONGLONG)dit(long long)
|
||||
A number read with code(strtoll()). The value must fit into a C long long.
|
||||
label(TYPE_OFF)dit(off_t)
|
||||
An implementation dependend signed number, usually 32 bits, read with strtol
|
||||
An implementation dependent signed number, usually 32 bits, read with strtol
|
||||
or strtoll.
|
||||
label(TYPE_OFF64)dit(off64_t)
|
||||
An implementation dependend signed number, usually 64 bits, read with strtol
|
||||
An implementation dependent signed number, usually 64 bits, read with strtol
|
||||
or strtoll.
|
||||
label(TYPE_MODE_T)dit(mode_t)
|
||||
An unsigned integer, read with code(strtoul()), specifying mode (permission)
|
||||
|
|
2
error.h
2
error.h
|
@ -183,7 +183,7 @@
|
|||
#define Debug18(m,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18)
|
||||
#endif /* !(WITH_MSGLEVEL <= E_DEBUG) */
|
||||
|
||||
/* message with software controlled serverity */
|
||||
/* message with software controlled severity */
|
||||
#if WITH_MSGLEVEL <= E_FATAL
|
||||
#define Msg(l,m) msg(l,"%s",m)
|
||||
#define Msg1(l,m,a1) msg(l,m,a1)
|
||||
|
|
|
@ -167,7 +167,7 @@ int main(int argc, const char *argv[]) {
|
|||
Nanosleep(&waittime, NULL);
|
||||
|
||||
if (style == 0) {
|
||||
/* this style gives detailled infos, but requires a file descriptor */
|
||||
/* This style gives detailed infos, but requires a file descriptor */
|
||||
if (filename) {
|
||||
#if LATER /* this is just in case that S_ISSOCK does not work */
|
||||
struct stat buf;
|
||||
|
|
|
@ -36,7 +36,7 @@ $ECHO
|
|||
|
||||
if [ "$USERNAME" != "$CREDUSER" -o "$PASSWORD" != "$CREDPASS" ]; then
|
||||
$ECHO "Authentication failed" >&2
|
||||
exit -1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while $ECHO "$PROMPT\c"; read -r COMMAND; do
|
||||
|
|
4
socat.c
4
socat.c
|
@ -785,7 +785,7 @@ int socat(const char *address1, const char *address2) {
|
|||
int i;
|
||||
for (i = 0; i < NUMUNKNOWN; ++i) {
|
||||
if (XIO_RDSTREAM(sock1)->para.exec.pid == diedunknown[i]) {
|
||||
/* child has alread died... but it might have put regular data into
|
||||
/* Child has already died... but it might have put regular data into
|
||||
the communication channel, so continue */
|
||||
Info2("child "F_pid" has already died with status %d",
|
||||
XIO_RDSTREAM(sock1)->para.exec.pid, statunknown[i]);
|
||||
|
@ -828,7 +828,7 @@ int socat(const char *address1, const char *address2) {
|
|||
int i;
|
||||
for (i = 0; i < NUMUNKNOWN; ++i) {
|
||||
if (XIO_RDSTREAM(sock2)->para.exec.pid == diedunknown[i]) {
|
||||
/* child has alread died... but it might have put regular data into
|
||||
/* Child has already died... but it might have put regular data into
|
||||
the communication channel, so continue */
|
||||
Info2("child "F_pid" has already died with status %d",
|
||||
XIO_RDSTREAM(sock2)->para.exec.pid, statunknown[i]);
|
||||
|
|
|
@ -580,7 +580,7 @@ int getusergroups(const char *user, gid_t *list, int *ngroups) {
|
|||
/* we prefer getgrouplist because it may be much faster with many groups, but it is not standard */
|
||||
gid_t grp, twogrps[2];
|
||||
int two = 2;
|
||||
/* getgrouplist requires to pass an extra group id, typically the users primary group, that is then added to the supplementary group list. We don't want such an additional group in the result, but there is not "unspecified" gid value available. Thus we try to find an abitrary supplementary group id that we then pass in a second call to getgrouplist. */
|
||||
/* getgrouplist requires to pass an extra group id, typically the users primary group, that is then added to the supplementary group list. We don't want such an additional group in the result, but there is not "unspecified" gid value available. Thus we try to find an arbitrary supplementary group id that we then pass in a second call to getgrouplist. */
|
||||
grp = 0;
|
||||
Getgrouplist(user, grp, twogrps, &two);
|
||||
if (two == 1) {
|
||||
|
|
37
test.sh
37
test.sh
|
@ -616,7 +616,7 @@ TF="$TD/socat-q"
|
|||
IFS="$($ECHO ' \n\t')"
|
||||
if ! $SOCAT -hhh >/dev/null; then
|
||||
echo "Failed: $SOCAT -hhh" >&2
|
||||
exit -1
|
||||
exit 2
|
||||
fi
|
||||
$SOCAT -hhh |sed -n '/^ address-head:/,/^ opts:/ p' |grep -v -e "^ address-head:" -e "^ opts:" |sed -e 's/^[[:space:]]*//' -e 's/[: ].*//' |grep -v '^<' >"$TF"
|
||||
$SOCAT -hhh |sed -n '/^ address-head:/,/^ opts:/ p' |grep -v -e "^ address-head:" -e "^ opts:" |sed -e 's/^[[:space:]]*//' -e 's/[: ].*//' |grep -v '^<' |LC_ALL=C sort |diff "$TF" - >"$TF-diff"
|
||||
|
@ -912,7 +912,7 @@ childprocess () {
|
|||
local l
|
||||
case "$1" in
|
||||
[1-9]*) ;;
|
||||
*) echo "childprocess \"$1\": not a number" >&2; exit -1 ;;
|
||||
*) echo "childprocess \"$1\": not a number" >&2; exit 2 ;;
|
||||
esac
|
||||
case "$UNAME" in
|
||||
AIX) l="$(ps -fade |grep "^........ ...... $(printf %6u $1)")" ;;
|
||||
|
@ -939,7 +939,7 @@ childpids () {
|
|||
if [ "X$1" = "X-r" ]; then recursive=1; shift; fi
|
||||
case "$1" in
|
||||
[1-9]*) ;;
|
||||
*) echo "childpids \"$1\": not a number" >&2; exit -1 ;;
|
||||
*) echo "childpids \"$1\": not a number" >&2; exit 2 ;;
|
||||
esac
|
||||
case "$UNAME" in
|
||||
AIX) l="$(ps -fade |grep "^........ ...... $(printf %6u $1)" |awk '{print($2);}')" ;;
|
||||
|
@ -2177,7 +2177,7 @@ N=$((N+1))
|
|||
NAME=DUALSTDIO
|
||||
case "$TESTS" in
|
||||
*%$N%*|*%functions%*|*%stdio%*|*%$NAME%*)
|
||||
TEST="$NAME: splitted form of stdio ('stdin!!stdout') with simple echo via internal pipe"
|
||||
TEST="$NAME: split form of stdio ('stdin!!stdout') with simple echo via internal pipe"
|
||||
testecho "$N" "$NAME" "$TEST" "stdin!!stdout" "pipe" "$opts"
|
||||
esac
|
||||
N=$((N+1))
|
||||
|
@ -2186,7 +2186,7 @@ N=$((N+1))
|
|||
NAME=DUALSHORTSTDIO
|
||||
case "$TESTS" in
|
||||
*%$N%*|*%functions%*|*%stdio%*|*%$NAME%*)
|
||||
TEST="$NAME: short splitted form of stdio ('-!!-') with simple echo via internal pipe"
|
||||
TEST="$NAME: short split form of stdio ('-!!-') with simple echo via internal pipe"
|
||||
testecho "$N" "$NAME" "$TEST" "-!!-" "pipe" "$opts"
|
||||
esac
|
||||
N=$((N+1))
|
||||
|
@ -9292,7 +9292,7 @@ N=$((N+1))
|
|||
|
||||
|
||||
# test: there is a bug with the readbytes option: when the socket delivered
|
||||
# exacly that many bytes as specified with readbytes and the stays idle (no
|
||||
# exactly that many bytes as specified with readbytes and the stays idle (no
|
||||
# more data, no EOF), socat waits for more data instead of generating EOF on
|
||||
# this in put stream.
|
||||
NAME=READBYTES_EOF
|
||||
|
@ -9336,7 +9336,7 @@ N=$((N+1))
|
|||
NAME=EXECPTYKILL
|
||||
case "$TESTS" in
|
||||
*%$N%*|*%functions%*|*%bugs%*|*%exec%*|*%pty%*|*%listen%*|*%unix%*|*%fork%*|*%$NAME%*)
|
||||
TEST="$NAME: exec:...,pty explicitely kills sub process"
|
||||
TEST="$NAME: exec:...,pty explicitly kills sub process"
|
||||
# we want to check if the exec'd sub process is killed in time
|
||||
# for this we have a shell script that generates a file after two seconds;
|
||||
# it should be killed after one second, so if the file was generated the test
|
||||
|
@ -11817,7 +11817,9 @@ N=$((N+1))
|
|||
|
||||
|
||||
if false; then # this overflow is not reliably reproducable
|
||||
# socat up to 2.0.0-b6 did not check the length of the PROXY-CONNECT command line paramters when copying them into the HTTP request buffer. This could lead to a buffer overflow.
|
||||
# Socat up to 2.0.0-b6 did not check the length of the PROXY-CONNECT command
|
||||
# line parameters when copying them into the HTTP request buffer. This could
|
||||
# lead to a buffer overflow.
|
||||
NAME=PROXY_ADDR_OVFL
|
||||
case "$TESTS" in
|
||||
*%$N%*|*%functions%*|*%bugs%*|*%security%*|*%socket%*|*%listen%*|*%$NAME%*)
|
||||
|
@ -12475,7 +12477,7 @@ case "$TESTS" in
|
|||
TEST="$NAME: SYSTEM address does not shutdown its parents addresses"
|
||||
# start an OpenSSL echo server using SYSTEM:cat
|
||||
# start an OpenSSL client that sends data
|
||||
# when the client recieves its data and terminates without error the test succeeded
|
||||
# when the client receives its data and terminates without error the test succeeded
|
||||
# in case of the bug the client issues an error like:
|
||||
# SSL_connect(): error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac
|
||||
if ! eval $NUMCOND; then :;
|
||||
|
@ -13139,7 +13141,7 @@ NAME=DIAG_FDIN
|
|||
case "$TESTS" in
|
||||
*%$N%*|*%functions%*|*%bugs%*|*%exec%*|*%$NAME%*)
|
||||
TEST="$NAME: test use of fdin=3"
|
||||
# Use FD 3 explicitely with fdin and test if Socat passes data to executed
|
||||
# Use FD 3 explicitly with fdin and test if Socat passes data to executed
|
||||
# program
|
||||
if ! eval $NUMCOND; then :; else
|
||||
tf="$td/test$N.stdout"
|
||||
|
@ -13449,7 +13451,9 @@ if [ $rc -ne 0 ] && grep -q "Invalid argument" "$te" && [ $UNAME = Linux ]; then
|
|||
echo "$CMD" >&2
|
||||
cat "$te" >&2
|
||||
failed ;;
|
||||
*) $PRINTF "${YELLOW}inable file system${NORMAL}\n"
|
||||
*) $PRINTF "${YELLOW}unsupported file system${NORMAL}\n"
|
||||
if [ "$VERBOSE" ]; then echo "$CMD"; fi
|
||||
if [ "$DEBUG" ]; then cat "${te}" >&2; fi
|
||||
cant ;;
|
||||
esac
|
||||
elif [ $rc -ne 0 ]; then
|
||||
|
@ -15133,7 +15137,7 @@ elif [ $rc1 -eq 139 ]; then
|
|||
cat "${te}" >&2
|
||||
failed
|
||||
else
|
||||
# soemthing unexpected happened
|
||||
# Something unexpected happened
|
||||
$PRINTF "$CANT\n"
|
||||
echo "$CMD"
|
||||
cat "${te}" >&2
|
||||
|
@ -16755,7 +16759,7 @@ esac
|
|||
N=$((N+1))
|
||||
|
||||
|
||||
# Test the POSIX MQ feature with continuous READ and priorization on Linux
|
||||
# Test the POSIX MQ feature with continuous READ and prioritization on Linux
|
||||
NAME=POSIXMQ_READ_PRIO
|
||||
case "$TESTS" in
|
||||
*%$N%*|*%functions%*|*%socket%*|*%posixmq%*|*%$NAME%*)
|
||||
|
@ -17038,7 +17042,6 @@ fi # NUMCOND
|
|||
;;
|
||||
esac
|
||||
N=$((N+1))
|
||||
date "+%Y/%m/%d %H:%M:%S.%N"
|
||||
|
||||
|
||||
# Test the sigint option with SHELL address
|
||||
|
@ -17650,7 +17653,7 @@ CMD0="$TRACE $SOCAT $opts -lp server $SRV:${ts}0,fork PIPE"
|
|||
# The following command is the solution: option unix-bind-tempname generates
|
||||
# random names (like tempnam(2)) for binding the datagram client socket;
|
||||
# creating the XXXXXX file makes sure that the (non abstract) clients cannot
|
||||
# erronously bind there (part of the test)
|
||||
# erroneously bind there (part of the test)
|
||||
CMD1="$TRACE $SOCAT $opts -lp bind-tempname TCP4-LISTEN:$PORT,reuseaddr,fork $CLI:${ts}0,bind=${ts}1"
|
||||
touch ${ts}1.XXXXXX; CMD1="$TRACE $SOCAT $opts -lp tempname TCP4-LISTEN:$PORT,reuseaddr,fork $CLI:${ts}0,bind-tempname=${ts}1.XXXXXX"
|
||||
CMD2="$TRACE $SOCAT $opts -lp client - TCP4-CONNECT:$LOCALHOST:$PORT"
|
||||
|
@ -20085,9 +20088,9 @@ PROXY tcp CONNECT 127.0.0.1:80 proxyport=\$PORT,crlf TCP-L crlf
|
|||
|
||||
##################################################################################
|
||||
#=================================================================================
|
||||
# here come tests that might affect your systems integrity. Put normal tests
|
||||
# Here come tests that might affect your systems integrity. Put normal tests
|
||||
# before this paragraph.
|
||||
# tests must be explicitely selected by roottough or name (not number)
|
||||
# Tests must be explicitly selected by roottough or name (not number)
|
||||
|
||||
NAME=PTYGROUPLATE
|
||||
case "$TESTS" in
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include "xio-ascii.h"
|
||||
|
||||
/* for each 6 bit pattern we have an ASCII character in the arry */
|
||||
/* For each 6 bit pattern we have an ASCII character in the array */
|
||||
const static int base64chars[] = {
|
||||
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
|
||||
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
|
||||
|
|
2
xio-fs.c
2
xio-fs.c
|
@ -87,7 +87,7 @@ const struct optdesc opt_fs_noatime = { "fs-noatime", "noatime",
|
|||
#endif /* FS_NOATIME_FL */
|
||||
|
||||
/* FS_DIRTY_FL ??? */
|
||||
/* FS_COMPRBLK_FL one ore more compress clusters */
|
||||
/* FS_COMPRBLK_FL one or more compress clusters */
|
||||
/* FS_NOCOMPR_FL access raw compressed data */
|
||||
/* FS_ECOMPR_FL compression error */
|
||||
/* FS_BTREE_FL btree format dir */
|
||||
|
|
|
@ -71,7 +71,7 @@ int _xioopen_interface(const char *ifname,
|
|||
|
||||
if (ifindex(ifname, &ifidx, -1) < 0) {
|
||||
Error1("unknown interface \"%s\"", ifname);
|
||||
ifidx = 0; /* desparate attempt to continue */
|
||||
ifidx = 0; /* desperate attempt to continue */
|
||||
}
|
||||
|
||||
if (sfd->howtoend == END_UNSPEC)
|
||||
|
@ -276,7 +276,7 @@ int _xiointerface_apply_iff(
|
|||
|
||||
|
||||
#if HAVE_STRUCT_CMSGHDR && HAVE_STRUCT_TPACKET_AUXDATA
|
||||
/* Converts the ancillary message in *cmsg into a form useable for further
|
||||
/* Converts the ancillary message in *cmsg into a form usable for further
|
||||
processing. Knows the specifics of common message types.
|
||||
On PACKET_AUXDATA it stored the ancillary data in the XFD.
|
||||
For other types:
|
||||
|
|
2
xio-ip.c
2
xio-ip.c
|
@ -919,7 +919,7 @@ int xioresolve(const char *node, const char *service,
|
|||
}
|
||||
|
||||
#if defined(HAVE_STRUCT_CMSGHDR) && defined(CMSG_DATA)
|
||||
/* Converts the ancillary message in *cmsg into a form useable for further
|
||||
/* Converts the ancillary message in *cmsg into a form usable for further
|
||||
processing. knows the specifics of common message types.
|
||||
These are valid for IPv4 and IPv6
|
||||
Returns the number of resulting syntax elements in *num
|
||||
|
|
|
@ -249,7 +249,7 @@ int xiocheckrange_ip6(struct sockaddr_in6 *pa, struct xiorange *range) {
|
|||
|
||||
#if defined(HAVE_STRUCT_CMSGHDR) && defined(CMSG_DATA)
|
||||
/* provides info about the ancillary message:
|
||||
converts the ancillary message in *cmsg into a form useable for further
|
||||
converts the ancillary message in *cmsg into a form usable for further
|
||||
processing. knows the specifics of common message types.
|
||||
returns the number of resulting syntax elements in *num
|
||||
returns a sequence of \0 terminated type strings in *typbuff
|
||||
|
|
|
@ -449,7 +449,7 @@ int _xioopen_ipapp_listen_prepare(
|
|||
|
||||
retropt_string(opts, OPT_BIND, &bindname);
|
||||
|
||||
/* Set AI_PASSIVE, except when it is explicitely disabled */
|
||||
/* Set AI_PASSIVE, except when it is explicitly disabled */
|
||||
ai_flags2[0] = ai_flags[0];
|
||||
ai_flags2[1] = ai_flags[1];
|
||||
if (!(ai_flags2[1] & AI_PASSIVE))
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/* this file contains the implementation of the openssl addresses */
|
||||
|
||||
#include "xiosysincludes.h"
|
||||
#if WITH_OPENSSL /* make this address configure dependend */
|
||||
#if WITH_OPENSSL /* make this address configure dependent */
|
||||
#include <openssl/conf.h>
|
||||
#include <openssl/x509v3.h>
|
||||
|
||||
|
@ -266,7 +266,7 @@ static int xioopen_openssl_connect(
|
|||
hostname = argv[1];
|
||||
portname = argv[2];
|
||||
if (hostname[0] == '\0') {
|
||||
/* we catch this explicitely because empty commonname (peername) disables
|
||||
/* We catch this explicitly because empty commonname (peername) disables
|
||||
commonName check of peer certificate */
|
||||
Error1("%s: empty host name", argv[0]);
|
||||
return STAT_NORETRY;
|
||||
|
@ -806,7 +806,7 @@ int _xioopen_openssl_listen(struct single *sfd,
|
|||
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
|
||||
/* In OpenSSL 0.9.7 compression methods could be added using
|
||||
* SSL_COMP_add_compression_method(3), but the implemntation is not compatible
|
||||
* SSL_COMP_add_compression_method(3), but the implementation is not compatible
|
||||
* with the standard (RFC3749).
|
||||
*/
|
||||
static int openssl_setup_compression(SSL_CTX *ctx, char *method)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#ifndef __xio_openssl_included
|
||||
#define __xio_openssl_included 1
|
||||
|
||||
#if WITH_OPENSSL /* make this address configure dependend */
|
||||
#if WITH_OPENSSL /* make this address configure dependent */
|
||||
|
||||
#define SSLIO_BASE 0x53530000 /* "SSxx" */
|
||||
#define SSLIO_MASK 0xffff0000
|
||||
|
|
|
@ -1776,7 +1776,7 @@ int xiocheckpeer(xiosingle_t *sfd,
|
|||
|
||||
|
||||
#if HAVE_STRUCT_CMSGHDR
|
||||
/* converts the ancillary message in *cmsg into a form useable for further
|
||||
/* Converts the ancillary message in *cmsg into a form usable for further
|
||||
processing. knows the specifics of common message types.
|
||||
returns the number of resulting syntax elements in *num
|
||||
returns a sequence of \0 terminated type strings in *typbuff
|
||||
|
@ -1997,7 +1997,7 @@ int xioparserange(
|
|||
return -1;
|
||||
}
|
||||
/* we have parsed the address and mask; now we make sure that the stored
|
||||
address has 0 where mask is 0, to simplify comparisions */
|
||||
address has 0 where mask is 0, to simplify comparisons */
|
||||
switch (pf) {
|
||||
#if WITH_IP4
|
||||
case PF_INET:
|
||||
|
|
|
@ -17,7 +17,7 @@ static int xioopen_stdio(int argc, const char *argv[], struct opt *opts, int xio
|
|||
static int xioopen_stdfd(int argc, const char *argv[], struct opt *opts, int xioflags, xiofile_t *xfd, const struct addrdesc *addrdesc);
|
||||
|
||||
|
||||
/* we specify all option groups that we can imagine for a FD, becasue the
|
||||
/* We specify all option groups that we can imagine for a FD, because the
|
||||
changed parsing mechanism does not allow us to check the type of FD before
|
||||
applying the options */
|
||||
const struct addrdesc xioaddr_stdio = { "STDIO", 3, xioopen_stdio, GROUP_FD|GROUP_FIFO|GROUP_CHR|GROUP_BLK|GROUP_FILE|GROUP_SOCKET|GROUP_TERMIOS|GROUP_SOCK_UNIX|GROUP_SOCK_IP|GROUP_IPAPP, 0, 0, 0 HELP(NULL) };
|
||||
|
|
|
@ -65,7 +65,7 @@ void dummy(void) {
|
|||
#else /* !defined(ENABLE_APPLYOPT) */
|
||||
|
||||
#include "xiosysincludes.h"
|
||||
#if WITH_STREAMS /* make this address configure dependend */
|
||||
#if WITH_STREAMS /* make this address configure dependent */
|
||||
#include "xioopen.h"
|
||||
|
||||
#include "xio-fd.h"
|
||||
|
|
|
@ -79,7 +79,7 @@ int xio_retropt_tcpwrap(
|
|||
}
|
||||
|
||||
|
||||
/* returns -1 if forbidden, 0 if no tcpwrap check, or 1 if explicitely allowed
|
||||
/* Returns -1 if forbidden, 0 if no tcpwrap check, or 1 if explicitly allowed
|
||||
*/
|
||||
int xio_tcpwrap_check(
|
||||
struct single *sfd,
|
||||
|
|
|
@ -501,7 +501,7 @@ int xiotermios_spec(int fd, int optcode) {
|
|||
#if HAVE_CFMAKERAW
|
||||
cfmakeraw(&_xiotermios_data.termarg);
|
||||
#else
|
||||
/* these setting follow the Linux documenation of cfmakeraw */
|
||||
/* These settings follow the Linux documentation of cfmakeraw */
|
||||
_xiotermios_data.termarg.c_iflag &=
|
||||
~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
|
||||
_xiotermios_data.termarg.c_oflag &= ~(OPOST);
|
||||
|
|
|
@ -120,7 +120,7 @@ static int xioopen_tun(
|
|||
if (retropt_bool(opts, OPT_IFF_NO_PI, &no_pi) == 0) {
|
||||
if (no_pi) {
|
||||
ifr.ifr_flags |= IFF_NO_PI;
|
||||
#if 0 /* not neccessary for now */
|
||||
#if 0 /* not necessary for now */
|
||||
} else {
|
||||
ifr.ifr_flags &= ~IFF_NO_PI;
|
||||
#endif
|
||||
|
@ -139,7 +139,7 @@ static int xioopen_tun(
|
|||
/* we seem to need a socket for manipulating the interface */
|
||||
if ((sockfd = Socket(PF_INET, SOCK_DGRAM, 0)) < 0) {
|
||||
Error1("socket(PF_INET, SOCK_DGRAM, 0): %s", strerror(errno));
|
||||
sockfd = sfd->fd; /* desparate fallback attempt */
|
||||
sockfd = sfd->fd; /* desperate fallback attempt */
|
||||
}
|
||||
|
||||
/*--------------------- setting interface address and netmask ------------*/
|
||||
|
|
|
@ -550,7 +550,7 @@ int xioopen_udp_recvfrom(
|
|||
if (sfd->howtoend == END_UNSPEC)
|
||||
sfd->howtoend = END_NONE;
|
||||
|
||||
/* Set AI_PASSIVE, except when it is explicitely disabled */
|
||||
/* Set AI_PASSIVE, except when it is explicitly disabled */
|
||||
ai_flags2[0] = xfd->stream.para.socket.ip.ai_flags[0];
|
||||
ai_flags2[1] = xfd->stream.para.socket.ip.ai_flags[1];
|
||||
if (!(ai_flags2[1] & AI_PASSIVE))
|
||||
|
@ -626,7 +626,7 @@ int xioopen_udp_recv(
|
|||
xioinit_ip(&pf, xioparms.default_ip);
|
||||
retropt_socket_pf(opts, &pf);
|
||||
|
||||
/* Set AI_PASSIVE, except when it is explicitely disabled */
|
||||
/* Set AI_PASSIVE, except when it is explicitly disabled */
|
||||
ai_flags2[0] = xfd->stream.para.socket.ip.ai_flags[0];
|
||||
ai_flags2[1] = xfd->stream.para.socket.ip.ai_flags[1];
|
||||
if (!(ai_flags2[1] & AI_PASSIVE))
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#if WITH_UNIX
|
||||
|
||||
/* to avoid unneccessary runtime if () conditionals when no abstract support is
|
||||
/* To avoid unnecessary runtime if () conditionals when no abstract support is
|
||||
compiled in (or at least to give optimizing compilers a good chance) we need
|
||||
a constant that can be used in C expressions */
|
||||
#if WITH_ABSTRACT_UNIXSOCKET
|
||||
|
@ -33,7 +33,7 @@ static int xioopen_unix_client(int argc, const char *argv[], struct opt *opts, i
|
|||
|
||||
/* the first free parameter is 0 for "normal" unix domain sockets, or 1 for
|
||||
abstract unix sockets (Linux); the second and third free parameter are
|
||||
unsused */
|
||||
unused */
|
||||
const struct addrdesc xioaddr_unix_connect = { "UNIX-CONNECT", 1+XIO_RDWR, xioopen_unix_connect, GROUP_FD|GROUP_NAMED|GROUP_SOCKET|GROUP_SOCK_UNIX|GROUP_RETRY, 0, 0, 0 HELP(":<filename>") };
|
||||
#if WITH_LISTEN
|
||||
const struct addrdesc xioaddr_unix_listen = { "UNIX-LISTEN", 1+XIO_RDWR, xioopen_unix_listen, GROUP_FD|GROUP_NAMED|GROUP_SOCKET|GROUP_SOCK_UNIX|GROUP_LISTEN|GROUP_CHILD|GROUP_RETRY, 0, 0, 0 HELP(":<filename>") };
|
||||
|
|
2
xio.h
2
xio.h
|
@ -126,7 +126,7 @@ typedef struct xioparms {
|
|||
/* pack the description of a lock file */
|
||||
typedef struct {
|
||||
const char *lockfile; /* name of lockfile; NULL if no locking */
|
||||
bool waitlock; /* dont't exit when already locked */
|
||||
bool waitlock; /* don't exit when already locked */
|
||||
struct timespec intervall; /* polling intervall */
|
||||
} xiolock_t;
|
||||
|
||||
|
|
|
@ -175,8 +175,8 @@ static int xio_nokill(xiofile_t *sock) {
|
|||
return result;
|
||||
}
|
||||
|
||||
/* call this function immediately after fork() in child process */
|
||||
/* it performs some neccessary actions
|
||||
/* Call this function immediately after fork() in child process */
|
||||
/* It performs some necessary actions
|
||||
returns 0 on success or != 0 if an error occurred */
|
||||
int xio_forked_inchild(void) {
|
||||
int result = 0;
|
||||
|
|
|
@ -3342,7 +3342,7 @@ int retropt_bind(struct opt *opts,
|
|||
}
|
||||
|
||||
# if WITH_IP4 || WITH_IP6
|
||||
/* Set AI_PASSIVE, except when it is explicitely disabled */
|
||||
/* Set AI_PASSIVE, except when it is explicitly disabled */
|
||||
ai_flags2[0] = ai_flags[0];
|
||||
ai_flags2[1] = ai_flags[1];
|
||||
if (!(ai_flags2[1] & AI_PASSIVE))
|
||||
|
|
|
@ -150,7 +150,7 @@ enum e_func {
|
|||
#define GROUP_NONE 0x00000000
|
||||
#define GROUP_ADDR 0x00000000 /* options that apply to all addresses */
|
||||
|
||||
#define GROUP_FD 0x00000001 /* everything applyable to a fd */
|
||||
#define GROUP_FD 0x00000001 /* everything applicable to a fd */
|
||||
#define GROUP_FIFO 0x00000002
|
||||
#define GROUP_CHR 0x00000004 /* not yet used? */
|
||||
#define GROUP_BLK 0x00000008
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue