PageRenderTime 50ms CodeModel.GetById 6ms app.highlight 15ms RepoModel.GetById 1ms app.codeStats 2ms

/doc/socat.yo

https://github.com/xscc/socat
Unknown | 3524 lines | 3187 code | 337 blank | 0 comment | 0 complexity | 1f86a98476e59b506dc7f2cc74b82fcc MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1COMMENT(source: socat.yo)
  2mailto(socat@dest-unreach.org)
  3
  4def(unix)(0)(UN*X)
  5def(unixdomain)(0)(UNIX domain)
  6def(socat)(0)(bf(socat))
  7def(Socat)(0)(bf(Socat))
  8def(filan)(0)(bf(filan))
  9def(Filan)(0)(bf(Filan))
 10def(procan)(0)(bf(procan))
 11def(Procan)(0)(bf(Procan))
 12
 13manpage(socat)(1)(Mar 2014)()()
 14
 15whenhtml(
 16label(CONTENTS)
 17manpagesection(CONTENTS)
 18link(NAME)(NAME)nl()
 19link(SYNOPSIS)(SYNOPSIS)nl()
 20link(DESCRIPTION)(DESCRIPTION)nl()
 21link(OPTIONS)(OPTIONS)nl()
 22link(ADDRESS SPECIFICATIONS)(ADDRESS_SPECIFICATIONS)nl()
 23link(ADDRESS TYPES)(ADDRESS_TYPES)nl()
 24link(ADDRESS OPTIONS)(ADDRESS_OPTIONS)nl()
 25link(DATA VALUES)(VALUES)nl()
 26link(EXAMPLES)(EXAMPLES)nl()
 27link(DIAGNOSTICS)(DIAGNOSTICS)nl()
 28link(FILES)(FILES)nl()
 29link(ENVIRONMENT VARIABLES)(ENVIRONMENT_VARIABLES)nl()
 30link(CREDITS)(CREDITS)nl()
 31link(VERSION)(VERSION)nl()
 32link(BUGS)(BUGS)nl()
 33link(SEE ALSO)(SEEALSO)nl()
 34)
 35
 36label(NAME)
 37manpagename(socat) (Multipurpose relay (SOcket CAT))
 38
 39label(SYNOPSIS)
 40manpagesynopsis()
 41tt(socat [options] <address> <address>)nl()
 42tt(socat -V)nl()
 43tt(socat -h[h[h]] | -?[?[?]])nl()
 44tt(filan)nl()
 45tt(procan)
 46
 47label(DESCRIPTION)
 48manpagedescription()
 49
 50Socat() is a command line based utility that establishes two bidirectional byte
 51streams and transfers data between them. Because the streams can be constructed
 52from a large set of different types of data sinks and sources 
 53(see link(address types)(ADDRESS_TYPES)), and because lots of
 54link(address options)(ADDRESS_OPTIONS) may be applied to the streams, socat can
 55be used for many different purposes. 
 56
 57Filan() is a utility that prints information about its active file
 58descriptors to stdout. It has been written for debugging socat(), but might be
 59useful for other purposes too. Use the -h option to find more infos.
 60
 61Procan() is a utility that prints information about process parameters to
 62stdout. It has been written to better understand 
 63some UNIX process properties and for debugging socat(), but might be 
 64useful for other purposes too.
 65
 66The life cycle of a socat() instance typically consists of four phases.
 67
 68In the em(init) phase, the command line options are parsed and logging is
 69initialized. 
 70
 71During the em(open) phase, socat() opens the first address and afterwards the
 72second address. These steps are usually blocking; thus, especially for complex address types like socks,
 73connection requests or authentication dialogs must be completed before the next
 74step is started.
 75
 76In the em(transfer) phase, socat() watches both streams' read and write file
 77descriptors via code(select()), and, when data is available on one side em(and)
 78can be written to the other side, socat reads it, performs newline
 79character conversions if required, and writes the data to the write file
 80descriptor of the other stream, then continues waiting for more data in both
 81directions.
 82
 83When one of the streams effectively reaches EOF, the em(closing) phase
 84begins. Socat() transfers the EOF condition to the other stream,
 85i.e. tries to shutdown only its write stream, giving it a chance to
 86terminate gracefully. For a defined time socat() continues to transfer data in
 87the other direction, but then closes all remaining channels and terminates.
 88
 89
 90label(OPTIONS)
 91manpageoptions()
 92
 93Socat() provides some command line options that modify the behaviour of the
 94program. They have nothing to do with so called
 95link(address options)(ADDRESS_OPTIONS) that are used as parts of link(address specifications)(ADDRESS_SPECIFICATIONS).
 96
 97startdit()
 98dit(bf(tt(-V)))
 99   Print version and available feature information to stdout, and exit.
