Debian Codegraph @

upstream/fedora-44/man3/sd-varlink.3

raw
1 '\" t
2 .TH "SD\-VARLINK" "3" "" "systemd 259.5" "sd-varlink"
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-varlink \- APIs for Varlink IPC
24 .SH "SYNOPSIS"
25 .sp
26 .ft B
27 .nf
28 #include <systemd/sd\-varlink\&.h>
29 .fi
30 .ft
31 .HP \w'\fBpkg\-config\ \-\-cflags\ \-\-libs\ libsystemd\fR\ 'u
32 \fBpkg\-config \-\-cflags \-\-libs libsystemd\fR
33 .SH "DESCRIPTION"
34 .PP
35 sd\-varlink\&.h
36 is part of
37 \fBlibsystemd\fR(3)
38 and provides APIs for implementing Varlink IPC clients and services\&. See
39 \m[blue]\fB\%https://varlink.org/\fR\m[]
40 for more information about Varlink IPC\&.
41 .PP
42 Varlink IPC uses
43 \m[blue]\fBJSON\fR\m[]\&\s-2\u[1]\d\s+2
44 as marshalling format\&. The sd\-varlink API relies on the
45 \fBsd-json\fR(3)
46 API for JSON serialization, deserialization and manipulation\&.
47 .PP
48 Canonical encoding rules: sd\-varlink omits the
49 ""parameters""
50 member on the wire in replies, errors, and notifications when there are no parameters to transmit\&. This reduces message size and avoids ambiguity\&. Receivers must be tolerant and accept any of the following encodings for the absence of parameters: an omitted
51 ""parameters""
52 key (preferred), a JSON
53 "null"
54 value, or an empty object
55 "{}"\&. When decoding, sd\-varlink treats JSON
56 "null"
57 as if the member was omitted\&.
58 .PP
59 The
60 \fBvarlinkctl\fR(1)
61 tool makes the functionality implemented by sd\-varlink available from the command line\&.
62 .SH "NOTES"
63 .PP
64 Functions described here are available as a shared library, which can be compiled against and linked to with the
65 \fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
66 file\&.
67 .PP
68 The code described here uses
69 \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
70 \fBsetenv\fR(3)
71 from a parallel thread\&. It is recommended to only do calls to
72 \fBsetenv()\fR
73 from an early phase of the program when no other threads have been started\&.
74 .SH "SEE ALSO"
75 .PP
76 \fBsystemd\fR(1), \fBsd-event\fR(3), \fBsd-json\fR(3), \fBvarlinkctl\fR(1), \fBsd-bus\fR(3), \fBpkg-config\fR(1)
77 .SH "NOTES"
78 .IP " 1." 4
79 JSON
80 .RS 4
81 \%https://json.org/
82 .RE