From bba2e4b4de668db525cbfdfc35292e5a0b51671a Mon Sep 17 00:00:00 2001
From: Michael Biebl /run/NetworkManager/resolv.conf
device-add
+ This action is called when a connection of type generic
+ has the generic.device-handler property set. The property
+ indicates the name of a dispatcher script to be executed in directory
+ /{etc,usr/lib}/NetworkManager/dispatcher.d/device. Note
+ that differently from other actions, only one script is executed.
+
+ The script needs to perform any action needed to create the device + for the generic connection. On successful termination, the script + returns zero. Otherwise, it returns a non-zero value to indicate an + error. The script can return values to NetworkManager by writing to + standard output; each line should contain a key name followed by the + equal sign '=' and a key value. The keys understood at the moment + are: +
+
|
+Indicates the interface index of the interface + created by the script. This key is required when the script + succeeds; if it is not set, the activation will fail. The key is + ignored in case of script failure. |
+
|
+Specifies an error message indicating the cause + of the script failure. It is ignored when the script succeeds. + |
+
+ Since the dispatcher service captures stdout for parsing those keys, + anything written to stdout will not appear in the dispatcher service + journal log. Use stderr if you want to print messages to the journal + (for example, for debugging). Only the first 8KiB of stdout are + considered and among those, only the first 64 lines; the rest is + ignored. +
+device-delete
+ This action is the counterpart of device-add and
+ is called to delete the device for a generic connection. All the
+ aspects described for device-add also apply to
+ this action, with the only exception that key
+ IFINDEX is ignored. It is not necessary to delete
+ the kernel link in the handler because NetworkManager already does
+ that; therefore the action is useful for any additional cleanup
+ needed.
+
@@ -314,6 +377,25 @@ In case of VPN, VPN_IP_IFACE is set, and IP4_*, IP6_* variables with VPN prefix are exported too, like VPN_IP4_ADDRESS_0, VPN_IP4_NUM_ADDRESSES.
+
+ The content of the user setting for the connection
+ being activated is also passed via environment variables. Each key is
+ stored in a variable with name CONNECTION_USER_
+ concatenated with the encoding of the key name. The encoding works as
+ follows:
+
lowercase letters become uppercase
uppercase letters are prefixed with an underscore
numbers do not change
a dot is replaced with a double underscore
any other character is encoded with an underscore followed by + its 3-digit octal representation
+ For example, key test.foo-Bar2 is stored in a variable named
+ CONNECTION_USER_TEST__FOO_055_BAR2.
+
Dispatcher scripts are run one at a time, but asynchronously from the main NetworkManager process, and will be killed if they run for too long. If your script diff --git a/docs/api/html/NetworkManager.conf.html b/docs/api/html/NetworkManager.conf.html index 67aa539e..aee3ac66 100644 --- a/docs/api/html/NetworkManager.conf.html +++ b/docs/api/html/NetworkManager.conf.html @@ -995,6 +995,10 @@ ipv6.ip6-privacy=0
If configured explicitly to 0, the MTU is not reconfigured during device activation unless it is required due to IPv6 constraints. If left unspecified, a DHCP/IPv6 SLAAC provided value is used or the MTU is left unspecified on activation.
macsec.offload
sriov.autoprobe-drivers
If left unspecified, drivers are autoprobed when the SR-IOV VF gets created.
NetworkManager Reference Manual |
|---|
- for NetworkManager 1.45.91 + for NetworkManager 1.46.0 The latest version of this documentation can be found on-line at https://networkmanager.dev/docs/api/latest/. diff --git a/docs/api/html/ix01.html b/docs/api/html/ix01.html index 04d94335..6dc24c5d 100644 --- a/docs/api/html/ix01.html +++ b/docs/api/html/ix01.html @@ -700,6 +700,8 @@
NM_DEVICE_STATE_REASON_DEVICE_HANDLER_FAILED
+ += 68
The device handler dispatcher returned an error. Since: 1.46
+ +The NMMetered enum has two different purposes: one is to configure "connection.metered" setting of a connection profile in NMSettingConnection, and the other is to express the actual metered state of the NMDevice at a given moment.
+The NMMetered enum has two different purposes: one is to configure "connection.metered" setting of a connection profile in NMSettingConnection, and the other is to express the actual metered state of the NMDevice at a given moment.
For the connection profile only NM_METERED_UNKNOWN, NM_METERED_NO and NM_METERED_YES are allowed.
The device's metered state at runtime is determined by the profile which is currently active. If the profile explicitly specifies NM_METERED_NO or NM_METERED_YES, then the device's metered state is as such. If the connection profile leaves it undecided at NM_METERED_UNKNOWN (the default), then NetworkManager tries to guess the metered state, for example based on the device type or on DHCP options (like Android devices exposing a "ANDROID_METERED" DHCP vendor option). This then leads to either NM_METERED_GUESS_NO or NM_METERED_GUESS_YES.
Most applications probably should treat the runtime state NM_METERED_GUESS_YES like NM_METERED_YES, and all other states as not metered.
diff --git a/docs/api/html/nm-settings-dbus.html b/docs/api/html/nm-settings-dbus.html index 9f5c9842..52539c2e 100644 --- a/docs/api/html/nm-settings-dbus.html +++ b/docs/api/html/nm-settings-dbus.html @@ -137,8 +137,8 @@ Depending on "connection.multi-connect", a profile can (auto)connect only once aGeneric Link Settings.
++ Properties: +
+| + |
+ Name of the device handler that will be invoked to add and delete the device for this connection. The name can only contain ASCII alphanumeric characters and '-', '_', '.'. It cannot start with '.'. +See the NetworkManager-dispatcher(8) man page for more details about how to write the device handler. +By setting this property the generic connection becomes "virtual", meaning that it can be activated without an existing device; the device will be created at the time the connection is started by invoking the device-handler. ++ Format: string + |
+
IPv4 Settings.
Properties:
@@ -3150,7 +3174,7 @@ Example: priority 5 from 192.167.4.0/24 table 45
IPv6 Settings.
Properties:
@@ -3563,7 +3587,7 @@ Example: priority 5 from 1:2:3::5/128 table 45
IP Tunneling Settings.
Properties:
@@ -3717,7 +3741,7 @@ Example: priority 5 from 1:2:3::5/128 table 45
Specifies the MACsec offload mode.
+"off" (0) disables MACsec offload.
+"phy" (1) and "mac" (2) request offload respectively to the PHY or to the MAC; if the selected mode is not available, the connection will fail.
+"default" (-1) uses the global default value specified in NetworkManager configuration; if no global default is defined, the built-in default is "off" (0).
++ Format: choice (NMSettingMacsecOffload)
++ Valid values: default (-1), off (0), phy (1), mac (2)
+
@@ -3829,7 +3866,7 @@ Example: priority 5 from 1:2:3::5/128 table 45
MAC VLAN Settings.
Properties:
@@ -3889,7 +3926,7 @@ Example: priority 5 from 1:2:3::5/128 table 45
Match settings.
Properties:
@@ -3944,7 +3981,7 @@ Example: priority 5 from 1:2:3::5/128 table 45
Alias: olpc-mesh
OLPC Wireless Mesh Settings.
@@ -3995,7 +4032,7 @@ Example:priority 5 from 1:2:3::5/128 table 45
OvsBridge Link Settings.
Properties:
@@ -4061,7 +4098,7 @@ Example: priority 5 from 1:2:3::5/128 table 45
OvsDpdk Link Settings.
Properties:
@@ -4115,7 +4152,7 @@ Example: priority 5 from 1:2:3::5/128 table 45
Open vSwitch Interface Settings.
Properties:
@@ -4151,7 +4188,7 @@ Example: priority 5 from 1:2:3::5/128 table 45
OvsPatch Link Settings.
Properties:
@@ -4173,7 +4210,7 @@ Example: priority 5 from 1:2:3::5/128 table 45
OvsPort Link Settings.
Properties:
@@ -4258,7 +4295,7 @@ Example: priority 5 from 1:2:3::5/128 table 45
Point-to-Point Protocol Settings.
Properties:
@@ -4454,7 +4491,7 @@ Example: priority 5 from 1:2:3::5/128 table 45
PPP-over-Ethernet Settings.
Properties:
@@ -4520,7 +4557,7 @@ Example: priority 5 from 1:2:3::5/128 table 45
WWW Proxy Settings.
Properties:
@@ -4580,7 +4617,7 @@ Example: priority 5 from 1:2:3::5/128 table 45
Serial Link Settings.
Properties:
@@ -4646,7 +4683,7 @@ Example: priority 5 from 1:2:3::5/128 table 45
Select the eswitch encapsulation support.
+Currently it's only supported for PCI PF devices, and only if the eswitch device is managed from the same PCI address than the PF.
+If set to "preserve" (-1) (default) the eswitch encap-mode won't be modified by NetworkManager.
++ Format: choice (NMSriovEswitchEncapMode)
++ Valid values: preserve (-1), none (0), basic (1)
+Select the eswitch inline-mode of the device. Some HWs need the VF driver to put part of the packet headers on the TX descriptor so the e-switch can do proper matching and steering.
+Currently it's only supported for PCI PF devices, and only if the eswitch device is managed from the same PCI address than the PF.
+If set to "preserve" (-1) (default) the eswitch inline-mode won't be modified by NetworkManager.
++ Format: choice (NMSriovEswitchInlineMode)
++ Valid values: preserve (-1), none (0), link (1), network (2), transport (3)
+Select the eswitch mode of the device. Currently it's only supported for PCI PF devices, and only if the eswitch device is managed from the same PCI address than the PF.
+If set to "preserve" (-1) (default) the eswitch mode won't be modified by NetworkManager.
++ Format: choice (NMSriovEswitchMode)
++ Valid values: preserve (-1), legacy (0), switchdev (1)
+The total number of virtual functions to create.
@@ -4703,7 +4775,7 @@ Example:priority 5 from 1:2:3::5/128 table 45
Linux Traffic Control Settings.
Properties: @@ -5080,7 +5152,7 @@ Linux traffic control subsystem
Teaming Settings.
Properties: @@ -5268,7 +5340,7 @@ Linux traffic control subsystem
Team Port Settings.
Properties: @@ -5360,7 +5432,7 @@ Linux traffic control subsystem
Tunnel Settings.
Properties: @@ -5444,7 +5516,7 @@ Linux traffic control subsystem
VLAN Settings.
Properties: @@ -5526,7 +5598,7 @@ Linux traffic control subsystem
VPN Settings.
Properties: @@ -5598,7 +5670,7 @@ Linux traffic control subsystem
VRF settings.
Properties: @@ -5624,7 +5696,7 @@ Linux traffic control subsystem
VXLAN Settings.
Properties: @@ -5808,7 +5880,7 @@ Linux traffic control subsystem
Wi-Fi P2P Settings.
Properties: @@ -5854,7 +5926,7 @@ Linux traffic control subsystem
WiMax Settings.
Properties: @@ -5896,7 +5968,7 @@ Linux traffic control subsystem
Alias: ethernet
Wired Ethernet Settings.
@@ -6064,7 +6136,7 @@ Linux traffic control subsystemWireGuard Settings.
Properties: @@ -6163,7 +6235,7 @@ Linux traffic control subsystem
Alias: wifi
Wi-Fi Settings.
@@ -6357,7 +6429,7 @@ Linux traffic control subsystemAlias: wifi-sec
Wi-Fi Security Settings.
@@ -6564,7 +6636,7 @@ Linux traffic control subsystemIEEE 802.15.4 (WPAN) MAC Settings.
Properties: @@ -6646,7 +6718,7 @@ Linux traffic control subsystem
Bond Port Settings.
Properties: @@ -6686,7 +6758,7 @@ Linux traffic control subsystem
Hostname settings.
Properties: @@ -6748,7 +6820,7 @@ Linux traffic control subsystem
HSR/PRP Settings.
Properties: @@ -6806,7 +6878,7 @@ Linux traffic control subsystem
Link settings.
Properties: @@ -6870,7 +6942,7 @@ Linux traffic control subsystem
Loopback Link Settings.
Properties: @@ -6896,7 +6968,7 @@ Linux traffic control subsystem
Veth Settings.
Properties: diff --git a/docs/api/html/settings-connection.html b/docs/api/html/settings-connection.html index f450a596..afd9d6cc 100644 --- a/docs/api/html/settings-connection.html +++ b/docs/api/html/settings-connection.html @@ -77,8 +77,8 @@ Depending on "connection.multi-connect", a profile can (auto)connect only once a
autoconnect-ports
NMTernary (int32)
int32
-1
device-handler
string
offload
int32
-1
parent
string
eswitch-encap-mode
int32
-1
eswitch-inline-mode
int32
-1
eswitch-mode
int32
-1
total-vfs
uint32
0