mirror of
https://repo.or.cz/socat.git
synced 2025-06-17 22:46:50 +00:00
New alias POSIXMQ for POSIXMQ-BIDIRECTIONAL
This commit is contained in:
parent
1ea37d48c2
commit
c4844692f3
3 changed files with 33 additions and 13 deletions
5
CHANGES
5
CHANGES
|
@ -49,13 +49,16 @@ Features:
|
||||||
POSIXMQ-RECV now takes option o-nonblock; this, in combination with -T,
|
POSIXMQ-RECV now takes option o-nonblock; this, in combination with -T,
|
||||||
makes it possible to terminate Socat in case the queue is empty.
|
makes it possible to terminate Socat in case the queue is empty.
|
||||||
|
|
||||||
New option posixmq-flush (mq-flush) for POSIXMQ addresses empty the
|
New option posixmq-flush (mq-flush) for POSIXMQ addresses empties the
|
||||||
queue before starting to transfer data.
|
queue before starting to transfer data.
|
||||||
Test: LINUX_POSIXMQ_FLUSH
|
Test: LINUX_POSIXMQ_FLUSH
|
||||||
|
|
||||||
New options posixmq-maxmsg, posixmq-msgsize.
|
New options posixmq-maxmsg, posixmq-msgsize.
|
||||||
Tests: POSIXMQ_MAXMSG POSIXMQ_MSGSIZE
|
Tests: POSIXMQ_MAXMSG POSIXMQ_MSGSIZE
|
||||||
|
|
||||||
|
POSIXMQ is now an alias for POSIXMQ-BIDIRECTIONAL. It can also be used
|
||||||
|
in unidirectional context.
|
||||||
|
|
||||||
Building:
|
Building:
|
||||||
Disabling certain features during configure could break build process.
|
Disabling certain features during configure could break build process.
|
||||||
|
|
||||||
|
|
40
doc/socat.yo
40
doc/socat.yo
|
@ -313,6 +313,7 @@ label(ADDRESS_CREAT)dit(bf(tt(CREATE:<filename>)))
|
||||||
if <filename> refers to a socket, this is an error.nl()
|
if <filename> refers to a socket, this is an error.nl()
|
||||||
Option groups: link(FD)(GROUP_FD),link(REG)(GROUP_REG),link(NAMED)(GROUP_NAMED) nl()
|
Option groups: link(FD)(GROUP_FD),link(REG)(GROUP_REG),link(NAMED)(GROUP_NAMED) nl()
|
||||||
Useful options:
|
Useful options:
|
||||||
|
link(mode)(OPTION_UMASK),
|
||||||
link(mode)(OPTION_MODE),
|
link(mode)(OPTION_MODE),
|
||||||
link(user)(OPTION_USER),
|
link(user)(OPTION_USER),
|
||||||
link(group)(OPTION_GROUP),
|
link(group)(OPTION_GROUP),
|
||||||
|
@ -583,7 +584,7 @@ label(ADDRESS_OPEN)dit(bf(tt(OPEN:<filename>)))
|
||||||
Option groups: link(FD)(GROUP_FD),link(REG)(GROUP_REG),link(NAMED)(GROUP_NAMED),link(OPEN)(GROUP_OPEN) nl()
|
Option groups: link(FD)(GROUP_FD),link(REG)(GROUP_REG),link(NAMED)(GROUP_NAMED),link(OPEN)(GROUP_OPEN) nl()
|
||||||
Useful options:
|
Useful options:
|
||||||
link(creat)(OPTION_O_CREAT),
|
link(creat)(OPTION_O_CREAT),
|
||||||
link(excl)(OPTION_EXCL),
|
link(excl)(OPTION_O_EXCL),
|
||||||
link(noatime)(OPTION_O_NOATIME),
|
link(noatime)(OPTION_O_NOATIME),
|
||||||
link(nofollow)(OPTION_NOFOLLOW),
|
link(nofollow)(OPTION_NOFOLLOW),
|
||||||
link(append)(OPTION_APPEND),
|
link(append)(OPTION_APPEND),
|
||||||
|
@ -783,7 +784,10 @@ label(ADDRESS_POSIXMQ_READ)dit(bf(tt(POSIXMQ-READ:/<mqueue>)))
|
||||||
link(posixmq-priority)(OPTION_POSIXMQ_PRIORITY),
|
link(posixmq-priority)(OPTION_POSIXMQ_PRIORITY),
|
||||||
link(unlink-early)(OPTION_UNLINK_EARLY),
|
link(unlink-early)(OPTION_UNLINK_EARLY),
|
||||||
link(unlink-close)(OPTION_UNLINK_CLOSE),
|
link(unlink-close)(OPTION_UNLINK_CLOSE),
|
||||||
link(o-nonblock)(OPTION_O_NONBLOCK)
|
link(o-nonblock)(OPTION_O_NONBLOCK),
|
||||||
|
link(o-creat)(OPTION_O_CREAT),
|
||||||
|
link(o-excl)(OPTION_O_EXCL),
|
||||||
|
link(umask)(OPTION_UMASK)
|
||||||
|
|
||||||
label(ADDRESS_POSIXMQ_RECEIVE)dit(bf(tt(POSIXMQ-RECEIVE:/<mqueue>)))
|
label(ADDRESS_POSIXMQ_RECEIVE)dit(bf(tt(POSIXMQ-RECEIVE:/<mqueue>)))
|
||||||
dit(bf(tt(POSIXMQ-RECV:/<mqueue>)))
|
dit(bf(tt(POSIXMQ-RECV:/<mqueue>)))
|
||||||
|
@ -796,7 +800,10 @@ dit(bf(tt(POSIXMQ-RECV:/<mqueue>)))
|
||||||
link(fork)(OPTION_FORK),
|
link(fork)(OPTION_FORK),
|
||||||
link(max-children)(OPTION_MAX_CHILDREN),
|
link(max-children)(OPTION_MAX_CHILDREN),
|
||||||
link(unlink-early)(OPTION_UNLINK_EARLY),
|
link(unlink-early)(OPTION_UNLINK_EARLY),
|
||||||
link(unlink-close)(OPTION_UNLINK_CLOSE)
|
link(unlink-close)(OPTION_UNLINK_CLOSE),
|
||||||
|
link(o-creat)(OPTION_O_CREAT),
|
||||||
|
link(o-excl)(OPTION_O_EXCL),
|
||||||
|
link(umask)(OPTION_UMASK)
|
||||||
|
|
||||||
label(ADDRESS_POSIXMQ_SEND)dit(bf(tt(POSIXMQ-SEND:/<mqueue>)))
|
label(ADDRESS_POSIXMQ_SEND)dit(bf(tt(POSIXMQ-SEND:/<mqueue>)))
|
||||||
Opens the specified POSIX message queue and writes messages (packets).nl()
|
Opens the specified POSIX message queue and writes messages (packets).nl()
|
||||||
|
@ -808,12 +815,18 @@ label(ADDRESS_POSIXMQ_SEND)dit(bf(tt(POSIXMQ-SEND:/<mqueue>)))
|
||||||
link(fork)(OPTION_FORK),
|
link(fork)(OPTION_FORK),
|
||||||
link(max-children)(OPTION_MAX_CHILDREN),
|
link(max-children)(OPTION_MAX_CHILDREN),
|
||||||
link(unlink-early)(OPTION_UNLINK_EARLY),
|
link(unlink-early)(OPTION_UNLINK_EARLY),
|
||||||
link(unlink-close)(OPTION_UNLINK_CLOSE)
|
link(unlink-close)(OPTION_UNLINK_CLOSE),
|
||||||
|
link(o-creat)(OPTION_O_CREAT),
|
||||||
|
link(o-excl)(OPTION_O_EXCL),
|
||||||
|
link(umask)(OPTION_UMASK)
|
||||||
|
|
||||||
label(ADDRESS_POSIXMQ_BIDIRECTIONAL)dit(bf(tt(POSIXMQ-BIDIRECTIONAL:/mqueue)))
|
label(ADDRESS_POSIXMQ_BIDIRECTIONAL)dit(bf(tt(POSIXMQ-BIDIRECTIONAL:/mqueue)))
|
||||||
Opens the specified POSIX message queue and writes and reads messages
|
dit(bf(tt(POSIXMQ:/mqueue)))
|
||||||
(packet). This is probably rarely useful but has been implemented for
|
Opens the specified POSIX message queue in read and/or write mode depending
|
||||||
functional completeness.
|
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.
|
||||||
|
|
||||||
label(ADDRESS_PROXY_CONNECT)dit(bf(tt(PROXY:<proxy>:<hostname>:<port>)))
|
label(ADDRESS_PROXY_CONNECT)dit(bf(tt(PROXY:<proxy>:<hostname>:<port>)))
|
||||||
Connects to an HTTP proxy server on port 8080 using TCP/IP version 4 or 6
|
Connects to an HTTP proxy server on port 8080 using TCP/IP version 4 or 6
|
||||||
|
@ -1837,8 +1850,10 @@ label(OPTION_MODE)dit(bf(tt(mode=<mode>)))
|
||||||
system calls, socat() uses the code(chmod()) system call after opening the
|
system calls, socat() uses the code(chmod()) system call after opening the
|
||||||
filesystem entry or binding to the unixdomain() socket (race condition!).
|
filesystem entry or binding to the unixdomain() socket (race condition!).
|
||||||
Otherwise, socat() sets the mode of the stream
|
Otherwise, socat() sets the mode of the stream
|
||||||
using code(fchmod()).
|
using code(fchmod()) which, btw, might not have any effect.nl()
|
||||||
These calls might require ownership or root privilege.
|
These calls might require ownership or root privilege.nl()
|
||||||
|
Note: this option can only tighten the permissions implied by processes
|
||||||
|
umask. See option link(umask)(OPTION_UMASK) to loosen permissions.
|
||||||
label(OPTION_PERM_LATE)dit(bf(tt(perm-late=<mode>)))
|
label(OPTION_PERM_LATE)dit(bf(tt(perm-late=<mode>)))
|
||||||
Sets the permissions of the fd to value <mode>
|
Sets the permissions of the fd to value <mode>
|
||||||
[link(mode_t)(TYPE_MODE_T)] using the code(fchmod()) system call after
|
[link(mode_t)(TYPE_MODE_T)] using the code(fchmod()) system call after
|
||||||
|
@ -1991,7 +2006,7 @@ label(OPTION_O_CREAT)dit(bf(tt(creat[=<bool>])))
|
||||||
Creates the file if it does not exist (link(example)(EXAMPLE_OPTION_CREAT)).
|
Creates the file if it does not exist (link(example)(EXAMPLE_OPTION_CREAT)).
|
||||||
label(OPTION_DSYNC)dit(bf(tt(dsync[=<bool>])))
|
label(OPTION_DSYNC)dit(bf(tt(dsync[=<bool>])))
|
||||||
Blocks code(write()) calls until metainfo is physically written to media.
|
Blocks code(write()) calls until metainfo is physically written to media.
|
||||||
label(OPTION_EXCL)dit(bf(tt(excl[=<bool>])))
|
label(OPTION_O_EXCL)dit(bf(tt(excl[=<bool>])))
|
||||||
With option creat, if file exists this is an error.
|
With option creat, if file exists this is an error.
|
||||||
label(OPTION_LARGEFILE)dit(bf(tt(largefile[=<bool>])))
|
label(OPTION_LARGEFILE)dit(bf(tt(largefile[=<bool>])))
|
||||||
On 32 bit systems, allows a file larger than 2^31 bytes.
|
On 32 bit systems, allows a file larger than 2^31 bytes.
|
||||||
|
@ -2106,8 +2121,9 @@ label(OPTION_CHDIR)dit(bf(tt(chdir=<filename>))) dit(bf(tt(cd=<filename>)))
|
||||||
label(OPTION_UMASK)dit(bf(tt(umask=<mode>)))
|
label(OPTION_UMASK)dit(bf(tt(umask=<mode>)))
|
||||||
Sets the umask of the process to <mode> [link(mode_t)(TYPE_MODE_T)] before
|
Sets the umask of the process to <mode> [link(mode_t)(TYPE_MODE_T)] before
|
||||||
opening the address. Useful when file system entries are created or a shell
|
opening the address. Useful when file system entries are created or a shell
|
||||||
or program is invoked. Usually the value is specified as octal number.nl()
|
or program is invoked. Usually the value is specified as octal number with
|
||||||
The processes tt(umask) value is inherited by child processes.
|
leading '0'.nl()
|
||||||
|
The processes tt(umask) value is inherited by child processes.nl()
|
||||||
Note: umask is an inverted value: creating a file with umask=0026 results in
|
Note: umask is an inverted value: creating a file with umask=0026 results in
|
||||||
permissions 0640.
|
permissions 0640.
|
||||||
enddit()
|
enddit()
|
||||||
|
|
|
@ -177,6 +177,7 @@ const struct addrname addressnames[] = {
|
||||||
{ "PIPE", &xioaddr_pipe },
|
{ "PIPE", &xioaddr_pipe },
|
||||||
#endif
|
#endif
|
||||||
#if WITH_POSIXMQ
|
#if WITH_POSIXMQ
|
||||||
|
{ "POSIXMQ", &xioaddr_posixmq_bidir },
|
||||||
{ "POSIXMQ-BIDIRECTIONAL", &xioaddr_posixmq_bidir },
|
{ "POSIXMQ-BIDIRECTIONAL", &xioaddr_posixmq_bidir },
|
||||||
{ "POSIXMQ-READ", &xioaddr_posixmq_read },
|
{ "POSIXMQ-READ", &xioaddr_posixmq_read },
|
||||||
{ "POSIXMQ-RECEIVE", &xioaddr_posixmq_receive },
|
{ "POSIXMQ-RECEIVE", &xioaddr_posixmq_receive },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue