1<?xml version="1.0"?>
2<!--*-nxml-*-->
3<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
4  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
5<!ENTITY % entities SYSTEM "custom-entities.ent" >
6%entities;
7]>
8<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
9
10<refentry id="org.freedesktop.network1" conditional='ENABLE_NETWORKD'
11    xmlns:xi="http://www.w3.org/2001/XInclude">
12  <refentryinfo>
13    <title>org.freedesktop.network1</title>
14    <productname>systemd</productname>
15  </refentryinfo>
16
17  <refmeta>
18    <refentrytitle>org.freedesktop.network1</refentrytitle>
19    <manvolnum>5</manvolnum>
20  </refmeta>
21
22  <refnamediv>
23    <refname>org.freedesktop.network1</refname>
24    <refpurpose>The D-Bus interface of systemd-networkd</refpurpose>
25  </refnamediv>
26
27  <refsect1>
28    <title>Introduction</title>
29
30    <para>
31    <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
32    is a system service that manages and configures network interfaces. This page describes the D-Bus
33    interface.</para>
34  </refsect1>
35
36  <refsect1>
37    <title>The Manager Object</title>
38
39    <para>The service exposes the following interfaces on the Manager object on the bus:</para>
40
41    <programlisting executable="systemd-networkd" node="/org/freedesktop/network1" interface="org.freedesktop.network1.Manager">
42node /org/freedesktop/network1 {
43  interface org.freedesktop.network1.Manager {
44    methods:
45      ListLinks(out a(iso) links);
46      GetLinkByName(in  s name,
47                    out i ifindex,
48                    out o path);
49      GetLinkByIndex(in  i ifindex,
50                     out s name,
51                     out o path);
52      SetLinkNTP(in  i ifindex,
53                 in  as servers);
54      SetLinkDNS(in  i ifindex,
55                 in  a(iay) addresses);
56      SetLinkDNSEx(in  i ifindex,
57                   in  a(iayqs) addresses);
58      SetLinkDomains(in  i ifindex,
59                     in  a(sb) domains);
60      SetLinkDefaultRoute(in  i ifindex,
61                          in  b enable);
62      SetLinkLLMNR(in  i ifindex,
63                   in  s mode);
64      SetLinkMulticastDNS(in  i ifindex,
65                          in  s mode);
66      SetLinkDNSOverTLS(in  i ifindex,
67                        in  s mode);
68      SetLinkDNSSEC(in  i ifindex,
69                    in  s mode);
70      SetLinkDNSSECNegativeTrustAnchors(in  i ifindex,
71                                        in  as names);
72      RevertLinkNTP(in  i ifindex);
73      RevertLinkDNS(in  i ifindex);
74      RenewLink(in  i ifindex);
75      ForceRenewLink(in  i ifindex);
76      ReconfigureLink(in  i ifindex);
77      Reload();
78      DescribeLink(in  i ifindex,
79                   out s json);
80      Describe(out s json);
81    properties:
82      readonly s OperationalState = '...';
83      readonly s CarrierState = '...';
84      readonly s AddressState = '...';
85      readonly s IPv4AddressState = '...';
86      readonly s IPv6AddressState = '...';
87      readonly s OnlineState = '...';
88      @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
89      readonly t NamespaceId = ...;
90  };
91  interface org.freedesktop.DBus.Peer { ... };
92  interface org.freedesktop.DBus.Introspectable { ... };
93  interface org.freedesktop.DBus.Properties { ... };
94};
95    </programlisting>
96
97    <!--method ListLinks is not documented!-->
98
99    <!--method GetLinkByName is not documented!-->
100
101    <!--method GetLinkByIndex is not documented!-->
102
103    <!--method SetLinkNTP is not documented!-->
104
105    <!--method SetLinkDNS is not documented!-->
106
107    <!--method SetLinkDNSEx is not documented!-->
108
109    <!--method SetLinkDomains is not documented!-->
110
111    <!--method SetLinkDefaultRoute is not documented!-->
112
113    <!--method SetLinkLLMNR is not documented!-->
114
115    <!--method SetLinkMulticastDNS is not documented!-->
116
117    <!--method SetLinkDNSOverTLS is not documented!-->
118
119    <!--method SetLinkDNSSEC is not documented!-->
120
121    <!--method SetLinkDNSSECNegativeTrustAnchors is not documented!-->
122
123    <!--method RevertLinkNTP is not documented!-->
124
125    <!--method RevertLinkDNS is not documented!-->
126
127    <!--method RenewLink is not documented!-->
128
129    <!--method ForceRenewLink is not documented!-->
130
131    <!--method ReconfigureLink is not documented!-->
132
133    <!--method Reload is not documented!-->
134
135    <!--method DescribeLink is not documented!-->
136
137    <!--method Describe is not documented!-->
138
139    <!--property OperationalState is not documented!-->
140
141    <!--property CarrierState is not documented!-->
142
143    <!--property AddressState is not documented!-->
144
145    <!--property IPv4AddressState is not documented!-->
146
147    <!--property IPv6AddressState is not documented!-->
148
149    <!--property OnlineState is not documented!-->
150
151    <!--property NamespaceId is not documented!-->
152
153    <!--Autogenerated cross-references for systemd.directives, do not edit-->
154
155    <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.network1.Manager"/>
156
157    <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.network1.Manager"/>
158
159    <variablelist class="dbus-method" generated="True" extra-ref="ListLinks()"/>
160
161    <variablelist class="dbus-method" generated="True" extra-ref="GetLinkByName()"/>
162
163    <variablelist class="dbus-method" generated="True" extra-ref="GetLinkByIndex()"/>
164
165    <variablelist class="dbus-method" generated="True" extra-ref="SetLinkNTP()"/>
166
167    <variablelist class="dbus-method" generated="True" extra-ref="SetLinkDNS()"/>
168
169    <variablelist class="dbus-method" generated="True" extra-ref="SetLinkDNSEx()"/>
170
171    <variablelist class="dbus-method" generated="True" extra-ref="SetLinkDomains()"/>
172
173    <variablelist class="dbus-method" generated="True" extra-ref="SetLinkDefaultRoute()"/>
174
175    <variablelist class="dbus-method" generated="True" extra-ref="SetLinkLLMNR()"/>
176
177    <variablelist class="dbus-method" generated="True" extra-ref="SetLinkMulticastDNS()"/>
178
179    <variablelist class="dbus-method" generated="True" extra-ref="SetLinkDNSOverTLS()"/>
180
181    <variablelist class="dbus-method" generated="True" extra-ref="SetLinkDNSSEC()"/>
182
183    <variablelist class="dbus-method" generated="True" extra-ref="SetLinkDNSSECNegativeTrustAnchors()"/>
184
185    <variablelist class="dbus-method" generated="True" extra-ref="RevertLinkNTP()"/>
186
187    <variablelist class="dbus-method" generated="True" extra-ref="RevertLinkDNS()"/>
188
189    <variablelist class="dbus-method" generated="True" extra-ref="RenewLink()"/>
190
191    <variablelist class="dbus-method" generated="True" extra-ref="ForceRenewLink()"/>
192
193    <variablelist class="dbus-method" generated="True" extra-ref="ReconfigureLink()"/>
194
195    <variablelist class="dbus-method" generated="True" extra-ref="Reload()"/>
196
197    <variablelist class="dbus-method" generated="True" extra-ref="DescribeLink()"/>
198
199    <variablelist class="dbus-method" generated="True" extra-ref="Describe()"/>
200
201    <variablelist class="dbus-property" generated="True" extra-ref="OperationalState"/>
202
203    <variablelist class="dbus-property" generated="True" extra-ref="CarrierState"/>
204
205    <variablelist class="dbus-property" generated="True" extra-ref="AddressState"/>
206
207    <variablelist class="dbus-property" generated="True" extra-ref="IPv4AddressState"/>
208
209    <variablelist class="dbus-property" generated="True" extra-ref="IPv6AddressState"/>
210
211    <variablelist class="dbus-property" generated="True" extra-ref="OnlineState"/>
212
213    <variablelist class="dbus-property" generated="True" extra-ref="NamespaceId"/>
214
215    <!--End of Autogenerated section-->
216
217    <para>
218      Provides information about the manager.
219    </para>
220  </refsect1>
221
222  <refsect1>
223    <title>Link Object</title>
224
225    <programlisting executable="systemd-networkd" node="/org/freedesktop/network1/link/_1" interface="org.freedesktop.network1.Link">
226node /org/freedesktop/network1/link/_1 {
227  interface org.freedesktop.network1.Link {
228    methods:
229      SetNTP(in  as servers);
230      SetDNS(in  a(iay) addresses);
231      SetDNSEx(in  a(iayqs) addresses);
232      SetDomains(in  a(sb) domains);
233      SetDefaultRoute(in  b enable);
234      SetLLMNR(in  s mode);
235      SetMulticastDNS(in  s mode);
236      SetDNSOverTLS(in  s mode);
237      SetDNSSEC(in  s mode);
238      SetDNSSECNegativeTrustAnchors(in  as names);
239      RevertNTP();
240      RevertDNS();
241      Renew();
242      ForceRenew();
243      Reconfigure();
244      Describe(out s json);
245    properties:
246      readonly s OperationalState = '...';
247      readonly s CarrierState = '...';
248      readonly s AddressState = '...';
249      readonly s IPv4AddressState = '...';
250      readonly s IPv6AddressState = '...';
251      readonly s OnlineState = '...';
252      readonly s AdministrativeState = '...';
253      @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
254      readonly (tt) BitRates = ...;
255  };
256  interface org.freedesktop.DBus.Peer { ... };
257  interface org.freedesktop.DBus.Introspectable { ... };
258  interface org.freedesktop.DBus.Properties { ... };
259  interface org.freedesktop.network1.DHCPServer { ... };
260};
261    </programlisting>
262
263    <!--method SetNTP is not documented!-->
264
265    <!--method SetDNS is not documented!-->
266
267    <!--method SetDNSEx is not documented!-->
268
269    <!--method SetDomains is not documented!-->
270
271    <!--method SetDefaultRoute is not documented!-->
272
273    <!--method SetLLMNR is not documented!-->
274
275    <!--method SetMulticastDNS is not documented!-->
276
277    <!--method SetDNSOverTLS is not documented!-->
278
279    <!--method SetDNSSEC is not documented!-->
280
281    <!--method SetDNSSECNegativeTrustAnchors is not documented!-->
282
283    <!--method RevertNTP is not documented!-->
284
285    <!--method RevertDNS is not documented!-->
286
287    <!--method Renew is not documented!-->
288
289    <!--method ForceRenew is not documented!-->
290
291    <!--method Reconfigure is not documented!-->
292
293    <!--method Describe is not documented!-->
294
295    <!--property OperationalState is not documented!-->
296
297    <!--property CarrierState is not documented!-->
298
299    <!--property AddressState is not documented!-->
300
301    <!--property IPv4AddressState is not documented!-->
302
303    <!--property IPv6AddressState is not documented!-->
304
305    <!--property OnlineState is not documented!-->
306
307    <!--property AdministrativeState is not documented!-->
308
309    <!--property BitRates is not documented!-->
310
311    <!--Autogenerated cross-references for systemd.directives, do not edit-->
312
313    <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.network1.DHCPServer"/>
314
315    <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.network1.Link"/>
316
317    <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.network1.DHCPServer"/>
318
319    <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.network1.Link"/>
320
321    <variablelist class="dbus-method" generated="True" extra-ref="SetNTP()"/>
322
323    <variablelist class="dbus-method" generated="True" extra-ref="SetDNS()"/>
324
325    <variablelist class="dbus-method" generated="True" extra-ref="SetDNSEx()"/>
326
327    <variablelist class="dbus-method" generated="True" extra-ref="SetDomains()"/>
328
329    <variablelist class="dbus-method" generated="True" extra-ref="SetDefaultRoute()"/>
330
331    <variablelist class="dbus-method" generated="True" extra-ref="SetLLMNR()"/>
332
333    <variablelist class="dbus-method" generated="True" extra-ref="SetMulticastDNS()"/>
334
335    <variablelist class="dbus-method" generated="True" extra-ref="SetDNSOverTLS()"/>
336
337    <variablelist class="dbus-method" generated="True" extra-ref="SetDNSSEC()"/>
338
339    <variablelist class="dbus-method" generated="True" extra-ref="SetDNSSECNegativeTrustAnchors()"/>
340
341    <variablelist class="dbus-method" generated="True" extra-ref="RevertNTP()"/>
342
343    <variablelist class="dbus-method" generated="True" extra-ref="RevertDNS()"/>
344
345    <variablelist class="dbus-method" generated="True" extra-ref="Renew()"/>
346
347    <variablelist class="dbus-method" generated="True" extra-ref="ForceRenew()"/>
348
349    <variablelist class="dbus-method" generated="True" extra-ref="Reconfigure()"/>
350
351    <variablelist class="dbus-method" generated="True" extra-ref="Describe()"/>
352
353    <variablelist class="dbus-property" generated="True" extra-ref="OperationalState"/>
354
355    <variablelist class="dbus-property" generated="True" extra-ref="CarrierState"/>
356
357    <variablelist class="dbus-property" generated="True" extra-ref="AddressState"/>
358
359    <variablelist class="dbus-property" generated="True" extra-ref="IPv4AddressState"/>
360
361    <variablelist class="dbus-property" generated="True" extra-ref="IPv6AddressState"/>
362
363    <variablelist class="dbus-property" generated="True" extra-ref="OnlineState"/>
364
365    <variablelist class="dbus-property" generated="True" extra-ref="AdministrativeState"/>
366
367    <variablelist class="dbus-property" generated="True" extra-ref="BitRates"/>
368
369    <!--End of Autogenerated section-->
370
371    <para>
372      Provides information about interfaces.
373    </para>
374  </refsect1>
375
376  <refsect1>
377    <title>Network Object</title>
378
379    <programlisting executable="systemd-networkd" node="/org/freedesktop/network1/network/_1" interface="org.freedesktop.network1.Network">
380node /org/freedesktop/network1/network/_1 {
381  interface org.freedesktop.network1.Network {
382    properties:
383      @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
384      readonly s Description = '...';
385      @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
386      readonly s SourcePath = '...';
387      @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
388      readonly as MatchMAC = ['...', ...];
389      @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
390      readonly as MatchPath = ['...', ...];
391      @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
392      readonly as MatchDriver = ['...', ...];
393      @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
394      readonly as MatchType = ['...', ...];
395      @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
396      readonly as MatchName = ['...', ...];
397  };
398  interface org.freedesktop.DBus.Peer { ... };
399  interface org.freedesktop.DBus.Introspectable { ... };
400  interface org.freedesktop.DBus.Properties { ... };
401};
402    </programlisting>
403
404    <!--property Description is not documented!-->
405
406    <!--property SourcePath is not documented!-->
407
408    <!--property MatchMAC is not documented!-->
409
410    <!--property MatchPath is not documented!-->
411
412    <!--property MatchDriver is not documented!-->
413
414    <!--property MatchType is not documented!-->
415
416    <!--property MatchName is not documented!-->
417
418    <!--Autogenerated cross-references for systemd.directives, do not edit-->
419
420    <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.network1.Network"/>
421
422    <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.network1.Network"/>
423
424    <variablelist class="dbus-property" generated="True" extra-ref="Description"/>
425
426    <variablelist class="dbus-property" generated="True" extra-ref="SourcePath"/>
427
428    <variablelist class="dbus-property" generated="True" extra-ref="MatchMAC"/>
429
430    <variablelist class="dbus-property" generated="True" extra-ref="MatchPath"/>
431
432    <variablelist class="dbus-property" generated="True" extra-ref="MatchDriver"/>
433
434    <variablelist class="dbus-property" generated="True" extra-ref="MatchType"/>
435
436    <variablelist class="dbus-property" generated="True" extra-ref="MatchName"/>
437
438    <!--End of Autogenerated section-->
439
440    <para>
441      Provides information about .network files.
442    </para>
443  </refsect1>
444
445  <refsect1>
446    <title>DHCP Server Object</title>
447
448    <programlisting executable="systemd-networkd" node="/org/freedesktop/network1/link/_1" interface="org.freedesktop.network1.DHCPServer">
449node /org/freedesktop/network1/link/_1 {
450  interface org.freedesktop.network1.DHCPServer {
451    properties:
452      readonly a(uayayayayt) Leases = [...];
453  };
454  interface org.freedesktop.DBus.Peer { ... };
455  interface org.freedesktop.DBus.Introspectable { ... };
456  interface org.freedesktop.DBus.Properties { ... };
457};
458    </programlisting>
459
460    <!--property Leases is not documented!-->
461
462    <!--Autogenerated cross-references for systemd.directives, do not edit-->
463
464    <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.network1.DHCPServer"/>
465
466    <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.network1.DHCPServer"/>
467
468    <variablelist class="dbus-property" generated="True" extra-ref="Leases"/>
469
470    <!--End of Autogenerated section-->
471
472    <para>
473      Provides information about leases.
474    </para>
475  </refsect1>
476
477  <refsect1>
478    <title>Examples</title>
479
480    <example>
481      <title>Introspect <interfacename>org.freedesktop.network1.Manager</interfacename> on the bus</title>
482
483      <programlisting>
484$ gdbus introspect --system \
485  --dest org.freedesktop.network1 \
486  --object-path /org/freedesktop/network1
487      </programlisting>
488    </example>
489
490    <example>
491      <title>Introspect <interfacename>org.freedesktop.network1.Link</interfacename> on the bus</title>
492
493      <programlisting>
494$ gdbus introspect --system \
495  --dest org.freedesktop.network1 \
496  --object-path /org/freedesktop/network1/link/_11
497      </programlisting>
498    </example>
499  </refsect1>
500
501  <xi:include href="org.freedesktop.locale1.xml" xpointer="versioning"/>
502</refentry>
503