1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-06-27 10:08:42 +00:00

Small fixes with tests, logs, comments, and doc

This commit is contained in:
Gerhard 2025-02-17 20:39:06 +01:00
parent 9269897bab
commit 436d764029
6 changed files with 36 additions and 31 deletions

View file

@ -774,8 +774,8 @@ label(ADDRESS_SOCKETPAIR)dit(bf(tt(SOCKETPAIR)))
See also: link(unnamed pipe)(ADDRESS_UNNAMED_PIPE)
label(ADDRESS_POSIXMQ_READ)dit(bf(tt(POSIXMQ-READ:/<mqueue>)))
Opens the specified POSIX message queue and reads messages (packets). It
keeps the boundaries.nl()
Opens or creates the specified POSIX message queue and reads messages
(packets). It keeps the packet boundaries.nl()
This is a read-only address, see options link(-u)(option_u) and
link(-U)(option_U) and link(dual addresses)(ADDRESS_DUAL).nl()
Socat() provides this address type only on Linux because POSIX MQ is based
@ -791,7 +791,8 @@ label(ADDRESS_POSIXMQ_READ)dit(bf(tt(POSIXMQ-READ:/<mqueue>)))
label(ADDRESS_POSIXMQ_RECEIVE)dit(bf(tt(POSIXMQ-RECEIVE:/<mqueue>)))
dit(bf(tt(POSIXMQ-RECV:/<mqueue>)))
Opens the specified POSIX message queue and reads one message (packet).nl()
Opens or creates the specified POSIX message queue and reads one message
(packet).nl()
This is a read-only address. See link(POSIXMQ-READ)(ADDRESS_POSIXMQ_READ)
for more info.nl()
Example: link(POSIX MQ recv with fork)(EXAMPLE_POSIXMQ_RECV_FORK)nl()
@ -806,12 +807,14 @@ dit(bf(tt(POSIXMQ-RECV:/<mqueue>)))
link(umask)(OPTION_UMASK)
label(ADDRESS_POSIXMQ_SEND)dit(bf(tt(POSIXMQ-SEND:/<mqueue>)))
Opens the specified POSIX message queue and writes messages (packets).nl()
Opens or creates the specified POSIX message queue and writes messages
(packets).nl()
This is a write-only address. See link(POSIXMQ-READ)(ADDRESS_POSIXMQ_READ)
for more info.nl()
(link(Example)(EXAMPLE_POSIXMQ_SEND))nl()
Useful options:
link(posixmq-priority)(OPTION_POSIXMQ_PRIORITY),
link(posixmq-flush)(OPTION_POSIXMQ_FLUSH),
link(fork)(OPTION_FORK),
link(max-children)(OPTION_MAX_CHILDREN),
link(unlink-early)(OPTION_UNLINK_EARLY),
@ -822,8 +825,8 @@ label(ADDRESS_POSIXMQ_SEND)dit(bf(tt(POSIXMQ-SEND:/<mqueue>)))
label(ADDRESS_POSIXMQ_BIDIRECTIONAL)dit(bf(tt(POSIXMQ-BIDIRECTIONAL:/mqueue)))
dit(bf(tt(POSIXMQ:/mqueue)))
Opens the specified POSIX message queue in read and/or write mode depending
on context, then reads and/or writes messages (packets).
Opens or creates the specified POSIX message queue in read and/or write mode
depending on context, then reads and/or writes messages (packets).
In bidirectional mode this is just another echo service.nl()
See link(POSIXMQ-READ)(ADDRESS_POSIXMQ_READ) and
link(POSIXMQ-SEND)(ADDRESS_POSIXMQ_SEND) for more info.
@ -2180,8 +2183,8 @@ label(OPTION_SETSID)dit(bf(tt(setsid)))
Makes the process the leader of a new session (link(example)(EXAMPLE_OPTION_SETSID)).
label(OPTION_NETNS)dit(bf(tt(netns=<net-namespace-name>)))
Before opening the address it tries to switch to the named network namespace.
After opening the address it switches back to the previous namespace.
(link(Example with TCP forwarder)(EXAMPLE_OPTION_NETNS),
After opening the address it switches back to the previous namespace
(link(example with TCP forwarder)(EXAMPLE_OPTION_NETNS),
link(example with virtual network connection)(EXAMPLE_TUN_NETNS)).nl()
Only on Linux; requires root; use option tt(--experimental).nl()
enddit()
@ -2547,7 +2550,8 @@ dit(bf(tt(ipv6-join-source-group=<multicast-address:interface-index:source-addre
IPv4 variant. The option takes the IP address of the multicast group,
info about the desired network interface and the source IP address of the
multicast traffic. The indices of active network interfaces can be shown
using the utility procan().
using the utility procan().nl()
This feature is experimental.
label(OPTION_IP_MULTICAST_IF)
dit(bf(tt(ip-multicast-if=<hostname>)))
Specifies hostname or address of the network interface to be used for
@ -3520,11 +3524,11 @@ label(OPTION_POSIXMQ_FLUSH)dit(bf(tt(posixmq-flush (mq-flush))))
label(OPTION_POSIXMQ_MAXMSG)dit(bf(tt(posixmq-maxmsg (mq-maxmsg))))
Sets the maxmsg parameter of the POSIX message queue when creating it.
Note: You need root or CAP_SYS_RESOURCE to exceed the default value
(<tt>/proc/sys/fs/mqueue/msg_default</tt>).
(code(/proc/sys/fs/mqueue/msg_default)).
label(OPTION_POSIXMQ_MSGSIZE)dit(bf(tt(posixmq-msgsize (mq-msgsize))))
Sets the msgsize parameter of the POSIX message queue when creating it.
Note: You need root or CAP_SYS_RESOURCE to exceed the default value
(<tt>/proc/sys/fs/mqueue/msgsize_default</tt>).
(code(/proc/sys/fs/mqueue/msgsize_default)).
enddit()