]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - man/sd_is_fifo.xml
final v236 update (#7649)
[thirdparty/systemd.git] / man / sd_is_fifo.xml
index 57dd6afc89bf8c61c7ac1a0d8e92f856663c3f71..2af17df650c9000c0b26066d5239ea1655480d4b 100644 (file)
@@ -1,11 +1,10 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
-<!ENTITY % entities SYSTEM "custom-entities.ent" >
-%entities;
-]>
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
+  SPDX-License-Identifier: LGPL-2.1+
+
   This file is part of systemd.
 
   Copyright 2010 Lennart Poettering
@@ -51,6 +50,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>
         <paramdef>uint16_t <parameter>port</parameter></paramdef>
       </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>
     whether the specified file descriptor refers to a socket. If the
     <parameter>family</parameter> parameter is not
     <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
-    (<constant>SOCK_STREAM</constant>,
-    <constant>SOCK_DGRAM</constant>, ...). If the
+    is of the specified family (<constant>AF_UNIX</constant>,
+    <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
     <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
     <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
     whether the specified file descriptor refers to a special file. If
     the <parameter>path</parameter> parameter is not
     <constant>NULL</constant>, it is checked whether the file
-    descriptor is bound to the specified file name. Special files in
+    descriptor is bound to the specified filename. Special files in
     this context are character device nodes and files in
     <filename>/proc</filename> or <filename>/sys</filename>.</para>
   </refsect1>
       <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>