Debian Codegraph @

upstream/debian-unstable/man3/sd_bus_can_send.3

raw
1 '\" t
2 .TH "SD_BUS_CAN_SEND" "3" "" "systemd 261~rc3" "sd_bus_can_send"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 sd_bus_can_send \- Check which types can be sent over a bus object
24 .SH "SYNOPSIS"
25 .sp
26 .ft B
27 .nf
28 #include <systemd/sd\-bus\&.h>
29 .fi
30 .ft
31 .HP \w'int\ sd_bus_can_send('u
32 .BI "int sd_bus_can_send(sd_bus\ *" "bus" ", char\ " "type" ");"
33 .SH "DESCRIPTION"
34 .PP
35 \fBsd_bus_can_send()\fR
36 is mostly used for checking if file descriptor passing is available on the given bus\&.
37 \fItype\fR
38 can be any of the
39 \fBSD_BUS_TYPE\fR
40 constants\&.
41 .SH "RETURN VALUE"
42 .PP
43 On failure,
44 \fBsd_bus_can_send()\fR
45 returns a negative errno\-style error code\&. If values of the given type can be sent over the given bus, it returns a positive integer\&. Otherwise, it returns zero\&.
46 .SS "Errors"
47 .PP
48 Returned errors may indicate the following problems:
49 .PP
50 \fB\-ENOPKG\fR
51 .RS 4
52 The bus object
53 \fIbus\fR
54 could not be resolved\&.
55 .RE
56 .PP
57 \fB\-ENOTCONN\fR
58 .RS 4
59 The input parameter
60 \fIbus\fR
61 is
62 \fBNULL\fR
63 or the bus is not connected\&.
64 .RE
65 .PP
66 \fB\-ECHILD\fR
67 .RS 4
68 The bus object
69 \fIbus\fR
70 was created in a different process\&.
71 .RE
72 .SH "NOTES"
73 .PP
74 Functions described here are available as a shared library, which can be compiled against and linked to with the
75 \fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
76 file\&.
77 .PP
78 The code described here uses
79 \fBgetenv\fR(3), which is declared to be not multi\-thread\-safe\&. This means that the code calling the functions described here must not call
80 \fBsetenv\fR(3)
81 from a parallel thread\&. It is recommended to only do calls to
82 \fBsetenv()\fR
83 from an early phase of the program when no other threads have been started\&.
84 .SH "HISTORY"
85 .PP
86 \fBsd_bus_can_send()\fR
87 was added in version 221\&.
88 .SH "SEE ALSO"
89 .PP
90 \fBsystemd\fR(1), \fBsd-bus\fR(3)