diff options
Diffstat (limited to 'man/sd_is_fifo.xml')
-rw-r--r-- | man/sd_is_fifo.xml | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/man/sd_is_fifo.xml b/man/sd_is_fifo.xml index 7ff02cbfec..1192ca1681 100644 --- a/man/sd_is_fifo.xml +++ b/man/sd_is_fifo.xml @@ -48,6 +48,7 @@ <refname>sd_is_socket</refname> <refname>sd_is_socket_inet</refname> <refname>sd_is_socket_unix</refname> + <refname>sd_is_socket_sockaddr</refname> <refname>sd_is_mq</refname> <refname>sd_is_special</refname> <refpurpose>Check the type of a file descriptor</refpurpose> @@ -81,6 +82,15 @@ </funcprototype> <funcprototype> + <funcdef>int <function>sd_is_socket_sockaddr</function></funcdef> + <paramdef>int <parameter>fd</parameter></paramdef> + <paramdef>int <parameter>type</parameter></paramdef> + <paramdef>const struct sockaddr *<parameter>addr</parameter></paramdef> + <paramdef>unsigned <parameter>addr_len</parameter></paramdef> + <paramdef>int <parameter>listening</parameter></paramdef> + </funcprototype> + + <funcprototype> <funcdef>int <function>sd_is_socket_unix</function></funcdef> <paramdef>int <parameter>fd</parameter></paramdef> <paramdef>int <parameter>type</parameter></paramdef> @@ -118,10 +128,10 @@ <parameter>family</parameter> parameter is not <constant>AF_UNSPEC</constant>, it is checked whether the socket is of the specified family (<constant>AF_UNIX</constant>, - <constant>AF_INET</constant>, ...). If the <parameter>type</parameter> + <constant>AF_INET</constant>, …). If the <parameter>type</parameter> parameter is not 0, it is checked whether the socket is of the specified type (<constant>SOCK_STREAM</constant>, - <constant>SOCK_DGRAM</constant>, ...). If the + <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 it. If @@ -139,6 +149,18 @@ <constant>AF_UNSPEC</constant>, <constant>AF_INET</constant>, or <constant>AF_INET6</constant>.</para> + <para><function>sd_is_socket_sockaddr()</function> is similar to + <function>sd_is_socket_inet()</function>, but checks if the socket is bound to the + address specified by <parameter>addr</parameter>. The + <structfield>family</structfield> specified by <parameter>addr</parameter> must be + either <constant>AF_INET</constant> or <constant>AF_INET6</constant> and + <parameter>addr_len</parameter> must be large enough for that family. If + <parameter>addr</parameter> specifies a non-zero port, it is also checked if the + socket is bound to this port. In addition, for IPv6, if <parameter>addr</parameter> + specifies non-zero <structfield>sin6_flowinfo</structfield> or + <structfield>sin6_scope_id</structfield>, it is checked if the socket has the same + values.</para> + <para><function>sd_is_socket_unix()</function> is similar to <function>sd_is_socket()</function> but optionally checks the <constant>AF_UNIX</constant> path the socket is bound to, unless @@ -193,7 +215,13 @@ <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</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> + <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>, + <citerefentry project='man-pages'><refentrytitle>ip</refentrytitle><manvolnum>7</manvolnum></citerefentry>, + <citerefentry project='man-pages'><refentrytitle>ipv6</refentrytitle><manvolnum>7</manvolnum></citerefentry>, + <citerefentry project='man-pages'><refentrytitle>unix</refentrytitle><manvolnum>7</manvolnum></citerefentry>, + <citerefentry project='man-pages'><refentrytitle>fifo</refentrytitle><manvolnum>7</manvolnum></citerefentry>, + <citerefentry project='man-pages'><refentrytitle>mq_overview</refentrytitle><manvolnum>7</manvolnum></citerefentry>, + <citerefentry project='man-pages'><refentrytitle>socket</refentrytitle><manvolnum>7</manvolnum></citerefentry>. </para> </refsect1> |