100dit(bf(tt(-h | -?)))
101   Print a help text to stdout describing command line options and available address
102   types, and exit.
103dit(bf(tt(-hh | -??)))
104   Like -h, plus a list of the short names of all available address options. Some options are
105   platform dependend, so this output is helpful for checking the particular
106   implementation. 
107dit(bf(tt(-hhh | -???)))
108   Like -hh, plus a list of all available address option names.
109label(option_d)dit(bf(tt(-d)))
110   Without this option, only fatal and error messages are generated; applying
111   this option also prints warning messages. See link(DIAGNOSTICS)(DIAGNOSTICS)
112   for more information. 
113label(option_d_d)dit(bf(tt(-d -d))) Prints fatal, error, warning, and notice messages.
114dit(bf(tt(-d -d -d))) Prints fatal, error, warning, notice, and info messages.
115dit(bf(tt(-d -d -d -d))) Prints fatal, error, warning, notice, info, and debug
116   messages. 
117dit(bf(tt(-D)))
118   Logs information about file descriptors before starting the transfer phase.
119dit(bf(tt(-ly[<facility>])))
120   Writes messages to syslog instead of stderr; severity as defined with -d
121   option. With optional link(<facility>)(TYPE_FACILITY), the syslog type can
122   be selected, default is "daemon". Third party libraries might not obey this
123   option.
124dit(bf(tt(-lf))tt( <logfile>))
125   Writes messages to <logfile> [link(filename)(TYPE_FILENAME)] instead of
126   stderr. Some third party libraries, in particular libwrap, might not obey
127   this option.
128dit(bf(tt(-ls)))
129   Writes messages to stderr (this is the default). Some third party libraries 
130   might not obey this option, in particular libwrap appears to only log to
131   syslog. 
132label(option_lp)dit(bf(tt(-lp))tt(<progname>))
133   Overrides the program name printed in error messages and used for
134   constructing environment variable names.
135dit(bf(tt(-lu)))
136   Extends the timestamp of error messages to microsecond resolution. Does not
137   work when logging to syslog.
138label(option_lm)dit(bf(tt(-lm[<facility>])))
139   Mixed log mode. During startup messages are printed to stderr; when socat() 
140   starts the transfer phase loop or daemon mode (i.e. after opening all
141   streams and before starting data transfer, or, with listening sockets with
142   fork option, before the first accept call), it switches logging to syslog. 
143   With optional link(<facility>)(TYPE_FACILITY), the syslog type can be
144   selected, default is "daemon". 
145label(option_lh)dit(bf(tt(-lh)))
146   Adds hostname to log messages. Uses the value from environment variable
147   HOSTNAME or the value retrieved with tt(uname()) if HOSTNAME is not set.
148dit(bf(tt(-v)))
149   Writes the transferred data not only to their target streams, but also to
150   stderr. The output format is text with some conversions for readability, and
151   prefixed with "> " or "< " indicating flow directions.
152dit(bf(tt(-x)))
153   Writes the transferred data not only to their target streams, but also to
154   stderr. The output format is hexadecimal, prefixed with "> " or "< "
155   indicating flow directions. Can be combined with code(-v).
156label(option_b)dit(bf(tt(-b))tt(<size>))
157   Sets the data transfer block <size> [link(size_t)(TYPE_SIZE_T)].
158   At most <size> bytes are transferred per step. Default is 8192 bytes. 
159label(option_s)dit(bf(tt(-s)))
160   By default, socat() terminates when an error occurred to prevent the process
161   from running when some option could not be applied. With this
162   option, socat() is sloppy with errors and tries to continue. Even with this
163   option, socat will exit on fatals, and will abort connection attempts when
164   security checks failed.
165label(option_t)dit(bf(tt(-t))tt(<timeout>))
166   When one channel has reached EOF, the write part of the other channel is shut
167   down. Then, socat() waits <timeout> [link(timeval)(TYPE_TIMEVAL)] seconds
168   before terminating. Default is 0.5 seconds. This timeout only applies to
169   addresses where write and read part can be closed independently. When during
170   the timeout interval the read part gives EOF, socat terminates without
171   awaiting the timeout.
172label(option_T)dit(bf(tt(-T))tt(<timeout>))
173   Total inactivity timeout: when socat is already in the transfer loop and
174   nothing has happened for <timeout> [link(timeval)(TYPE_TIMEVAL)] seconds
175   (no data arrived, no interrupt occurred...) then it terminates.
176   Useful with protocols like UDP that cannot transfer EOF.
177label(option_u)dit(bf(tt(-u)))
178   Uses unidirectional mode. The first address is only used for reading, and the
179   second address is only used for writing (link(example)(EXAMPLE_option_u)). 
180label(option_U)dit(bf(tt(-U)))
181   Uses unidirectional mode in reverse direction. The first address is only
182   used for writing, and the second address is only used for reading. 
183label(option_g)dit(bf(tt(-g)))
184   During address option parsing, don't check if the option is considered
185   useful in the given address environment. Use it if you want to force, e.g.,
186   appliance of a socket option to a serial device.
187label(option_L)dit(bf(tt(-L))tt(<lockfile>))
188   If lockfile exists, exits with error. If lockfile does not exist, creates it
189   and continues, unlinks lockfile on exit.
190label(option_W)dit(bf(tt(-W))tt(<lockfile>))
191   If lockfile exists, waits until it disappears. When lockfile does not exist,
192   creates it and continues, unlinks lockfile on exit.
193label(option_4)dit(bf(tt(-4)))
194   Use IP version 4 in case that the addresses do not implicitly or explicitly
195   specify a version; this is the default.
196label(option_6)dit(bf(tt(-6)))
197   Use IP version 6 in case that the addresses do not implicitly or explicitly
198   specify a version.
199enddit()
200
201
202label(ADDRESS_SPECIFICATIONS)
203manpagesection(ADDRESS SPECIFICATIONS)
204
205With the address command line arguments, the user gives socat() instructions and
206the necessary information for establishing the byte streams. 
207
208An address specification usually consists of an address type
209keyword, zero or more required address parameters separated by ':' from the keyword and
210from each 
211other, and zero or more address options separated by ','. 
212
213The keyword specifies the address type (e.g., TCP4, OPEN, EXEC). For some
214keywords there exist synonyms ('-' for STDIO, TCP for TCP4). Keywords are case
215insensitive.
216For a few special address types, the keyword may be omitted:
217Address specifications starting with a number are assumed to be FD (raw file
218descriptor) addresses; 
219if a '/' is found before the first ':' or ',', GOPEN (generic file open) is
220assumed. 
221
222The required number and type of address parameters depend on the address
223type. E.g., TCP4 requires a server specification (name or address), and a port
224specification (number or service name). 
225
226Zero or more address options may be given with each address. They influence the
227address in some ways. 
228Options consist of an option keyword or an option keyword and a value,
229separated by '='. Option keywords are case insensitive.
230For filtering the options that are useful with an address
231type, each option is member of one option group. For
232each address type there is a set of option groups allowed. Only options
233belonging to one of these address groups may be used (except with link(option -g)(option_g)). 
234
235label(ADDRESS_DUAL)
236Address specifications following the above schema are also called em(single)
237address specifications.
238Two single addresses can be combined with "!!" to form a em(dual) type
239address for one channel. Here, the first address is used by socat() for reading
240data, and the 
241second address for writing data. There is no way to specify an option only once
242for being applied to both single addresses.
243
244Usually, addresses are opened in read/write
245mode. When an address is part of a dual address specification, or when
246link(option -u)(option_u) or link(-U)(option_U) is used, an address might be
247used only for reading or for writing. Considering this is important with some
248address types.
249
250With socat version 1.5.0 and higher, the lexical analysis tries to handle
251quotes and parenthesis meaningfully and allows escaping of special characters. 
252If one of the characters ( { [ ' is found, the corresponding closing 
253character - ) } ] ' - is looked for; they may also be nested. Within these
254constructs, socats special characters and strings : , !! are not handled
255specially. All those characters and strings can be escaped with \ or within ""
256
257label(ADDRESS_TYPES)
258manpagesection(ADDRESS TYPES)
259
260This section describes the available address types with their keywords,
261parameters, and semantics.
262
263startdit()
264label(ADDRESS_CREAT)dit(bf(tt(CREATE:<filename>)))
265   Opens link(<filename>)(TYPE_FILENAME) with code(creat()) and uses the file
266   descriptor for writing. 
267   This address type requires write-only context, because a file opened with
268   code(creat) cannot be read from. nl()
269   Flags like O_LARGEFILE cannot be applied. If you need them use
270   link(OPEN)(ADDRESS_OPEN) with options
271   link(create)(OPTION_O_CREAT),link(create)(OPTION_O_TRUNC). nl()
272   <filename> must be a valid existing or not existing path.
273   If <filename> is a named pipe, code(creat()) might block;
274   if <filename> refers to a socket, this is an error.nl() 
275   Option groups: link(FD)(GROUP_FD),link(REG)(GROUP_REG),link(NAMED)(GROUP_NAMED) nl()
276   Useful options:
277   link(mode)(OPTION_MODE),
278   link(user)(OPTION_USER),
279   link(group)(OPTION_GROUP),
280   link(unlink-early)(OPTION_UNLINK_EARLY),
281   link(unlink-late)(OPTION_UNLINK_LATE),
282   link(append)(OPTION_APPEND)nl()
283   See also: link(OPEN)(ADDRESS_OPEN), link(GOPEN)(ADDRESS_GOPEN)
284label(ADDRESS_EXEC)dit(bf(tt(EXEC:<command-line>)))
285   Forks a sub process that establishes communication with its parent process
286   and invokes the specified program with code(execvp()).
287   link(<command-line>)(TYPE_COMMAND_LINE) is a simple command
288   with arguments separated by single spaces. If the program name
289   contains a '/', the part after the last '/' is taken as ARGV[0]. If the
290   program name is a relative 
291   path, the code(execvp()) semantics for finding the program via
292   code($PATH) 
293   apply. After successful program start, socat() writes data to stdin of the
294   process and reads from its stdout using a unixdomain() socket generated by
295   code(socketpair()) per default. (link(example)(EXAMPLE_ADDRESS_EXEC)) nl()  
296   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(EXEC)(GROUP_EXEC),link(FORK)(GROUP_FORK),link(TERMIOS)(GROUP_TERMIOS) nl()
297   Useful options:
298   link(path)(OPTION_PATH),
299   link(fdin)(OPTION_FDIN),
300   link(fdout)(OPTION_FDOUT),
301   link(chroot)(OPTION_CHROOT),
302   link(su)(OPTION_SUBSTUSER),
303   link(su-d)(OPTION_SUBSTUSER_DELAYED),
304   link(nofork)(OPTION_NOFORK),
305   link(pty)(OPTION_PTY),
306   link(stderr)(OPTION_STDERR),
307   link(ctty)(OPTION_CTTY),
308   link(setsid)(OPTION_SETSID),
309   link(pipes)(OPTION_PIPES),
310   link(login)(OPTION_LOGIN),
311   link(sigint)(OPTION_SIGINT),
312   link(sigquit)(OPTION_SIGQUIT)nl()
313   See also: link(SYSTEM)(ADDRESS_SYSTEM)
314label(ADDRESS_FD)dit(bf(tt(FD:<fdnum>)))
315   Uses the file descriptor link(<fdnum>)(TYPE_FDNUM). It must already exist as
316   valid unix() file descriptor.nl()
317   Option groups: link(FD)(GROUP_FD) (link(TERMIOS)(GROUP_TERMIOS),link(REG)(GROUP_REG),link(SOCKET)(GROUP_SOCKET)) nl()
318   See also:
319   link(STDIO)(ADDRESS_STDIO),
320   link(STDIN)(ADDRESS_STDIN),
321   link(STDOUT)(ADDRESS_STDOUT),
322   link(STDERR)(ADDRESS_STDERR) 
323label(ADDRESS_GOPEN)dit(bf(tt(GOPEN:<filename>)))
324   (Generic open) This address type tries to handle any file system entry
325   except directories usefully. link(<filename>)(TYPE_FILENAME) may be a
326   relative or absolute path. If it already exists, its type is checked. 
327   In case of a unixdomain() socket, socat() connects; if connecting fails,
328   socat() assumes a datagram socket and uses code(sendto()) calls.
329   If the entry is not a socket, socat() opens it applying the code(O_APPEND)
330   flag. 
331   If it does not exist, it is opened with flag
332   code(O_CREAT) as a regular file (link(example)(EXAMPLE_ADDRESS_GOPEN)).nl()
333   Option groups: link(FD)(GROUP_FD),link(REG)(GROUP_REG),link(SOCKET)(GROUP_SOCKET),link(NAMED)(GROUP_NAMED),link(OPEN)(GROUP_OPEN) nl()
334   See also:
335   link(OPEN)(ADDRESS_OPEN),
336   link(CREATE)(ADDRESS_CREAT),
337   link(UNIX-CONNECT)(ADDRESS_UNIX_CONNECT)
338
339label(ADDRESS_IP_SENDTO)dit(bf(tt(IP-SENDTO:<host>:<protocol>)))
340   Opens a raw IP socket. Depending on host specification or option link(pf)(OPTION_PROTOCOL_FAMILY), IP protocol version
341   4 or 6 is used. It uses link(<protocol>)(TYPE_PROTOCOL) to send packets
342   to <host> [link(IP address)(TYPE_IP_ADDRESS)] and receives packets from
343   host, ignores packets from other hosts. 
344   Protocol 255 uses the raw socket with the IP header being part of the
345   data.nl()
346   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP4)(GROUP_IP4),link(IP6)(GROUP_IP6) nl()
347   Useful options:
348   link(pf)(OPTION_PROTOCOL_FAMILY),
349   link(ttl)(OPTION_TTL) nl()
350   See also:
351   link(IP4-SENDTO)(ADDRESS_IP4_SENDTO),
352   link(IP6-SENDTO)(ADDRESS_IP6_SENDTO),
353   link(IP-RECVFROM)(ADDRESS_IP_RECVFROM),
354   link(IP-RECV)(ADDRESS_IP_RECV),
355   link(UDP-SENDTO)(ADDRESS_UDP_SENDTO),
356   link(UNIX-SENDTO)(ADDRESS_UNIX_SENDTO)
357label(ADDRESS_INTERFACE)dit(bf(tt(INTERFACE:<interface>)))
358   Communicates with a network connected on an interface using raw packets
359   including link level data. link(<interface>)(TYPE_INTERFACE) is the name of
360   the network interface. Currently only available on Linux.
361   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET) nl()
362   Useful options:
363   link(pf)(OPTION_PROTOCOL_FAMILY),
364   link(type)(OPTION_SO_TYPE)nl()
365   See also: link(ip-recv)(ADDRESS_IP_RECV)
366label(ADDRESS_IP4_SENDTO)dit(bf(tt(IP4-SENDTO:<host>:<protocol>)))
367   Like link(IP-SENDTO)(ADDRESS_IP_SENDTO), but always uses IPv4.nl()
368   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP4)(GROUP_IP4) nl()
369label(ADDRESS_IP6_SENDTO)dit(bf(tt(IP6-SENDTO:<host>:<protocol>)))
370   Like link(IP-SENDTO)(ADDRESS_IP_SENDTO), but always uses IPv6.nl()
371   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP6)(GROUP_IP6) nl()
372
373label(ADDRESS_IP_DATAGRAM)dit(bf(tt(IP-DATAGRAM:<address>:<protocol>)))
374   Sends outgoing data to the specified address which may in particular be a
375   broadcast or multicast address. Packets arriving on the local socket are
376   checked if their source addresses match
377   link(RANGE)(OPTION_RANGE) or link(TCPWRAP)(OPTION_TCPWRAPPERS)
378   options. This address type can for example be used for implementing
379   symmetric or asymmetric broadcast or multicast communications.nl()
380   Option groups: link(FD)(GROUP_FD), link(SOCKET)(GROUP_SOCKET),
381      link(IP4)(GROUP_IP4), link(IP6)(GROUP_IP6), link(RANGE)(GROUP_RANGE) nl()
382   Useful options:
383   link(bind)(OPTION_BIND),
384   link(range)(OPTION_RANGE),
385   link(tcpwrap)(OPTION_TCPWRAPPERS),
386   link(broadcast)(OPTION_SO_BROADCAST),
387   link(ip-multicast-loop)(OPTION_IP_MULTICAST_LOOP),
388   link(ip-multicast-ttl)(OPTION_IP_MULTICAST_TTL),
389   link(ip-multicast-if)(OPTION_IP_MULTICAST_IF),
390   link(ip-add-membership)(OPTION_IP_ADD_MEMBERSHIP),
391   link(ttl)(OPTION_TTL),
392   link(tos)(OPTION_TOS),
393   link(pf)(OPTION_PROTOCOL_FAMILY)nl()
394   See also:
395   link(IP4-DATAGRAM)(ADDRESS_IP4_DATAGRAM),
396   link(IP6-DATAGRAM)(ADDRESS_IP6_DATAGRAM),
397   link(IP-SENDTO)(ADDRESS_IP_SENDTO),
398   link(IP-RECVFROM)(ADDRESS_IP_RECVFROM),
399   link(IP-RECV)(ADDRESS_IP_RECV),
400   link(UDP-DATAGRAM)(ADDRESS_UDP_DATAGRAM)
401label(ADDRESS_IP4_DATAGRAM)dit(bf(tt(IP4-DATAGRAM:<host>:<protocol>)))
402   Like link(IP-DATAGRAM)(ADDRESS_IP_DATAGRAM), but always uses IPv4.
403   (link(example)(EXAMPLE_ADDRESS_IP4_BROADCAST_CLIENT))nl()
404   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP4)(GROUP_IP4),link(RANGE)(GROUP_RANGE) nl()
405label(ADDRESS_IP6_DATAGRAM)dit(bf(tt(IP6-DATAGRAM:<host>:<protocol>)))
406   Like link(IP-DATAGRAM)(ADDRESS_IP_DATAGRAM), but always uses IPv6. Please
407   note that IPv6 does not know broadcasts.nl()
408   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP6)(GROUP_IP6),link(RANGE)(GROUP_RANGE) nl()
409
410label(ADDRESS_IP_RECVFROM)dit(bf(tt(IP-RECVFROM:<protocol>)))
411   Opens a raw IP socket of link(<protocol>)(TYPE_PROTOCOL). Depending on option link(pf)(OPTION_PROTOCOL_FAMILY), IP protocol version
412   4 or 6 is used. It receives one packet from an unspecified peer and may send one or more answer packets to that peer.
413   This mode is particularly useful with fork option where each arriving packet - from arbitrary peers - is handled by its own sub process.
414   This allows a behaviour similar to typical UDP based servers like ntpd or
415   named.nl()
416   Please note that the reply packets might be fetched as incoming traffic when
417   sender and receiver IP address are identical because there is no port number
418   to distinguish the sockets.nl()
419   This address works well with IP-SENDTO address peers (see above).
420   Protocol 255 uses the raw socket with the IP header being part of the
421   data.nl()
422   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP4)(GROUP_IP4),link(IP6)(GROUP_IP6),link(CHILD)(GROUP_CHILD),link(RANGE)(GROUP_RANGE) nl()
423   Useful options:
424   link(pf)(OPTION_PROTOCOL_FAMILY),
425   link(fork)(OPTION_FORK),
426   link(range)(OPTION_RANGE),
427   link(ttl)(OPTION_TTL),
428   link(broadcast)(OPTION_SO_BROADCAST)nl()
429   See also:
430   link(IP4-RECVFROM)(ADDRESS_IP4_RECVFROM),
431   link(IP6-RECVFROM)(ADDRESS_IP6_RECVFROM),
432   link(IP-SENDTO)(ADDRESS_IP_SENDTO),
433   link(IP-RECV)(ADDRESS_IP_RECV),
434   link(UDP-RECVFROM)(ADDRESS_UDP_RECVFROM),
435   link(UNIX-RECVFROM)(ADDRESS_UNIX_RECVFROM) 
436label(ADDRESS_IP4_RECVFROM)dit(bf(tt(IP4-RECVFROM:<protocol>)))
437   Like link(IP-RECVFROM)(ADDRESS_IP_RECVFROM), but always uses IPv4.nl()
438   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP4)(GROUP_IP4),link(CHILD)(GROUP_CHILD),link(RANGE)(GROUP_RANGE) nl()
439label(ADDRESS_IP6_RECVFROM)dit(bf(tt(IP6-RECVFROM:<protocol>)))
440   Like link(IP-RECVFROM)(ADDRESS_IP_RECVFROM), but always uses IPv6.nl()
441   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP6)(GROUP_IP6),link(CHILD)(GROUP_CHILD),link(RANGE)(GROUP_RANGE) nl()
442
443label(ADDRESS_IP_RECV)dit(bf(tt(IP-RECV:<protocol>)))
444   Opens a raw IP socket of link(<protocol>)(TYPE_PROTOCOL). Depending on option link(pf)(OPTION_PROTOCOL_FAMILY), IP protocol version
445   4 or 6 is used. It receives packets from multiple unspecified peers and merges the data.
446   No replies are possible.
447   It can be, e.g., addressed by socat IP-SENDTO address peers.
448   Protocol 255 uses the raw socket with the IP header being part of the
449   data.nl()
450   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP4)(GROUP_IP4),link(IP6)(GROUP_IP6),link(RANGE)(GROUP_RANGE) nl()
451   Useful options:
452   link(pf)(OPTION_PROTOCOL_FAMILY),
453   link(range)(OPTION_RANGE)nl()
454   See also:
455   link(IP4-RECV)(ADDRESS_IP4_RECV),
456   link(IP6-RECV)(ADDRESS_IP6_RECV),
457   link(IP-SENDTO)(ADDRESS_IP_SENDTO),
458   link(IP-RECVFROM)(ADDRESS_IP_RECVFROM),
459   link(UDP-RECV)(ADDRESS_UDP_RECV),
460   link(UNIX-RECV)(ADDRESS_UNIX_RECV) 
461label(ADDRESS_IP4_RECV)dit(bf(tt(IP4-RECV:<protocol>)))
462   Like link(IP-RECV)(ADDRESS_IP_RECV), but always uses IPv4.nl()
463   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP4)(GROUP_IP4),link(RANGE)(GROUP_RANGE) nl()
464label(ADDRESS_IP6_RECV)dit(bf(tt(IP6-RECV:<protocol>)))
465   Like link(IP-RECV)(ADDRESS_IP_RECV), but always uses IPv6.nl()
466   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP6)(GROUP_IP6),link(RANGE)(GROUP_RANGE) nl()
467
468label(ADDRESS_OPEN)dit(bf(tt(OPEN:<filename>)))
469   Opens link(<filename>)(TYPE_FILENAME) using the code(open()) system call
470   (link(example)(EXAMPLE_ADDRESS_OPEN)).
471   This operation fails on unixdomain() sockets. nl()
472   Note: This address type is rarly useful in bidirectional mode.nl()
473   Option groups: link(FD)(GROUP_FD),link(REG)(GROUP_REG),link(NAMED)(GROUP_NAMED),link(OPEN)(GROUP_OPEN) nl()
474   Useful options:
475   link(creat)(OPTION_O_CREAT),
476   link(excl)(OPTION_EXCL),
477   link(noatime)(OPTION_O_NOATIME),
478   link(nofollow)(OPTION_NOFOLLOW),
479   link(append)(OPTION_APPEND),
480   link(rdonly)(OPTION_RDONLY),
481   link(wronly)(OPTION_WRONLY),
482   link(lock)(OPTION_LOCK),
483   link(readbytes)(OPTION_READBYTES),
484   link(ignoreeof)(OPTION_IGNOREEOF)nl()
485   See also:
486   link(CREATE)(ADDRESS_CREAT),
487   link(GOPEN)(ADDRESS_GOPEN),
488   link(UNIX-CONNECT)(ADDRESS_UNIX_CONNECT)
489label(ADDRESS_OPENSSL_CONNECT)dit(bf(tt(OPENSSL:<host>:<port>)))
490   Tries to establish a SSL connection to <port> [link(TCP
491   service)(TYPE_TCP_SERVICE)] on  
492   <host> [link(IP address)(TYPE_IP_ADDRESS)] using TCP/IP version 4 or 6
493   depending on address specification, name resolution, or option
494   link(pf)(OPTION_PROTOCOL_FAMILY).nl()
495   NOTE: The server certificate is only checked for validity against
496   link(cafile)(OPTION_OPENSSL_CAFILE) or link(capath)(OPTION_OPENSSL_CAPATH),
497   but not for match with the server's name or its IP address!nl() 
498   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP4)(GROUP_IP4),link(IP6)(GROUP_IP6),link(TCP)(GROUP_TCP),link(OPENSSL)(GROUP_OPENSSL),link(RETRY)(GROUP_RETRY) nl()
499   Useful options:
500   link(cipher)(OPTION_OPENSSL_CIPHERLIST),
501   link(method)(OPTION_OPENSSL_METHOD),
502   link(verify)(OPTION_OPENSSL_VERIFY),
503   link(cafile)(OPTION_OPENSSL_CAFILE),
504   link(capath)(OPTION_OPENSSL_CAPATH),
505   link(certificate)(OPTION_OPENSSL_CERTIFICATE),
506   link(key)(OPTION_OPENSSL_KEY),
507   link(compress)(OPTION_OPENSSL_COMPRESS),
508   link(bind)(OPTION_BIND),
509   link(pf)(OPTION_PROTOCOL_FAMILY),
510   link(connect-timeout)(OPTION_CONNECT_TIMEOUT),
511   link(sourceport)(OPTION_SOURCEPORT),
512   link(retry)(OPTION_RETRY)nl()
513   See also:
514   link(OPENSSL-LISTEN)(ADDRESS_OPENSSL_LISTEN),
515   link(TCP)(ADDRESS_TCP_CONNECT)
516label(ADDRESS_OPENSSL_LISTEN)dit(bf(tt(OPENSSL-LISTEN:<port>)))
517   Listens on tcp <port> [link(TCP service)(TYPE_TCP_SERVICE)].
518   The IP version is 4 or the one specified with
519   link(pf)(OPTION_PROTOCOL_FAMILY). When a
520   connection is accepted, this address behaves as SSL server.nl()
521   Note: You probably want to use the link(certificate)(OPTION_OPENSSL_CERTIFICATE) option with this address.nl()
522   NOTE: The client certificate is only checked for validity against
523   link(cafile)(OPTION_OPENSSL_CAFILE) or link(capath)(OPTION_OPENSSL_CAPATH),
524   but not for match with the client's name or its IP address!nl()
525   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP4)(GROUP_IP4),link(IP6)(GROUP_IP6),link(TCP)(GROUP_TCP),link(LISTEN)(GROUP_LISTEN),link(OPENSSL)(GROUP_OPENSSL),link(CHILD)(GROUP_CHILD),link(RANGE)(GROUP_RANGE),link(RETRY)(GROUP_RETRY) nl()
526   Useful options:
527   link(pf)(OPTION_PROTOCOL_FAMILY),
528   link(cipher)(OPTION_OPENSSL_CIPHERLIST),
529   link(method)(OPTION_OPENSSL_METHOD),
530   link(verify)(OPTION_OPENSSL_VERIFY),
531   link(cafile)(OPTION_OPENSSL_CAFILE),
532   link(capath)(OPTION_OPENSSL_CAPATH),
533   link(certificate)(OPTION_OPENSSL_CERTIFICATE),
534   link(key)(OPTION_OPENSSL_KEY),
535   link(compress)(OPTION_OPENSSL_COMPRESS),
536   link(fork)(OPTION_FORK),
537   link(bind)(OPTION_BIND),
538   link(range)(OPTION_RANGE),
539   link(tcpwrap)(OPTION_TCPWRAPPERS),
540   link(su)(OPTION_SUBSTUSER),
541   link(reuseaddr)(OPTION_REUSEADDR),
542   link(retry)(OPTION_RETRY)nl()
543   See also:
544   link(OPENSSL)(ADDRESS_OPENSSL_CONNECT),
545   link(TCP-LISTEN)(ADDRESS_TCP_LISTEN)
546label(ADDRESS_NAMED_PIPE)dit(bf(tt(PIPE:<filename>)))
547   If link(<filename>)(TYPE_FILENAME) already exists, it is opened.
548   If it does not exist, a named pipe is created and opened. Beginning with
549   socat version 1.4.3, the named pipe is removed when the address is closed
550   (but see option link(unlink-close)(OPTION_UNLINK_CLOSE)nl()
551   Note: When a pipe is used for both reading and writing, it works
552   as echo service.nl()
553   Note: When a pipe is used for both reading and writing, and socat tries
554   to write more bytes than the pipe can buffer (Linux 2.4: 2048 bytes), socat
555   might block. Consider using socat option, e.g., code(-b 2048) nl()
556   Option groups: link(FD)(GROUP_FD),link(NAMED)(GROUP_NAMED),link(OPEN)(GROUP_OPEN) nl()
557   Useful options:
558   link(rdonly)(OPTION_RDONLY),
559   link(nonblock)(OPTION_NONBLOCK),
560   link(group)(OPTION_GROUP),
561   link(user)(OPTION_USER),
562   link(mode)(OPTION_MODE),
563   link(unlink-early)(OPTION_UNLINK_EARLY)nl()
564   See also: link(unnamed pipe)(ADDRESS_UNNAMED_PIPE)
565label(ADDRESS_UNNAMED_PIPE)dit(bf(tt(PIPE)))
566   Creates an unnamed pipe and uses it for reading and writing. It works as an
567   echo, because everything written 
568   to it appeares immediately as read data.nl()
569   Note: When socat tries to write more bytes than the pipe can queue (Linux
570   2.4: 2048 bytes), socat might block. Consider, e.g., using
571   option code(-b 2048) nl()
572   Option groups: link(FD)(GROUP_FD) nl()
573   See also: link(named pipe)(ADDRESS_NAMED_PIPE)
574label(ADDRESS_PROXY_CONNECT)dit(bf(tt(PROXY:<proxy>:<hostname>:<port>)))
575   Connects to an HTTP proxy server on port 8080 using TCP/IP  version 4 or 6
576   depending on address specification, name resolution, or option
577   link(pf)(OPTION_PROTOCOL_FAMILY), and sends a CONNECT
578   request for hostname:port. If the proxy grants access and succeeds to
579   connect to the target, data transfer between socat and the target can
580   start. Note that the traffic need not be HTTP but can be an arbitrary
581   protocol. nl()
582   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP4)(GROUP_IP4),link(IP6)(GROUP_IP6),link(TCP)(GROUP_TCP),link(HTTP)(GROUP_HTTP),link(RETRY)(GROUP_RETRY) nl()
583   Useful options:
584   link(proxyport)(OPTION_PROXYPORT),
585   link(ignorecr)(OPTION_IGNORECR),
586   link(proxyauth)(OPTION_PROXY_AUTHORIZATION),
587   link(resolve)(OPTION_PROXY_RESOLVE),
588   link(crnl)(OPTION_CRNL),
589   link(bind)(OPTION_BIND),
590   link(connect-timeout)(OPTION_CONNECT_TIMEOUT),
591   link(mss)(OPTION_MSS),
592   link(sourceport)(OPTION_SOURCEPORT),
593   link(retry)(OPTION_RETRY) nl()
594   See also: link(SOCKS)(ADDRESS_SOCKS4), link(TCP)(ADDRESS_TCP_CONNECT)
595label(ADDRESS_PTY)dit(bf(tt(PTY)))
596   Generates a pseudo terminal (pty) and uses its master side. Another process
597   may open the pty's slave side using it like a serial line or terminal.
598   (link(example)(EXAMPLE_ADDRESS_PTY)). If
599   both the ptmx and the openpty mechanisms are available, ptmx is used
600   (POSIX).nl()
601   Option groups: link(FD)(GROUP_FD),link(NAMED)(GROUP_NAMED),link(PTY)(GROUP_PTY),link(TERMIOS)(GROUP_TERMIOS) nl()
602   Useful options:
603   link(link)(OPTION_SYMBOLIC_LINK),
604   link(openpty)(OPTION_OPENPTY),
605   link(wait-slave)(OPTION_PTY_WAIT_SLAVE),
606   link(mode)(OPTION_MODE),
607   link(user)(OPTION_USER),
608   link(group)(OPTION_GROUP)nl()
609   See also:
610   link(UNIX-LISTEN)(ADDRESS_UNIX_LISTEN),
611   link(PIPE)(ADDRESS_NAMED_PIPE),
612   link(EXEC)(ADDRESS_EXEC), link(SYSTEM)(ADDRESS_SYSTEM)
613label(ADDRESS_READLINE)dit(bf(tt(READLINE)))
614   Uses GNU readline and history on stdio to allow editing and reusing input
615   lines (link(example)(EXAMPLE_ADDRESS_READLINE)). This requires the GNU readline and 
616   history libraries. Note that stdio should be a (pseudo) terminal device,
617   otherwise readline does not seem to work.nl()
618   Option groups: link(FD)(GROUP_FD),link(READLINE)(GROUP_READLINE),link(TERMIOS)(GROUP_TERMIOS) nl()
619   Useful options:
620   link(history)(OPTION_HISTORY),
621   link(noecho)(OPTION_NOECHO)nl()
622   See also:
623   link(STDIO)(ADDRESS_STDIO)
624label(ADDRESS_SCTP_CONNECT)dit(bf(tt(SCTP-CONNECT:<host>:<port>)))
625   Establishes an SCTP stream connection to the specified <host> [link(IP
626   address)(TYPE_IP_ADDRESS)] and <port> [link(TCP service)(TYPE_TCP_SERVICE)]
627   using TCP/IP version 4 or 6 depending on address specification, name
628   resolution, or option link(pf)(OPTION_PROTOCOL_FAMILY).nl()
629   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP4)(GROUP_IP4),link(IP6)(GROUP_IP6),link(SCTP)(GROUP_SCTP),link(CHILD)(GROUP_CHILD),link(RETRY)(GROUP_RETRY) nl()
630   Useful options:
631   link(bind)(OPTION_BIND),
632   link(pf)(OPTION_PROTOCOL_FAMILY),
633   link(connect-timeout)(OPTION_CONNECT_TIMEOUT),
634   link(tos)(OPTION_TOS),
635   link(mtudiscover)(OPTION_MTUDISCOVER),
636   link(sctp-maxseg)(OPTION_SCTP_MAXSEG),
637   link(sctp-nodelay)(OPTION_SCTP_NODELAY),
638   link(nonblock)(OPTION_NONBLOCK),
639   link(sourceport)(OPTION_SOURCEPORT),
640   link(retry)(OPTION_RETRY),
641   link(readbytes)(OPTION_READBYTES)nl()
642   See also:
643   link(SCTP4-CONNECT)(ADDRESS_SCTP4_CONNECT),
644   link(SCTP6-CONNECT)(ADDRESS_SCTP6_CONNECT),
645   link(SCTP-LISTEN)(ADDRESS_SCTP_LISTEN),
646   link(TCP-CONNECT)(ADDRESS_TCP_CONNECT)
647label(ADDRESS_SCTP4_CONNECT)dit(bf(tt(SCTP4-CONNECT:<host>:<port>)))
648   Like link(SCTP-CONNECT)(ADDRESS_SCTP_CONNECT), but only supports IPv4 protocol.nl()
649   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP4)(GROUP_IP4),link(SCTP)(GROUP_SCTP),link(CHILD)(GROUP_CHILD),link(RETRY)(GROUP_RETRY) nl()
650label(ADDRESS_SCTP6_CONNECT)dit(bf(tt(SCTP6-CONNECT:<host>:<port>)))
651   Like link(SCTP-CONNECT)(ADDRESS_SCTP_CONNECT), but only supports IPv6 protocol.nl()
652   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP6)(GROUP_IP6),link(SCTP)(GROUP_SCTP),link(CHILD)(GROUP_CHILD),link(RETRY)(GROUP_RETRY) nl()
653label(ADDRESS_SCTP_LISTEN)dit(bf(tt(SCTP-LISTEN:<port>)))
654   Listens on <port> [link(TCP service)(TYPE_TCP_SERVICE)] and accepts a
655   TCP/IP connection. The IP version is 4 or the one specified with
656   address option link(pf)(OPTION_PROTOCOL_FAMILY), socat option
657   (link(-4)(option_4), link(-6)(option_6)), or environment variable link(SOCAT_DEFAULT_LISTEN_IP)(ENV_SOCAT_DEFAULT_LISTEN_IP).
658   Note that opening
659   this address usually blocks until a client connects.nl()
660   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(LISTEN)(GROUP_LISTEN),link(CHILD)(GROUP_CHILD),link(RANGE)(GROUP_RANGE),link(IP4)(GROUP_IP4),link(IP6)(GROUP_IP6),link(SCTP)(GROUP_SCTP),link(RETRY)(GROUP_RETRY) nl()
661   Useful options:
662   link(crnl)(OPTION_CRNL),
663   link(fork)(OPTION_FORK),
664   link(bind)(OPTION_BIND),
665   link(range)(OPTION_RANGE),
666   link(tcpwrap)(OPTION_TCPWRAPPERS),
667   link(pf)(OPTION_PROTOCOL_FAMILY),
668   link(max-children)(OPTION_MAX_CHILDREN),
669   link(backlog)(OPTION_BACKLOG),
670   link(sctp-maxseg)(OPTION_SCTP_MAXSEG),
671   link(sctp-nodelay)(OPTION_SCTP_NODELAY),
672   link(su)(OPTION_SUBSTUSER),
673   link(reuseaddr)(OPTION_REUSEADDR),
674   link(retry)(OPTION_RETRY),
675   link(cool-write)(OPTION_COOL_WRITE)nl()
676   See also:
677   link(SCTP4-LISTEN)(ADDRESS_SCTP4_LISTEN),
678   link(SCTP6-LISTEN)(ADDRESS_SCTP6_LISTEN),
679   link(TCP-LISTEN)(ADDRESS_TCP_LISTEN),
680   link(SCTP-CONNECT)(ADDRESS_SCTP_CONNECT)
681label(ADDRESS_SCTP4_LISTEN)dit(bf(tt(SCTP4-LISTEN:<port>)))
682   Like link(SCTP-LISTEN)(ADDRESS_SCTP_LISTEN), but only supports IPv4
683   protocol.nl() 
684   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(LISTEN)(GROUP_LISTEN),link(CHILD)(GROUP_CHILD),link(RANGE)(GROUP_RANGE),link(IP4)(GROUP_IP4),link(SCTP)(GROUP_SCTP),link(RETRY)(GROUP_RETRY) nl()
685label(ADDRESS_SCTP6_LISTEN)dit(bf(tt(SCTP6-LISTEN:<port>)))
686   Like link(SCTP-LISTEN)(ADDRESS_SCTP_LISTEN), but only supports IPv6
687   protocol.nl() 
688   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(SCTP)(GROUP_SCTP),link(RETRY)(GROUP_RETRY) nl()
689label(ADDRESS_SOCKET_CONNECT)dit(bf(tt(SOCKET-CONNECT:<domain>:<protocol>:<remote-address>)))
690   Creates a stream socket using the first and second given socket parameters
691   and tt(SOCK_STREAM) (see man socket\(2)) and connects to the remote-address.
692   The two socket parameters have to be specified by link(int)(TYPE_INT)
693   numbers. Consult your OS documentation and include files to find the
694   appropriate values. The remote-address must be the link(data)(TYPE_DATA)
695   representation of a sockaddr structure without sa_family and (BSD) sa_len
696   components.nl()
697   Please note that you can - beyond the options of the specified groups - also
698   use options of higher level protocols when you apply socat option
699   link(-g)(option_g).nl()
700   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(CHILD)(GROUP_CHILD),link(RETRY)(GROUP_RETRY)nl()
701   Useful options:
702   link(bind)(OPTION_BIND),
703   link(setsockopt-int)(OPTION_SETSOCKOPT_INT),
704   link(setsockopt-bin)(OPTION_SETSOCKOPT_BIN),
705   link(setsockopt-string)(OPTION_SETSOCKOPT_STRING)
706   nl()
707   See also:
708   link(TCP)(ADDRESS_TCP_CONNECT),
709   link(UDP-CONNECT)(ADDRESS_UDP_CONNECT),
710   link(UNIX-CONNECT)(ADDRESS_UNIX_CONNECT),
711   link(SOCKET-LISTEN)(ADDRESS_SOCKET_LISTEN),
712   link(SOCKET-SENDTO)(ADDRESS_SOCKET_SENDTO)
713label(ADDRESS_SOCKET_DATAGRAM)dit(bf(tt(SOCKET-DATAGRAM:<domain>:<type>:<protocol>:<remote-address>)))
714   Creates a datagram socket using the first three given socket parameters (see
715   man socket\(2)) and sends outgoing data to the remote-address. The three
716   socket parameters have to be specified by link(int)(TYPE_INT)
717   numbers. Consult your OS documentation and include files to find the
718   appropriate values. The remote-address must be the link(data)(TYPE_DATA)
719   representation of a sockaddr structure without sa_family and (BSD) sa_len
720   components.nl()
721   Please note that you can - beyond the options of the specified groups - also
722   use options of higher level protocols when you apply socat option
723   link(-g)(option_g).nl()
724   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(RANGE)(GROUP_RANGE)nl()
725   Useful options:
726   link(bind)(OPTION_BIND),
727   link(range)(OPTION_RANGE),
728   link(setsockopt-int)(OPTION_SETSOCKOPT_INT),
729   link(setsockopt-bin)(OPTION_SETSOCKOPT_BIN),
730   link(setsockopt-string)(OPTION_SETSOCKOPT_STRING)
731   nl()
732   See also:
733   link(UDP-DATAGRAM)(ADDRESS_UDP_DATAGRAM),
734   link(IP-DATAGRAM)(ADDRESS_IP_DATAGRAM),
735   link(SOCKET-SENDTO)(ADDRESS_SOCKET_SENDTO),
736   link(SOCKET-RECV)(ADDRESS_SOCKET_RECV),
737   link(SOCKET-RECVFROM)(ADDRESS_SOCKET_RECVFROM)
738label(ADDRESS_SOCKET_LISTEN)dit(bf(tt(SOCKET-LISTEN:<domain>:<protocol>:<local-address>)))
739   Creates a stream socket using the first and second given socket parameters
740   and tt(SOCK_STREAM) (see man socket\(2)) and waits for incoming connections
741   on local-address. The two socket parameters have to be specified by
742   link(int)(TYPE_INT) numbers. Consult your OS documentation and include files
743   to find the appropriate values. The local-address must be the
744   link(data)(TYPE_DATA) representation of a sockaddr structure without
745   sa_family and (BSD) sa_len components.nl()
746   Please note that you can - beyond the options of the specified groups - also
747   use options of higher level protocols when you apply socat option
748   link(-g)(option_g).nl()
749   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(LISTEN)(GROUP_LISTEN),link(RANGE)(GROUP_RANGE),link(CHILD)(GROUP_CHILD),link(RETRY)(GROUP_RETRY)nl()
750   Useful options:
751   link(setsockopt-int)(OPTION_SETSOCKOPT_INT),
752   link(setsockopt-bin)(OPTION_SETSOCKOPT_BIN),
753   link(setsockopt-string)(OPTION_SETSOCKOPT_STRING)
754   nl()
755   See also:
756   link(TCP)(ADDRESS_TCP_LISTEN),
757   link(UDP-CONNECT)(ADDRESS_UDP_LISTEN),
758   link(UNIX-CONNECT)(ADDRESS_UNIX_LISTEN),
759   link(SOCKET-LISTEN)(ADDRESS_SOCKET_CONNECT),
760   link(SOCKET-SENDTO)(ADDRESS_SOCKET_RECVFROM),
761   link(SOCKET-SENDTO)(ADDRESS_SOCKET_RECV)
762label(ADDRESS_SOCKET_RECV)dit(bf(tt(SOCKET-RECV:<domain>:<type>:<protocol>:<local-address>)))
763   Creates a socket using the three given socket parameters (see man socket\(2))
764   and binds it to <local-address>. Receives arriving data. The three
765   parameters have to be specified by link(int)(TYPE_INT) numbers. Consult your
766   OS documentation and include files to find the appropriate values. The
767   local-address must be the link(data)(TYPE_DATA) representation of a sockaddr
768   structure without sa_family and (BSD) sa_len components.nl()
769   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(RANGE)(GROUP_RANGE)nl()
770   Useful options:
771   link(range)(OPTION_RANGE),
772   link(setsockopt-int)(OPTION_SETSOCKOPT_INT),
773   link(setsockopt-bin)(OPTION_SETSOCKOPT_BIN),
774   link(setsockopt-string)(OPTION_SETSOCKOPT_STRING)
775   nl()
776   See also:
777   link(UDP-RECV)(ADDRESS_UDP_RECV),
778   link(IP-RECV)(ADDRESS_IP_RECV),
779   link(UNIX-RECV)(ADDRESS_UNIX_RECV),
780   link(SOCKET-DATAGRAM)(ADDRESS_SOCKET_DATAGRAM),
781   link(SOCKET-SENDTO)(ADDRESS_SOCKET_SENDTO),
782   link(SOCKET-RECVFROM)(ADDRESS_SOCKET_RECVFROM)
783label(ADDRESS_SOCKET_RECVFROM)dit(bf(tt(SOCKET-RECVFROM:<domain>:<type>:<protocol>:<local-address>)))
784   Creates a socket using the three given socket parameters (see man socket\(2))
785   and binds it to <local-address>. Receives arriving data and sends replies
786   back to the sender. The first three parameters have to be specified as
787   link(int)(TYPE_INT) numbers. Consult your OS documentation and include files
788   to find the appropriate values. The local-address must be the
789   link(data)(TYPE_DATA) representation of a sockaddr structure without
790   sa_family and (BSD) sa_len components.nl()
791   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(CHILD)(GROUP_CHILD),link(RANGE)(GROUP_RANGE)nl()
792   Useful options:
793   link(fork)(OPTION_FORK),
794   link(range)(OPTION_RANGE),
795   link(setsockopt-int)(OPTION_SETSOCKOPT_INT),
796   link(setsockopt-bin)(OPTION_SETSOCKOPT_BIN),
797   link(setsockopt-string)(OPTION_SETSOCKOPT_STRING)
798   nl()
799   See also:
800   link(UDP-RECVFROM)(ADDRESS_UDP_RECVFROM),
801   link(IP-RECVFROM)(ADDRESS_IP_RECVFROM),
802   link(UNIX-RECVFROM)(ADDRESS_UNIX_RECVFROM),
803   link(SOCKET-DATAGRAM)(ADDRESS_SOCKET_DATAGRAM),
804   link(SOCKET-SENDTO)(ADDRESS_SOCKET_SENDTO),
805   link(SOCKET-RECV)(ADDRESS_SOCKET_RECV)
806label(ADDRESS_SOCKET_SENDTO)dit(bf(tt(SOCKET-SENDTO:<domain>:<type>:<protocol>:<remote-address>)))
807   Creates a socket using the three given socket parameters (see man
808   socket\(2)). Sends outgoing data to the given address and receives replies.
809   The three parameters have to be specified as link(int)(TYPE_INT)
810   numbers. Consult your OS documentation and include files to find the
811   appropriate values. The remote-address must be the link(data)(TYPE_DATA)
812   representation of a sockaddr structure without sa_family and (BSD) sa_len
813   components.nl()
814   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET)nl()
815   Useful options:
816   link(bind)(OPTION_BIND),
817   link(setsockopt-int)(OPTION_SETSOCKOPT_INT),
818   link(setsockopt-bin)(OPTION_SETSOCKOPT_BIN),
819   link(setsockopt-string)(OPTION_SETSOCKOPT_STRING)
820   nl()
821   See also:
822   link(UDP-SENDTO)(ADDRESS_UDP_SENDTO),
823   link(IP-SENDTO)(ADDRESS_IP_SENDTO),
824   link(UNIX-SENDTO)(ADDRESS_UNIX_SENDTO),
825   link(SOCKET-DATAGRAM)(ADDRESS_SOCKET_DATAGRAM),
826   link(SOCKET-RECV)(ADDRESS_SOCKET_RECV)
827   link(SOCKET-RECVFROM)(ADDRESS_SOCKET_RECVFROM)
828label(ADDRESS_SOCKS4)dit(bf(tt(SOCKS4:<socks-server>:<host>:<port>)))
829   Connects via <socks-server> [link(IP address)(TYPE_IP_ADDRESS)]
830   to <host> [link(IPv4 address)(TYPE_IPV4_ADDRESS)]
831   on <port> [link(TCP service)(TYPE_TCP_SERVICE)],
832   using socks version 4 protocol over IP version 4 or 6 depending on address specification, name resolution, or option
833   link(pf)(OPTION_PROTOCOL_FAMILY) (link(example)(EXAMPLE_ADDRESS_SOCKS4)).nl()
834   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP4)(GROUP_IP4),link(IP6)(GROUP_IP6),link(TCP)(GROUP_TCP),link(SOCKS4)(GROUP_SOCKS),link(RETRY)(GROUP_RETRY) nl()
835   Useful options:
836   link(socksuser)(OPTION_SOCKSUSER),
837   link(socksport)(OPTION_SOCKSPORT),
838   link(sourceport)(OPTION_SOURCEPORT),
839   link(pf)(OPTION_PROTOCOL_FAMILY),
840   link(retry)(OPTION_RETRY)nl()
841   See also:
842   link(SOCKS4A)(ADDRESS_SOCKS4A),
843   link(PROXY)(ADDRESS_PROXY_CONNECT),
844   link(TCP)(ADDRESS_TCP_CONNECT)
845label(ADDRESS_SOCKS4A)dit(bf(tt(SOCKS4A:<socks-server>:<host>:<port>)))
846   like link(SOCKS4)(ADDRESS_SOCKS4), but uses socks protocol version 4a, thus
847   leaving host name resolution to the socks server.nl()
848   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP4)(GROUP_IP4),link(IP6)(GROUP_IP6),link(TCP)(GROUP_TCP),link(SOCKS4)(GROUP_SOCKS),link(RETRY)(GROUP_RETRY) nl()
849label(ADDRESS_STDERR)dit(bf(tt(STDERR)))
850   Uses file descriptor 2.nl()
851   Option groups: link(FD)(GROUP_FD) (link(TERMIOS)(GROUP_TERMIOS),link(REG)(GROUP_REG),link(SOCKET)(GROUP_SOCKET)) nl()
852   See also: link(FD)(ADDRESS_FD)
853label(ADDRESS_STDIN)dit(bf(tt(STDIN)))
854   Uses file descriptor 0.nl()
855   Option groups: link(FD)(GROUP_FD) (link(TERMIOS)(GROUP_TERMIOS),link(REG)(GROUP_REG),link(SOCKET)(GROUP_SOCKET)) nl()
856   Useful options:
857   link(readbytes)(OPTION_READBYTES)nl()
858   See also: link(FD)(ADDRESS_FD)
859label(ADDRESS_STDIO)dit(bf(tt(STDIO)))
860   Uses file descriptor 0 for reading, and 1 for writing.nl()
861   Option groups: link(FD)(GROUP_FD) (link(TERMIOS)(GROUP_TERMIOS),link(REG)(GROUP_REG),link(SOCKET)(GROUP_SOCKET)) nl()
862   Useful options:
863   link(readbytes)(OPTION_READBYTES)nl()
864   See also: link(FD)(ADDRESS_FD)
865label(ADDRESS_STDOUT)dit(bf(tt(STDOUT)))
866   Uses file descriptor 1.nl()
867   Option groups: link(FD)(GROUP_FD) (link(TERMIOS)(GROUP_TERMIOS),link(REG)(GROUP_REG),link(SOCKET)(GROUP_SOCKET)) nl()
868   See also: link(FD)(ADDRESS_FD)
869label(ADDRESS_SYSTEM)dit(bf(tt(SYSTEM:<shell-command>)))
870   Forks a sub process that establishes communication with its parent process
871   and invokes the specified program with code(system()). Please note that
872   <shell-command> [link(string)(TYPE_STRING)] must 
873   not contain ',' or "!!", and that shell meta characters may have to be
874   protected.
875   After successful program start, socat() writes data to stdin of the 
876   process and reads from its stdout.nl()
877   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(EXEC)(GROUP_EXEC),link(FORK)(GROUP_FORK),link(TERMIOS)(GROUP_TERMIOS) nl()
878   Useful options:
879   link(path)(OPTION_PATH),
880   link(fdin)(OPTION_FDIN),
881   link(fdout)(OPTION_FDOUT),
882   link(chroot)(OPTION_CHROOT),
883   link(su)(OPTION_SUBSTUSER),
884   link(su-d)(OPTION_SUBSTUSER_DELAYED),
885   link(nofork)(OPTION_NOFORK),
886   link(pty)(OPTION_PTY),
887   link(stderr)(OPTION_STDERR),
888   link(ctty)(OPTION_CTTY),
889   link(setsid)(OPTION_SETSID),
890   link(pipes)(OPTION_PIPES),
891   link(sigint)(OPTION_SIGINT),
892   link(sigquit)(OPTION_SIGQUIT)nl()
893   See also: link(EXEC)(ADDRESS_EXEC)
894label(ADDRESS_TCP_CONNECT)dit(bf(tt(TCP:<host>:<port>)))
895   Connects to <port> [link(TCP service)(TYPE_TCP_SERVICE)] on
896   <host> [link(IP address)(TYPE_IP_ADDRESS)] using TCP/IP version 4 or 6
897   depending on address specification, name resolution, or option
898   link(pf)(OPTION_PROTOCOL_FAMILY).nl() 
899   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP4)(GROUP_IP4),link(IP6)(GROUP_IP6),link(TCP)(GROUP_TCP),link(RETRY)(GROUP_RETRY) nl()
900   Useful options:
901   link(crnl)(OPTION_CRNL),
902   link(bind)(OPTION_BIND),
903   link(pf)(OPTION_PROTOCOL_FAMILY),
904   link(connect-timeout)(OPTION_CONNECT_TIMEOUT),
905   link(tos)(OPTION_TOS),
906   link(mtudiscover)(OPTION_MTUDISCOVER),
907   link(mss)(OPTION_MSS),
908   link(nodelay)(OPTION_NODELAY),
909   link(nonblock)(OPTION_NONBLOCK),
910   link(sourceport)(OPTION_SOURCEPORT),
911   link(retry)(OPTION_RETRY),
912   link(readbytes)(OPTION_READBYTES)nl()
913   See also:
914   link(TCP4)(ADDRESS_TCP4_CONNECT),
915   link(TCP6)(ADDRESS_TCP6_CONNECT),
916   link(TCP-LISTEN)(ADDRESS_TCP_LISTEN),
917   link(UDP)(ADDRESS_UDP_CONNECT),
918   link(SCTP-CONNECT)(ADDRESS_SCTP_CONNECT),
919   link(UNIX-CONNECT)(ADDRESS_UNIX_CONNECT)
920label(ADDRESS_TCP4_CONNECT)dit(bf(tt(TCP4:<host>:<port>)))
921   Like link(TCP)(ADDRESS_TCP_CONNECT), but only supports IPv4 protocol (link(example)(EXAMPLE_ADDRESS_TCP4_CONNECT)).nl()
922   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP4)(GROUP_IP4),link(TCP)(GROUP_TCP),link(RETRY)(GROUP_RETRY) nl()
923label(ADDRESS_TCP6_CONNECT)dit(bf(tt(TCP6:<host>:<port>)))
924   Like link(TCP)(ADDRESS_TCP_CONNECT), but only supports IPv6 protocol.nl()
925   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP6)(GROUP_IP6),link(TCP)(GROUP_TCP),link(RETRY)(GROUP_RETRY) nl()
926label(ADDRESS_TCP_LISTEN)dit(bf(tt(TCP-LISTEN:<port>)))
927   Listens on <port> [link(TCP service)(TYPE_TCP_SERVICE)] and accepts a
928   TCP/IP connection. The IP version is 4 or the one specified with
929   address option link(pf)(OPTION_PROTOCOL_FAMILY), socat option
930   (link(-4)(option_4), link(-6)(option_6)), or environment variable link(SOCAT_DEFAULT_LISTEN_IP)(ENV_SOCAT_DEFAULT_LISTEN_IP).
931   Note that opening
932   this address usually blocks until a client connects.nl()
933   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(LISTEN)(GROUP_LISTEN),link(CHILD)(GROUP_CHILD),link(RANGE)(GROUP_RANGE),link(IP4)(GROUP_IP4),link(IP6)(GROUP_IP6),link(TCP)(GROUP_TCP),link(RETRY)(GROUP_RETRY) nl()
934   Useful options:
935   link(crnl)(OPTION_CRNL),
936   link(fork)(OPTION_FORK),
937   link(bind)(OPTION_BIND),
938   link(range)(OPTION_RANGE),
939   link(tcpwrap)(OPTION_TCPWRAPPERS),
940   link(pf)(OPTION_PROTOCOL_FAMILY),
941   link(max-children)(OPTION_MAX_CHILDREN),
942   link(backlog)(OPTION_BACKLOG),
943   link(mss)(OPTION_MSS),
944   link(su)(OPTION_SUBSTUSER),
945   link(reuseaddr)(OPTION_REUSEADDR),
946   link(retry)(OPTION_RETRY),
947   link(cool-write)(OPTION_COOL_WRITE)nl()
948   See also:
949   link(TCP4-LISTEN)(ADDRESS_TCP4_LISTEN),
950   link(TCP6-LISTEN)(ADDRESS_TCP6_LISTEN),
951   link(UDP-LISTEN)(ADDRESS_UDP_LISTEN),
952   link(SCTP-LISTEN)(ADDRESS_SCTP_LISTEN),
953   link(UNIX-LISTEN)(ADDRESS_UNIX_LISTEN),
954   link(OPENSSL-LISTEN)(ADDRESS_OPENSSL_LISTEN),
955   link(TCP-CONNECT)(ADDRESS_TCP_CONNECT)
956label(ADDRESS_TCP4_LISTEN)dit(bf(tt(TCP4-LISTEN:<port>)))
957   Like link(TCP-LISTEN)(ADDRESS_TCP_LISTEN), but only supports IPv4
958   protocol (link(example)(EXAMPLE_ADDRESS_TCP4_LISTEN)).nl() 
959   Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(LISTEN)(GROUP_LISTEN),link(CHILD)(GROUP_CHILD),link(RANGE)(GROUP_RANGE),link(IP4)(GROUP_IP4),link(TCP)(GROUP_TCP),link(RETRY)(GROUP_RETRY) nl()
960label(ADDRESS_TCP6_LISTEN)dit(bf(tt(TCP6-LISTEN:<port>)))
961   Like link(TCP-LISTEN)(ADDRESS_TCP_LISTEN), but only supports IPv6
962   protocol.nl()
963   Additional useful option:
964   link(ipv6only)(OPTION_IPV6_V6ONLY)nl()
965   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()
966label(ADDRESS_TUN)dit(bf(tt(TUN[:<if-addr>/<bits>])))
967   Creates a Linux TUN/TAP device and optionally assignes it the address and
968

Large files files are truncated, but you can click here to view the full file