- under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
<para><function>sd_is_socket()</function> may be
called to check whether the specified file descriptor
<para><function>sd_is_socket()</function> may be
called to check whether the specified file descriptor
- AF_UNSPEC it is checked whether the socket is of the
- specified family (AF_UNIX, AF_INET, ...). If the
+ <constant>AF_UNSPEC</constant> it is checked whether
+ the socket is of the specified family (AF_UNIX,
+ <constant>AF_INET</constant>, ...). If the
<parameter>type</parameter> parameter is not 0 it is
checked whether the socket is of the specified type
<parameter>type</parameter> parameter is not 0 it is
checked whether the socket is of the specified type
- (SOCK_STREAM, SOCK_DGRAM, ...). If the
+ (<constant>SOCK_STREAM</constant>,
+ <constant>SOCK_DGRAM</constant>, ...). If the
<parameter>listening</parameter> parameter is positive
it is checked whether the socket is in accepting mode,
i.e. <function>listen()</function> has been called for
<parameter>listening</parameter> parameter is positive
it is checked whether the socket is in accepting mode,
i.e. <function>listen()</function> has been called for
optionally checks the IPv4 or IPv6 port number the
socket is bound to, unless <parameter>port</parameter>
is zero. For this call <parameter>family</parameter>
optionally checks the IPv4 or IPv6 port number the
socket is bound to, unless <parameter>port</parameter>
is zero. For this call <parameter>family</parameter>
- must be passed as either AF_UNSPEC, AF_INET or
- AF_INET6.</para>
+ must be passed as either <constant>AF_UNSPEC</constant>, <constant>AF_INET</constant>, or
+ <constant>AF_INET6</constant>.</para>
<para><function>sd_is_socket_unix()</function> is
similar to <function>sd_is_socket()</function>, but
<para><function>sd_is_socket_unix()</function> is
similar to <function>sd_is_socket()</function>, but
the <parameter>length</parameter> parameter to 0. For
Linux abstract namespace sockets set the
<parameter>length</parameter> to the size of the
the <parameter>length</parameter> parameter to 0. For
Linux abstract namespace sockets set the
<parameter>length</parameter> to the size of the
<para>For details about the algorithms check the
liberally licensed reference implementation sources:
<para>For details about the algorithms check the
liberally licensed reference implementation sources:
url="http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-daemon.h"/></para>
<para><function>sd_is_fifo()</function> and the
url="http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-daemon.h"/></para>
<para><function>sd_is_fifo()</function> and the
<filename>sd-daemon.h</filename> files. These
interfaces are available as shared library, which can
be compiled and linked to with the
<filename>sd-daemon.h</filename> files. These
interfaces are available as shared library, which can
be compiled and linked to with the
file. Alternatively, applications consuming these APIs
may copy the implementation into their source
tree. For more details about the reference
implementation see
file. Alternatively, applications consuming these APIs
may copy the implementation into their source
tree. For more details about the reference
implementation see
<para>These functions continue to work as described,
even if -DDISABLE_SYSTEMD is set during
<para>These functions continue to work as described,
even if -DDISABLE_SYSTEMD is set during
<citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>
<citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>