Config-Model-Systemd
view release on metacpan or search on metacpan
lib/Config/Model/models/Systemd/Section/Socket.pl view on Meta::CPAN
set to the empty string. C<vsock> may be replaced with
C<vsock-stream>, C<vsock-dgram> or C<vsock-seqpacket>
to force usage of the corresponding socket type.
Note that C<SOCK_SEQPACKET> (i.e.
C<ListenSequentialPacket>) is only available
for C<AF_UNIX> sockets.
C<SOCK_STREAM> (i.e.
C<ListenStream>) when used for IP sockets
refers to TCP sockets, C<SOCK_DGRAM> (i.e.
C<ListenDatagram>) to UDP.
These options may be specified more than once, in which
case incoming traffic on any of the sockets will trigger
service activation, and all listed sockets will be passed to
the service, regardless of whether there is incoming traffic
on them or not. If the empty string is assigned to any of
these options, the list of addresses to listen on is reset,
all prior uses of any of these options will have no
effect.
It is also possible to have more than one socket unit
for the same service when using C<Service>,
and the service will receive all the sockets configured in all
the socket units. Sockets configured in one unit are passed in
the order of configuration, but no ordering between socket
units is specified.
If an IP address is used here, it is often desirable to
listen on it before the interface it is configured on is up
and running, and even regardless of whether it will be up and
running at any point. To deal with this, it is recommended to
set the C<FreeBind> option described
below.',
'ListenFIFO' => 'Specifies a file system FIFO (see L<fifo(7)> for
details) to listen on. This expects an absolute file system path as argument. Behavior otherwise is
very similar to the C<ListenDatagram> directive above.',
'ListenMessageQueue' => 'Specifies a POSIX message queue name to listen on (see L<mq_overview(7)>
for details). This expects a valid message queue name (i.e. beginning with
C</>). Behavior otherwise is very similar to the C<ListenFIFO>
directive above. On Linux message queue descriptors are actually file descriptors and can be
inherited between processes.',
'ListenNetlink' => 'Specifies a Netlink family to create a socket
for to listen on. This expects a short string referring to the
C<AF_NETLINK> family name (such as
C<audit> or C<kobject-uevent>)
as argument, optionally suffixed by a whitespace followed by a
multicast group integer. Behavior otherwise is very similar to
the C<ListenDatagram> directive
above.',
'ListenSequentialPacket' => '*ListenDatagram',
'ListenSpecial' => 'Specifies a special file in the file system to
listen on. This expects an absolute file system path as
argument. Behavior otherwise is very similar to the
C<ListenFIFO> directive above. Use this to
open character device nodes as well as special files in
C</proc/> and
C</sys/>.',
'ListenStream' => '*ListenDatagram',
'ListenUSBFunction' => 'Specifies a L<USB
FunctionFS|https://docs.kernel.org/usb/functionfs.html> endpoints location to listen on, for
implementation of USB gadget functions. This expects an
absolute file system path of a FunctionFS mount point as the argument.
Behavior otherwise is very similar to the C<ListenFIFO>
directive above. Use this to open the FunctionFS endpoint
C<ep0>. When using this option, the
activated service has to have the
C<USBFunctionDescriptors> and
C<USBFunctionStrings> options set.
',
'Mark' => 'Takes an integer value. Controls the firewall mark of packets generated by this
socket. This can be used in the firewall logic to filter packets from this socket. This sets the
C<SO_MARK> socket option. See L<iptables(8)> for
details.',
'MaxConnections' => 'The maximum number of connections to simultaneously run services instances for, when
C<Accept=yes> is set. If more concurrent connections are coming in, they will be refused
until at least one existing connection is terminated. This setting has no effect on sockets configured
with C<Accept=no> or datagram sockets. Defaults to 64.',
'MaxConnectionsPerSource' => 'The maximum number of connections for a service per source IP address (in case of
IPv4/IPv6), per source CID (in case of C<AF_VSOCK>), or source UID (in case of
C<AF_UNIX>). This is very similar to the C<MaxConnections>
directive above. Defaults to 0, i.e. disabled.',
'MessageQueueMaxMessages' => 'These two settings take integer values and
control the mq_maxmsg field or the mq_msgsize field,
respectively, when creating the message queue. Note that
either none or both of these variables need to be set. See
L<mq_setattr(3)>
for details.',
'NoDelay' => 'Takes a boolean argument. TCP Nagle\'s
algorithm works by combining a number of small outgoing
messages, and sending them all at once. This controls the
TCP_NODELAY socket option (see
L<tcp(7)>).
Defaults to C<false>.',
'PassCredentials' => 'Takes a boolean value. This controls the C<SO_PASSCRED> socket
option, which allows C<AF_UNIX> sockets to receive the credentials of the sending
process in an ancillary message. Defaults to C<false>.',
'PassFileDescriptorsToExec' => 'Takes a boolean argument. Defaults to off. If enabled, file descriptors created by
the socket unit are passed to C<ExecStartPost>, C<ExecStopPre>, and
C<ExecStopPost> commands from the socket unit. The passed file descriptors can be
accessed with
L<sd_listen_fds(3)> as
if the commands were invoked from the associated service units. Note that
C<ExecStartPre> command cannot access socket file descriptors.',
'PassPIDFD' => 'Takes a boolean value. This controls the C<SO_PASSPIDFD> socket
option, which allows C<AF_UNIX> sockets to receive the pidfd of the sending
process in an ancillary message. Defaults to C<false>.',
'PassPacketInfo' => 'Takes a boolean value. This controls the C<IP_PKTINFO>,
C<IPV6_RECVPKTINFO>, C<NETLINK_PKTINFO> or
C<PACKET_AUXDATA> socket options, which enable reception of additional per-packet
metadata as ancillary message, on C<AF_INET>, C<AF_INET6>,
C<AF_UNIX> and C<AF_PACKET> sockets. Defaults to
C<false>.',
'PassSecurity' => 'Takes a boolean value. This controls the C<SO_PASSSEC> socket
option, which allows C<AF_UNIX> sockets to receive the security context of the
sending process in an ancillary message. Defaults to C<false>.',
'PipeSize' => 'Takes a size in bytes. Controls the pipe
buffer size of FIFOs configured in this socket unit. See
L<fcntl(2)>
for details. The usual suffixes K, M, G are supported and are
understood to the base of 1024.',
'PollLimitBurst' => 'Configures a limit on how often polling events on the file descriptors backing this
socket unit will be considered. This pair of settings is similar to
C<TriggerLimitIntervalSec>/C<TriggerLimitBurst> but instead of
putting a (fatal) limit on the activation frequency puts a (transient) limit on the polling
( run in 0.465 second using v1.01-cache-2.11-cpan-817d5f8af8b )