From 490a01d2457e94fb3369706dd98b4b258fabfab1 Mon Sep 17 00:00:00 2001 From: Gerhard Rieger Date: Sat, 26 Nov 2011 14:49:51 +0100 Subject: [PATCH] typos in docu and source --- CHANGES | 5 +++++ doc/socat.yo | 16 +++++++--------- xio-listen.c | 4 ++-- xio-socket.c | 2 +- xio-tun.c | 2 +- xioinitialize.c | 2 +- 6 files changed, 17 insertions(+), 14 deletions(-) diff --git a/CHANGES b/CHANGES index 526b807..9c0d679 100644 --- a/CHANGES +++ b/CHANGES @@ -97,6 +97,11 @@ new features: feature of newer OpenSSL versions. Thanks to Michael Hanselmann for providing this contribution (sponsored by Google Inc.) +docu: + minor corrections in docu (thanks to Paggas) + + client process -> child process + ####################### V 1.7.1.3: security: diff --git a/doc/socat.yo b/doc/socat.yo index c191edc..b93c9bf 100644 --- a/doc/socat.yo +++ b/doc/socat.yo @@ -333,7 +333,7 @@ label(ADDRESS_GOPEN)dit(bf(tt(GOPEN:))) link(UNIX-CONNECT)(ADDRESS_UNIX_CONNECT) label(ADDRESS_IP_SENDTO)dit(bf(tt(IP-SENDTO::))) - Opens a raw IP socket. Depending on host specification or option link(pf)(OPTION_PROTOCOL_FAMILY), IP procotol version + Opens a raw IP socket. Depending on host specification or option link(pf)(OPTION_PROTOCOL_FAMILY), IP protocol version 4 or 6 is used. It uses link()(TYPE_PROTOCOL) to send packets to [link(IP address)(TYPE_IP_ADDRESS)] and receives packets from host, ignores packets from other hosts. @@ -404,7 +404,7 @@ label(ADDRESS_IP6_DATAGRAM)dit(bf(tt(IP6-DATAGRAM::))) Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP6)(GROUP_IP6),link(RANGE)(GROUP_RANGE) nl() label(ADDRESS_IP_RECVFROM)dit(bf(tt(IP-RECVFROM:))) - Opens a raw IP socket of link()(TYPE_PROTOCOL). Depending on option link(pf)(OPTION_PROTOCOL_FAMILY), IP procotol version + Opens a raw IP socket of link()(TYPE_PROTOCOL). Depending on option link(pf)(OPTION_PROTOCOL_FAMILY), IP protocol version 4 or 6 is used. It receives one packet from an unspecified peer and may send one or more answer packets to that peer. This mode is particularly useful with fork option where each arriving packet - from arbitrary peers - is handled by its own sub process. This allows a behaviour similar to typical UDP based servers like ntpd or @@ -437,7 +437,7 @@ label(ADDRESS_IP6_RECVFROM)dit(bf(tt(IP6-RECVFROM:))) Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP6)(GROUP_IP6),link(CHILD)(GROUP_CHILD),link(RANGE)(GROUP_RANGE) nl() label(ADDRESS_IP_RECV)dit(bf(tt(IP-RECV:))) - Opens a raw IP socket of link()(TYPE_PROTOCOL). Depending on option link(pf)(OPTION_PROTOCOL_FAMILY), IP procotol version + Opens a raw IP socket of link()(TYPE_PROTOCOL). Depending on option link(pf)(OPTION_PROTOCOL_FAMILY), IP protocol version 4 or 6 is used. It receives packets from multiple unspecified peers and merges the data. No replies are possible. It can be, e.g., addressed by socat IP-SENDTO address peers. @@ -3250,12 +3250,10 @@ label(EXAMPLE_ADDRESS_TUN) dit(bf(tt(socat TCP:host2:4443 TUN:192.168.255.1/24,up))) establishes one side of a virtual (but not private!) network with host2 where a -similar process might run, with TCP-L and tun address 192.168.255.2. They -can reach each other using the addresses 192.168.255.1 and -192.168.255.2. Substitute the TCP link with an SSL connection protected by -client and server authentication (see OpenSSL -link(client)(EXAMPLE_ADDRESS_OPENSSL_CONNECT) and -link(server)(EXAMPLE_ADDRESS_OPENSSL_LISTEN)). +similar process might run, with UDP-L and tun address 192.168.255.2. They can +reach each other using the addresses 192.168.255.1 and 192.168.255.2. Note that +streaming eg. via TCP or SSL does not guarantee to retain packet boundaries and +may thus cause packet loss. label(EXAMPLE_INTERFACE) diff --git a/xio-listen.c b/xio-listen.c index 68afaa7..6e4713b 100644 --- a/xio-listen.c +++ b/xio-listen.c @@ -1,5 +1,5 @@ /* source: xio-listen.c */ -/* Copyright Gerhard Rieger 2001-2010 */ +/* Copyright Gerhard Rieger 2001-2011 */ /* Published under the GNU General Public License V.2, see file COPYING */ /* this file contains the source for listen socket options */ @@ -307,7 +307,7 @@ int _xioopen_listen(struct single *xfd, int xioflags, struct sockaddr *us, sockl pid_t cpid = Getpid(); Sigprocmask(SIG_UNBLOCK, &mask_sigchld, NULL); - Info1("just born: client process "F_pid, cpid); + Info1("just born: child process "F_pid, cpid); xiosetenvulong("PID", cpid, 1); if (Close(xfd->fd) < 0) { diff --git a/xio-socket.c b/xio-socket.c index cc18a3c..75799ac 100644 --- a/xio-socket.c +++ b/xio-socket.c @@ -1090,7 +1090,7 @@ int _xioopen_dgram_sendto(/* them is already in xfd->peersa */ packet in the IP stacks input queue and forks a sub process. The sub process then reads this packet for processing its data. There is a problem because the parent process would find the same packet - again if it calls select()/poll() before the client process reads the + again if it calls select()/poll() before the child process reads the packet. To solve this problem we implement the following mechanism: The sub process sends a SIGUSR1 when it has read the packet (or a SIGCHLD if diff --git a/xio-tun.c b/xio-tun.c index d1e7b6d..4f262df 100644 --- a/xio-tun.c +++ b/xio-tun.c @@ -44,7 +44,7 @@ const struct optdesc opt_iff_automedia = { "iff-automedia", "automedia", O const struct optdesc opt_route = { "route", NULL, OPT_ROUTE, GROUP_INTERFACE, PH_INIT, TYPE_STRING, OFUNC_SPEC }; #endif -const struct addrdesc xioaddr_tun = { "tun", 3, xioopen_tun, GROUP_FD|GROUP_CHR|GROUP_NAMED|GROUP_OPEN|GROUP_TUN, 0, 0, 0 HELP(":/") }; +const struct addrdesc xioaddr_tun = { "tun", 3, xioopen_tun, GROUP_FD|GROUP_CHR|GROUP_NAMED|GROUP_OPEN|GROUP_TUN, 0, 0, 0 HELP("[:/]") }; /* "if-name"=tun3 // "route"=address/netmask // "ip6-route"=address/netmask diff --git a/xioinitialize.c b/xioinitialize.c index 7f7c058..9f50155 100644 --- a/xioinitialize.c +++ b/xioinitialize.c @@ -222,7 +222,7 @@ pid_t xio_fork(bool subchild, int level) { if (pid == 0) { /* child process */ pid_t cpid = Getpid(); - Info1("just born: client process "F_pid, cpid); + Info1("just born: child process "F_pid, cpid); if (!subchild) { /* set SOCAT_PID to new value */ xiosetenvulong("PID", pid, 1);