summaryrefslogtreecommitdiff
path: root/man/sd_is_fifo.3
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2015-07-08 07:08:31 +0200
committerMartin Pitt <martin.pitt@ubuntu.com>2015-07-08 07:08:31 +0200
commitfb183854ab9b5774094a753ad3f46b653a9055da (patch)
treef3854bb3a4703a39aedff451b874e7cf9e53c699 /man/sd_is_fifo.3
parent86f210e9c914ba12477d4b2e7fa6f5cfa196a324 (diff)
downloadsystemd-fb183854ab9b5774094a753ad3f46b653a9055da.tar.gz
Imported Upstream version 222
Diffstat (limited to 'man/sd_is_fifo.3')
-rw-r--r--man/sd_is_fifo.3132
1 files changed, 0 insertions, 132 deletions
diff --git a/man/sd_is_fifo.3 b/man/sd_is_fifo.3
deleted file mode 100644
index cbc4e09f1e..0000000000
--- a/man/sd_is_fifo.3
+++ /dev/null
@@ -1,132 +0,0 @@
-'\" t
-.TH "SD_IS_FIFO" "3" "" "systemd 221" "sd_is_fifo"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-sd_is_fifo, sd_is_socket, sd_is_socket_inet, sd_is_socket_unix, sd_is_mq, sd_is_special \- Check the type of a file descriptor
-.SH "SYNOPSIS"
-.sp
-.ft B
-.nf
-#include <systemd/sd\-daemon\&.h>
-.fi
-.ft
-.HP \w'int\ sd_is_fifo('u
-.BI "int sd_is_fifo(int\ " "fd" ", const\ char\ *" "path" ");"
-.HP \w'int\ sd_is_socket('u
-.BI "int sd_is_socket(int\ " "fd" ", int\ " "family" ", int\ " "type" ", int\ " "listening" ");"
-.HP \w'int\ sd_is_socket_inet('u
-.BI "int sd_is_socket_inet(int\ " "fd" ", int\ " "family" ", int\ " "type" ", int\ " "listening" ", uint16_t\ " "port" ");"
-.HP \w'int\ sd_is_socket_unix('u
-.BI "int sd_is_socket_unix(int\ " "fd" ", int\ " "type" ", int\ " "listening" ", const\ char\ *" "path" ", size_t\ " "length" ");"
-.HP \w'int\ sd_is_mq('u
-.BI "int sd_is_mq(int\ " "fd" ", const\ char\ *" "path" ");"
-.HP \w'int\ sd_is_special('u
-.BI "int sd_is_special(int\ " "fd" ", const\ char\ *" "path" ");"
-.SH "DESCRIPTION"
-.PP
-\fBsd_is_fifo()\fR
-may be called to check whether the specified file descriptor refers to a FIFO or pipe\&. If the
-\fIpath\fR
-parameter is not
-\fBNULL\fR, it is checked whether the FIFO is bound to the specified file system path\&.
-.PP
-\fBsd_is_socket()\fR
-may be called to check whether the specified file descriptor refers to a socket\&. If the
-\fIfamily\fR
-parameter is not
-\fBAF_UNSPEC\fR, it is checked whether the socket is of the specified family (AF_UNIX,
-\fBAF_INET\fR, \&.\&.\&.)\&. If the
-\fItype\fR
-parameter is not 0, it is checked whether the socket is of the specified type (\fBSOCK_STREAM\fR,
-\fBSOCK_DGRAM\fR, \&.\&.\&.)\&. If the
-\fIlistening\fR
-parameter is positive, it is checked whether the socket is in accepting mode, i\&.e\&.
-\fBlisten()\fR
-has been called for it\&. If
-\fIlistening\fR
-is 0, it is checked whether the socket is not in this mode\&. If the parameter is negative, no such check is made\&. The
-\fIlistening\fR
-parameter should only be used for stream sockets and should be set to a negative value otherwise\&.
-.PP
-\fBsd_is_socket_inet()\fR
-is similar to
-\fBsd_is_socket()\fR, but optionally checks the IPv4 or IPv6 port number the socket is bound to, unless
-\fIport\fR
-is zero\&. For this call
-\fIfamily\fR
-must be passed as either
-\fBAF_UNSPEC\fR,
-\fBAF_INET\fR, or
-\fBAF_INET6\fR\&.
-.PP
-\fBsd_is_socket_unix()\fR
-is similar to
-\fBsd_is_socket()\fR
-but optionally checks the
-\fBAF_UNIX\fR
-path the socket is bound to, unless the
-\fIpath\fR
-parameter is
-\fBNULL\fR\&. For normal file system
-\fBAF_UNIX\fR
-sockets, set the
-\fIlength\fR
-parameter to 0\&. For Linux abstract namespace sockets, set the
-\fIlength\fR
-to the size of the address, including the initial 0 byte, and set the
-\fIpath\fR
-to the initial 0 byte of the socket address\&.
-.PP
-\fBsd_is_mq()\fR
-may be called to check whether the specified file descriptor refers to a POSIX message queue\&. If the
-\fIpath\fR
-parameter is not
-\fBNULL\fR, it is checked whether the message queue is bound to the specified name\&.
-.PP
-\fBsd_is_special()\fR
-may be called to check whether the specified file descriptor refers to a special file\&. If the
-\fIpath\fR
-parameter is not
-\fBNULL\fR, it is checked whether the file descriptor is bound to the specified file name\&. Special files in this context are character device nodes and files in
-/proc
-or
-/sys\&.
-.SH "RETURN VALUE"
-.PP
-On failure, these calls return a negative errno\-style error code\&. If the file descriptor is of the specified type and bound to the specified address, a positive return value is returned, otherwise zero\&.
-.SH "NOTES"
-.PP
-These APIs are implemented as a shared library, which can be compiled and linked to with the
-\fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
-file\&.
-.PP
-Internally, these function use a combination of
-fstat()
-and
-getsockname()
-to check the file descriptor type and where it is bound to\&.
-.SH "SEE ALSO"
-.PP
-\fBsystemd\fR(1),
-\fBsd-daemon\fR(3),
-\fBsd_listen_fds\fR(3),
-\fBsystemd.service\fR(5),
-\fBsystemd.socket\fR(5)