man nm-settings-nmcli: add "Special values" field

If there are properties that accept special values apart from the
normally accepted values, or any of those values has an special meaning,
it can be shown as "Special value", indicating the nicknames and numbers
that can be used to select it.
This commit is contained in:
Íñigo Huguet 2023-09-05 16:25:02 +02:00
parent 925d4df801
commit 5c6ae44e00
6 changed files with 173 additions and 55 deletions

View File

@ -181,6 +181,11 @@
Valid values: <xsl:value-of select="@values"/>
</para>
</xsl:if>
<xsl:if test="@special-values">
<para>
Special values: <xsl:value-of select="@special-values"/>
</para>
</xsl:if>
</listitem>
</varlistentry>
</xsl:template>

View File

@ -5672,9 +5672,6 @@ static const NMMetaPropertyInfo *const property_infos_CONNECTION[] = {
.set_fcn = _set_fcn_connection_metered,
.doc_format = NM_META_PROPERTY_TYPE_FORMAT_TERNARY,
),
.property_typ_data = DEFINE_PROPERTY_TYP_DATA (
.values_static = NM_MAKE_STRV ("yes", "no", "unknown"),
),
),
PROPERTY_INFO_WITH_DESC (NM_SETTING_CONNECTION_LLDP,
.property_type = &_pt_gobject_enum,

View File

@ -402,6 +402,65 @@ get_property_valid_values(const NMMetaPropertyInfo *prop_info)
return valid_values;
}
static void
append_int_special_values(const NMMetaPropertyInfo *prop_info, GPtrArray *special_values)
{
const NMMetaPropertyTypData *prop_typ_data = prop_info->property_typ_data;
if (prop_typ_data && prop_typ_data->subtype.gobject_int.value_infos) {
GType gtype = _property_get_gtype(prop_info);
bool is_uint = NM_IN_SET(gtype, G_TYPE_UINT, G_TYPE_UINT64);
guint base = prop_typ_data->subtype.gobject_int.base;
const NMMetaUtilsIntValueInfo *v = prop_typ_data->subtype.gobject_int.value_infos;
if (!(base == 0 || base == 10 || (is_uint && base == 16))) {
if (is_uint)
prop_abort(prop_info, "only base 10 supported for signed int");
else
prop_abort(prop_info, "only base 10 or 16 supported for uint");
}
for (; v->nick != NULL; v++) {
char *v_str;
if (base == 16)
v_str = g_strdup_printf("%s (0x%lx)", v->nick, v->value.u64);
else if (is_uint)
v_str = g_strdup_printf("%s (%lu)", v->nick, v->value.u64);
else
v_str = g_strdup_printf("%s (%ld)", v->nick, v->value.i64);
g_ptr_array_add(special_values, v_str);
}
}
}
static GPtrArray *
get_property_special_values(const NMMetaPropertyInfo *prop_info)
{
const NMMetaPropertyType *prop_type = prop_info->property_type;
const NMMetaPropertyTypData *prop_typ_data = prop_info->property_typ_data;
NMMetaPropertyTypeFormat fmt = prop_type->doc_format;
GPtrArray *special_values = g_ptr_array_new_full(16, g_free);
switch (fmt) {
case NM_META_PROPERTY_TYPE_FORMAT_INT:
append_int_special_values(prop_info, special_values);
break;
case NM_META_PROPERTY_TYPE_FORMAT_MAC:
if (prop_typ_data
&& prop_typ_data->subtype.mac.mode == NM_META_PROPERTY_TYPE_MAC_MODE_CLONED)
append_vals(special_values, "preserve", "permanent", "random", "stable");
break;
case NM_META_PROPERTY_TYPE_FORMAT_MTU:
g_ptr_array_add(special_values, g_strdup("auto"));
break;
default:
break;
}
return special_values;
}
int
main(int argc, char *argv[])
{
@ -424,13 +483,15 @@ main(int argc, char *argv[])
g_print(" >\n");
for (i_property = 0; i_property < sett_info->properties_num; i_property++) {
const NMMetaPropertyInfo *prop_info = sett_info->properties[i_property];
gs_free char *name = NULL;
gs_free char *alias = NULL;
gs_free char *descr = NULL;
gs_free char *fmt = NULL;
gs_unref_ptrarray GPtrArray *vals_arr = NULL;
gs_free char *vals_str = NULL;
const NMMetaPropertyInfo *prop_info = sett_info->properties[i_property];
gs_free char *name = NULL;
gs_free char *alias = NULL;
gs_free char *descr = NULL;
gs_free char *fmt = NULL;
gs_unref_ptrarray GPtrArray *vals_arr = NULL;
gs_free char *vals_str = NULL;
gs_unref_ptrarray GPtrArray *specials_arr = NULL;
gs_free char *specials_str = NULL;
g_print("%s<property", _indent_level(2 * INDENT));
g_print(" name=%s", name = _xml_escape_attribute(prop_info->property_name));
@ -470,6 +531,15 @@ main(int argc, char *argv[])
_xml_escape_attribute(vals_str));
}
specials_arr = get_property_special_values(prop_info);
if (specials_arr->len) {
g_ptr_array_add(specials_arr, NULL);
specials_str = g_strjoinv(", ", (char **) specials_arr->pdata);
g_print("\n%sspecial-values=%s",
_indent_level(2 * INDENT + 10),
_xml_escape_attribute(specials_str));
}
g_print(" />\n");
}

View File

@ -50,7 +50,8 @@
<property name="cloned-mac-address"
alias="cloned-mac"
nmcli-description="If specified, request that the device use this MAC address instead. This is known as MAC cloning or spoofing. Beside explicitly specifying a MAC address, the special values &quot;preserve&quot;, &quot;permanent&quot;, &quot;random&quot; and &quot;stable&quot; are supported. &quot;preserve&quot; means not to touch the MAC address on activation. &quot;permanent&quot; means to use the permanent hardware address of the device. &quot;random&quot; creates a random MAC address on each connect. &quot;stable&quot; creates a hashed MAC address based on connection.stable-id and a machine dependent key. If unspecified, the value can be overwritten via global defaults, see manual of NetworkManager.conf. If still unspecified, it defaults to &quot;preserve&quot; (older versions of NetworkManager may use a different default value). On D-Bus, this field is expressed as &quot;assigned-mac-address&quot; or the deprecated &quot;cloned-mac-address&quot;."
format="MAC address" />
format="MAC address"
special-values="preserve, permanent, random, stable" />
<property name="generate-mac-address-mask"
nmcli-description="With &quot;cloned-mac-address&quot; setting &quot;random&quot; or &quot;stable&quot;, by default all bits of the MAC address are scrambled and a locally-administered, unicast MAC address is created. This property allows to specify that certain bits are fixed. Note that the least significant bit of the first MAC address will always be unset to create a unicast MAC address. If the property is NULL, it is eligible to be overwritten by a default connection setting. If the value is still NULL or an empty string, the default is to create a locally-administered, unicast MAC address. If the value contains one MAC address, this address is used as mask. The set bits of the mask are to be filled with the current MAC address of the device, while the unset bits are subject to randomization. Setting &quot;FE:FF:FF:00:00:00&quot; means to preserve the OUI of the current MAC address and only randomize the lower 3 bytes using the &quot;random&quot; or &quot;stable&quot; algorithm. If the value contains one additional MAC address after the mask, this address is used instead of the current MAC address to fill the bits that shall not be randomized. For example, a value of &quot;FE:FF:FF:00:00:00 68:F7:28:00:00:00&quot; will set the OUI of the MAC address to 68:F7:28, while the lower bits are randomized. A value of &quot;02:00:00:00:00:00 00:00:00:00:00:00&quot; will create a fully scrambled globally-administered, burned-in MAC address. If the value contains more than one additional MAC addresses, one of them is chosen randomly. For example, &quot;02:00:00:00:00:00 00:00:00:00:00:00 02:00:00:00:00:00&quot; will create a fully scrambled MAC address, randomly locally or globally administered."
format="string" />
@ -64,7 +65,8 @@
<property name="mtu"
alias="mtu"
nmcli-description="If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple Ethernet frames."
format="integer" />
format="integer"
special-values="auto" />
<property name="seen-bssids"
nmcli-description="A list of BSSIDs (each BSSID formatted as a MAC address like &quot;00:11:22:33:44:55&quot;) that have been detected as part of the Wi-Fi network. NetworkManager internally tracks previously seen BSSIDs. The property is only meant for reading and reflects the BSSID list of NetworkManager. The changes you make to this property will not be preserved. This is not a regular property that the user would configure. Instead, NetworkManager automatically sets the seen BSSIDs and tracks them internally in &quot;/var/lib/NetworkManager/seen-bssids&quot; file."
format="read only" />
@ -347,7 +349,8 @@
<property name="cloned-mac-address"
alias="cloned-mac"
nmcli-description="If specified, request that the device use this MAC address instead. This is known as MAC cloning or spoofing. Beside explicitly specifying a MAC address, the special values &quot;preserve&quot;, &quot;permanent&quot;, &quot;random&quot; and &quot;stable&quot; are supported. &quot;preserve&quot; means not to touch the MAC address on activation. &quot;permanent&quot; means to use the permanent hardware address if the device has one (otherwise this is treated as &quot;preserve&quot;). &quot;random&quot; creates a random MAC address on each connect. &quot;stable&quot; creates a hashed MAC address based on connection.stable-id and a machine dependent key. If unspecified, the value can be overwritten via global defaults, see manual of NetworkManager.conf. If still unspecified, it defaults to &quot;preserve&quot; (older versions of NetworkManager may use a different default value). On D-Bus, this field is expressed as &quot;assigned-mac-address&quot; or the deprecated &quot;cloned-mac-address&quot;."
format="MAC address" />
format="MAC address"
special-values="preserve, permanent, random, stable" />
<property name="generate-mac-address-mask"
nmcli-description="With &quot;cloned-mac-address&quot; setting &quot;random&quot; or &quot;stable&quot;, by default all bits of the MAC address are scrambled and a locally-administered, unicast MAC address is created. This property allows to specify that certain bits are fixed. Note that the least significant bit of the first MAC address will always be unset to create a unicast MAC address. If the property is NULL, it is eligible to be overwritten by a default connection setting. If the value is still NULL or an empty string, the default is to create a locally-administered, unicast MAC address. If the value contains one MAC address, this address is used as mask. The set bits of the mask are to be filled with the current MAC address of the device, while the unset bits are subject to randomization. Setting &quot;FE:FF:FF:00:00:00&quot; means to preserve the OUI of the current MAC address and only randomize the lower 3 bytes using the &quot;random&quot; or &quot;stable&quot; algorithm. If the value contains one additional MAC address after the mask, this address is used instead of the current MAC address to fill the bits that shall not be randomized. For example, a value of &quot;FE:FF:FF:00:00:00 68:F7:28:00:00:00&quot; will set the OUI of the MAC address to 68:F7:28, while the lower bits are randomized. A value of &quot;02:00:00:00:00:00 00:00:00:00:00:00&quot; will create a fully scrambled globally-administered, burned-in MAC address. If the value contains more than one additional MAC addresses, one of them is chosen randomly. For example, &quot;02:00:00:00:00:00 00:00:00:00:00:00 02:00:00:00:00:00&quot; will create a fully scrambled MAC address, randomly locally or globally administered."
format="string" />
@ -357,7 +360,8 @@
<property name="mtu"
alias="mtu"
nmcli-description="If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple Ethernet frames."
format="integer" />
format="integer"
special-values="auto" />
<property name="s390-subchannels"
nmcli-description="Identifies specific subchannels that this network device uses for communication with z/VM or s390 host. Like the &quot;mac-address&quot; property for non-z/VM devices, this property can be used to ensure this connection only applies to the network device that uses these subchannels. The list should contain exactly 3 strings, and each string may only be composed of hexadecimal characters and the period (.) character."
format="list of 802-3-ethernet.s390-subchannels objects" />
@ -594,7 +598,8 @@
values="none (0x0), agent-owned (0x1), not-saved (0x2), not-required (0x4)" />
<property name="mtu"
nmcli-description="If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames."
format="integer" />
format="integer"
special-values="auto" />
</setting>
<setting name="connection" >
<property name="id"
@ -628,7 +633,8 @@
<property name="autoconnect-retries"
nmcli-description="The number of times a connection should be tried when autoactivating before giving up. Zero means forever, -1 means the global default (4 times if not overridden). Setting this to 1 means to try activation only once before blocking autoconnect. Note that after a timeout, NetworkManager will try to autoconnect again."
format="integer"
values="-1 - 2147483647" />
values="-1 - 2147483647"
special-values="default (-1), forever (0)" />
<property name="multi-connect"
nmcli-description="Specifies whether the profile can be active multiple times at a particular moment. The value is of type NMConnectionMultiConnect."
format="choice (NMConnectionMultiConnect)"
@ -669,7 +675,7 @@
<property name="metered"
nmcli-description="Whether the connection is metered. When updating this property on a currently activated connection, the change takes effect immediately."
format="ternary"
values="true/yes/on, false/no/off, default/unknown, yes, no, unknown" />
values="true/yes/on, false/no/off, default/unknown" />
<property name="lldp"
nmcli-description="Whether LLDP is enabled for the connection."
format="choice (NMSettingConnectionLldp)"
@ -710,7 +716,8 @@
<property name="app-fcoe-priority"
nmcli-description="The highest User Priority (0 - 7) which FCoE frames should use, or -1 for default priority. Only used when the &quot;app-fcoe-flags&quot; property includes the NM_SETTING_DCB_FLAG_ENABLE (0x1) flag."
format="integer"
values="-1 - 7" />
values="-1 - 7"
special-values="unset (-1)" />
<property name="app-fcoe-mode"
nmcli-description="The FCoE controller mode; either &quot;fabric&quot; or &quot;vn2vn&quot;. Since 1.34, NULL is the default and means &quot;fabric&quot;. Before 1.34, NULL was rejected as invalid and the default was &quot;fabric&quot;."
format="string"
@ -722,7 +729,8 @@
<property name="app-iscsi-priority"
nmcli-description="The highest User Priority (0 - 7) which iSCSI frames should use, or -1 for default priority. Only used when the &quot;app-iscsi-flags&quot; property includes the NM_SETTING_DCB_FLAG_ENABLE (0x1) flag."
format="integer"
values="-1 - 7" />
values="-1 - 7"
special-values="unset (-1)" />
<property name="app-fip-flags"
nmcli-description="Specifies the NMSettingDcbFlags for the DCB FIP application. Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4)."
format="flags (NMSettingDcbFlags)"
@ -730,7 +738,8 @@
<property name="app-fip-priority"
nmcli-description="The highest User Priority (0 - 7) which FIP frames should use, or -1 for default priority. Only used when the &quot;app-fip-flags&quot; property includes the NM_SETTING_DCB_FLAG_ENABLE (0x1) flag."
format="integer"
values="-1 - 7" />
values="-1 - 7"
special-values="unset (-1)" />
<property name="priority-flow-control-flags"
nmcli-description="Specifies the NMSettingDcbFlags for DCB Priority Flow Control (PFC). Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4)."
format="flags (NMSettingDcbFlags)"
@ -1083,7 +1092,8 @@
format="string" />
<property name="mtu"
nmcli-description="If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames."
format="integer" />
format="integer"
special-values="auto" />
<property name="initial-eps-bearer-configure"
nmcli-description="For LTE modems, this setting determines whether the initial EPS bearer shall be configured when bringing up the connection. It is inferred TRUE if initial-eps-bearer-apn is set."
format="boolean"
@ -1118,7 +1128,8 @@
<property name="mtu"
alias="mtu"
nmcli-description="If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames."
format="integer" />
format="integer"
special-values="auto" />
<property name="transport-mode"
alias="transport-mode"
nmcli-description="The IP-over-InfiniBand transport mode. Either &quot;datagram&quot; or &quot;connected&quot;."
@ -1128,7 +1139,8 @@
alias="p-key"
nmcli-description="The InfiniBand p-key to use for this device. A value of -1 means to use the default p-key (aka &quot;the p-key at index 0&quot;). Otherwise, it is a 16-bit unsigned integer, whose high bit 0x8000 is set if it is a &quot;full membership&quot; p-key. The values 0 and 0x8000 are not allowed. With the p-key set, the interface name is always &quot;$parent.$p_key&quot;. Setting &quot;connection.interface-name&quot; to another name is not supported. Note that kernel will internally always set the full membership bit, although the interface name does not reflect that. Usually the user would want to configure a full membership p-key with 0x8000 flag set."
format="integer"
values="-1 - 65535" />
values="-1 - 65535"
special-values="default (-1)" />
<property name="parent"
alias="parent"
nmcli-description="The interface name of the parent device of this device. Normally NULL, but if the &quot;p_key&quot; property is set, then you must specify the base device by setting either this property or &quot;mac-address&quot;."
@ -1184,7 +1196,8 @@
values="0 - 4294967295" />
<property name="mtu"
nmcli-description="If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple fragments."
format="integer" />
format="integer"
special-values="auto" />
<property name="flags"
nmcli-description="Tunnel flags. Currently, the following values are supported: 0x1 (ip6-ign-encap-limit), 0x2 (ip6-use-orig-tclass), 0x4 (ip6-use-orig-flowlabel), 0x8 (ip6-mip6-dev), 0x10 (ip6-rcv-dscp-copy) and 0x20 (ip6-use-orig-fwmark). They are valid only for IPv6 tunnels."
format="flags (NMIPTunnelFlags)"
@ -1226,7 +1239,8 @@
<property name="route-table"
nmcli-description="Enable policy routing (source routing) and set the routing table used when adding routes. This affects all routes, including device-routes, IPv4LL, DHCP, SLAAC, default-routes and static routes. But note that static routes can individually overwrite the setting by explicitly specifying a non-zero routing table. If the table setting is left at zero, it is eligible to be overwritten via global configuration. If the property is zero even after applying the global configuration value, policy routing is disabled for the address family of this connection. Policy routing disabled means that NetworkManager will add all routes to the main table (except static routes that explicitly configure a different table). Additionally, NetworkManager will not delete any extraneous routes from tables except the main table. This is to preserve backward compatibility for users who manage routing tables outside of NetworkManager."
format="integer"
values="0 - 4294967295" />
values="0 - 4294967295"
special-values="unspec (0), main (254)" />
<property name="routing-rules"
format="list of ipv4.routing-rules objects" />
<property name="replace-local-rule"
@ -1250,7 +1264,8 @@
<property name="dhcp-timeout"
nmcli-description="A timeout for a DHCP transaction in seconds. If zero (the default), a globally configured default is used. If still unspecified, a device specific timeout is used (usually 45 seconds). Set to 2147483647 (MAXINT32) for infinity."
format="integer"
values="0 - 2147483647" />
values="0 - 2147483647"
special-values="default (0), infinity (2147483647)" />
<property name="dhcp-send-hostname"
nmcli-description="If TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer. If the &quot;dhcp-hostname&quot; property is NULL and this property is TRUE, the current persistent hostname of the computer is sent."
format="boolean"
@ -1276,11 +1291,13 @@
<property name="required-timeout"
nmcli-description="The minimum time interval in milliseconds for which dynamic IP configuration should be tried before the connection succeeds. This property is useful for example if both IPv4 and IPv6 are enabled and are allowed to fail. Normally the connection succeeds as soon as one of the two address families completes; by setting a required timeout for e.g. IPv4, one can ensure that even if IP6 succeeds earlier than IPv4, NetworkManager waits some time for IPv4 before the connection becomes active. Note that if &quot;may-fail&quot; is FALSE for the same address family, this property has no effect as NetworkManager needs to wait for the full DHCP timeout. A zero value means that no required timeout is present, -1 means the default value (either configuration ipvx.required-timeout override or zero)."
format="integer"
values="-1 - 2147483647" />
values="-1 - 2147483647"
special-values="default (-1), infinity (2147483647)" />
<property name="dad-timeout"
nmcli-description="Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or zero). A value greater than zero is a timeout in milliseconds. The property is currently implemented only for IPv4."
format="integer"
values="-1 - 30000" />
values="-1 - 30000"
special-values="default (-1), off (0)" />
<property name="dhcp-vendor-class-identifier"
nmcli-description="The Vendor Class Identifier DHCP option (60). Special characters in the data string may be escaped using C-style escapes, nevertheless this property cannot contain nul bytes. If the per-profile value is unspecified (the default), a global connection default gets consulted. If still unspecified, the DHCP option is not sent to the server."
format="string" />
@ -1332,7 +1349,8 @@
<property name="route-table"
nmcli-description="Enable policy routing (source routing) and set the routing table used when adding routes. This affects all routes, including device-routes, IPv4LL, DHCP, SLAAC, default-routes and static routes. But note that static routes can individually overwrite the setting by explicitly specifying a non-zero routing table. If the table setting is left at zero, it is eligible to be overwritten via global configuration. If the property is zero even after applying the global configuration value, policy routing is disabled for the address family of this connection. Policy routing disabled means that NetworkManager will add all routes to the main table (except static routes that explicitly configure a different table). Additionally, NetworkManager will not delete any extraneous routes from tables except the main table. This is to preserve backward compatibility for users who manage routing tables outside of NetworkManager."
format="integer"
values="0 - 4294967295" />
values="0 - 4294967295"
special-values="unspec (0), main (254)" />
<property name="routing-rules"
format="list of ipv6.routing-rules objects" />
<property name="replace-local-rule"
@ -1358,7 +1376,8 @@
<property name="required-timeout"
nmcli-description="The minimum time interval in milliseconds for which dynamic IP configuration should be tried before the connection succeeds. This property is useful for example if both IPv4 and IPv6 are enabled and are allowed to fail. Normally the connection succeeds as soon as one of the two address families completes; by setting a required timeout for e.g. IPv4, one can ensure that even if IP6 succeeds earlier than IPv4, NetworkManager waits some time for IPv4 before the connection becomes active. Note that if &quot;may-fail&quot; is FALSE for the same address family, this property has no effect as NetworkManager needs to wait for the full DHCP timeout. A zero value means that no required timeout is present, -1 means the default value (either configuration ipvx.required-timeout override or zero)."
format="integer"
values="-1 - 2147483647" />
values="-1 - 2147483647"
special-values="default (-1), infinity (2147483647)" />
<property name="ip6-privacy"
nmcli-description="Configure IPv6 Privacy Extensions for SLAAC, described in RFC4941. If enabled, it makes the kernel generate a temporary IPv6 address in addition to the public one generated from MAC address via modified EUI-64. This enhances privacy, but could cause problems in some applications, on the other hand. The permitted values are: -1: unknown, 0: disabled, 1: enabled (prefer public address), 2: enabled (prefer temporary addresses). Having a per-connection setting set to &quot;-1&quot; (unknown) means fallback to global configuration &quot;ipv6.ip6-privacy&quot;. If also global configuration is unspecified or set to &quot;-1&quot;, fallback to read &quot;/proc/sys/net/ipv6/conf/default/use_tempaddr&quot;. Note that this setting is distinct from the Stable Privacy addresses that can be enabled with the &quot;addr-gen-mode&quot; property&apos;s &quot;stable-privacy&quot; setting as another way of avoiding host tracking with IPv6 addresses."
format="choice (NMSettingIP6ConfigPrivacy)"
@ -1370,10 +1389,12 @@
<property name="ra-timeout"
nmcli-description="A timeout for waiting Router Advertisements in seconds. If zero (the default), a globally configured default is used. If still unspecified, the timeout depends on the sysctl settings of the device. Set to 2147483647 (MAXINT32) for infinity."
format="integer"
values="0 - 2147483647" />
values="0 - 2147483647"
special-values="default (0), infinity (2147483647)" />
<property name="mtu"
nmcli-description="Maximum transmission unit size, in bytes. If zero (the default), the MTU is set automatically from router advertisements or is left equal to the link-layer MTU. If greater than the link-layer MTU, or greater than zero but less than the minimum IPv6 MTU of 1280, this value has no effect."
format="integer" />
format="integer"
special-values="auto" />
<property name="dhcp-pd-hint"
nmcli-description="A IPv6 address followed by a slash and a prefix length. If set, the value is sent to the DHCPv6 server as hint indicating the prefix delegation (IA_PD) we want to receive. To only hint a prefix length without prefix, set the address part to the zero address (for example &quot;::/60&quot;)."
format="string" />
@ -1386,7 +1407,8 @@
<property name="dhcp-timeout"
nmcli-description="A timeout for a DHCP transaction in seconds. If zero (the default), a globally configured default is used. If still unspecified, a device specific timeout is used (usually 45 seconds). Set to 2147483647 (MAXINT32) for infinity."
format="integer"
values="0 - 2147483647" />
values="0 - 2147483647"
special-values="default (0), infinity (2147483647)" />
<property name="dhcp-send-hostname"
nmcli-description="If TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer. If the &quot;dhcp-hostname&quot; property is NULL and this property is TRUE, the current persistent hostname of the computer is sent."
format="boolean"
@ -1410,25 +1432,30 @@
<property name="gso-max-segments"
nmcli-description="The maximum segments of a Generic Segment Offload packet the device should accept. The value must be between 0 and 4294967295. When set to -1, the existing value is preserved."
format="integer"
values="-1 - 4294967295" />
values="-1 - 4294967295"
special-values="default (-1)" />
<property name="gso-max-size"
nmcli-description="The maximum size of a Generic Segment Offload packet the device should accept. The value must be between 0 and 4294967295. When set to -1, the existing value is preserved."
format="integer"
values="-1 - 4294967295" />
values="-1 - 4294967295"
special-values="default (-1)" />
<property name="gro-max-size"
nmcli-description="The maximum size of a packet built by the Generic Receive Offload stack for this device. The value must be between 0 and 4294967295. When set to -1, the existing value is preserved."
format="integer"
values="-1 - 4294967295" />
values="-1 - 4294967295"
special-values="default (-1)" />
<property name="tx-queue-length"
nmcli-description="The size of the transmit queue for the device, in number of packets. The value must be between 0 and 4294967295. When set to -1, the existing value is preserved."
format="integer"
values="-1 - 4294967295" />
values="-1 - 4294967295"
special-values="default (-1)" />
</setting>
<setting name="loopback" >
<property name="mtu"
alias="mtu"
nmcli-description="If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple Ethernet frames."
format="integer" />
format="integer"
special-values="auto" />
</setting>
<setting name="macsec" >
<property name="parent"
@ -1655,7 +1682,8 @@
values="0 - 16384" />
<property name="mtu"
nmcli-description="If non-zero, instruct pppd to send packets no larger than the specified size."
format="integer" />
format="integer"
special-values="auto" />
<property name="lcp-echo-failure"
nmcli-description="If non-zero, instruct pppd to presume the connection to the peer has failed if the specified number of LCP echo-requests go unanswered by the peer. The &quot;lcp-echo-interval&quot; property must also be set to a non-zero value if this property is used."
format="integer"
@ -1758,19 +1786,23 @@
<property name="notify-peers-count"
nmcli-description="Corresponds to the teamd notify_peers.count."
format="integer"
values="-2147483648 - 2147483647" />
values="-2147483648 - 2147483647"
special-values="unset (-1), disabled (0)" />
<property name="notify-peers-interval"
nmcli-description="Corresponds to the teamd notify_peers.interval."
format="integer"
values="-2147483648 - 2147483647" />
values="-2147483648 - 2147483647"
special-values="unset (-1), default (0)" />
<property name="mcast-rejoin-count"
nmcli-description="Corresponds to the teamd mcast_rejoin.count."
format="integer"
values="-2147483648 - 2147483647" />
values="-2147483648 - 2147483647"
special-values="unset (-1), disabled (0)" />
<property name="mcast-rejoin-interval"
nmcli-description="Corresponds to the teamd mcast_rejoin.interval."
format="integer"
values="-2147483648 - 2147483647" />
values="-2147483648 - 2147483647"
special-values="unset (-1), default (0)" />
<property name="runner"
nmcli-description="Corresponds to the teamd runner.name. Permitted values are: &quot;roundrobin&quot;, &quot;broadcast&quot;, &quot;activebackup&quot;, &quot;loadbalance&quot;, &quot;lacp&quot;, &quot;random&quot;."
format="string"
@ -1790,7 +1822,8 @@
<property name="runner-tx-balancer-interval"
nmcli-description="Corresponds to the teamd runner.tx_balancer.interval."
format="integer"
values="-2147483648 - 2147483647" />
values="-2147483648 - 2147483647"
special-values="unset (-1), default (50)" />
<property name="runner-active"
nmcli-description="Corresponds to the teamd runner.active."
format="boolean"
@ -1802,11 +1835,13 @@
<property name="runner-sys-prio"
nmcli-description="Corresponds to the teamd runner.sys_prio."
format="integer"
values="-2147483648 - 2147483647" />
values="-2147483648 - 2147483647"
special-values="unset (-1), default (65535)" />
<property name="runner-min-ports"
nmcli-description="Corresponds to the teamd runner.min_ports."
format="integer"
values="-2147483648 - 2147483647" />
values="-2147483648 - 2147483647"
special-values="unset (-1), default (1)" />
<property name="runner-agg-select-policy"
nmcli-description="Corresponds to the teamd runner.agg_select_policy."
format="string"
@ -1823,11 +1858,13 @@
<property name="queue-id"
nmcli-description="Corresponds to the teamd ports.PORTIFNAME.queue_id. When set to -1 means the parameter is skipped from the json config."
format="integer"
values="-2147483648 - 2147483647" />
values="-2147483648 - 2147483647"
special-values="unset (-1), default (0)" />
<property name="prio"
nmcli-description="Corresponds to the teamd ports.PORTIFNAME.prio."
format="integer"
values="-2147483648 - 2147483647" />
values="-2147483648 - 2147483647"
special-values="unset (0), default (0)" />
<property name="sticky"
nmcli-description="Corresponds to the teamd ports.PORTIFNAME.sticky."
format="boolean"
@ -1835,11 +1872,13 @@
<property name="lacp-prio"
nmcli-description="Corresponds to the teamd ports.PORTIFNAME.lacp_prio."
format="integer"
values="-2147483648 - 2147483647" />
values="-2147483648 - 2147483647"
special-values="unset (-1), default (255)" />
<property name="lacp-key"
nmcli-description="Corresponds to the teamd ports.PORTIFNAME.lacp_key."
format="integer"
values="-2147483648 - 2147483647" />
values="-2147483648 - 2147483647"
special-values="unset (-1), default (0)" />
<property name="link-watchers"
nmcli-description="Link watchers configuration for the connection: each link watcher is defined by a dictionary, whose keys depend upon the selected link watcher. Available link watchers are &apos;ethtool&apos;, &apos;nsna_ping&apos; and &apos;arp_ping&apos; and it is specified in the dictionary with the key &apos;name&apos;. Available keys are: ethtool: &apos;delay-up&apos;, &apos;delay-down&apos;, &apos;init-wait&apos;; nsna_ping: &apos;init-wait&apos;, &apos;interval&apos;, &apos;missed-max&apos;, &apos;target-host&apos;; arp_ping: all the ones in nsna_ping and &apos;source-host&apos;, &apos;validate-active&apos;, &apos;validate-inactive&apos;, &apos;send-always&apos;. See teamd.conf man for more details."
format="list of team-port.link-watchers objects" />
@ -2056,7 +2095,8 @@
values="true/yes/on, false/no/off" />
<property name="mtu"
nmcli-description="If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple fragments. If zero a default MTU is used. Note that contrary to wg-quick&apos;s MTU setting, this does not take into account the current routes at the time of activation."
format="integer" />
format="integer"
special-values="auto" />
<property name="ip4-auto-default-route"
nmcli-description="Whether to enable special handling of the IPv4 default route. If enabled, the IPv4 default route from wireguard.peer-routes will be placed to a dedicated routing-table and two policy routing rules will be added. The fwmark number is also used as routing-table for the default-route, and if fwmark is zero, an unused fwmark/table is chosen automatically. This corresponds to what wg-quick does with Table=auto and what WireGuard calls &quot;Improved Rule-based Routing&quot;. Note that for this automatism to work, you usually don&apos;t want to set ipv4.gateway, because that will result in a conflicting default route. Leaving this at the default will enable this option automatically if ipv4.never-default is not set and there are any peers that use a default-route as allowed-ips. Since this automatism only makes sense if you also have a peer with an /0 allowed-ips, it is usually not necessary to enable this explicitly. However, you can disable it if you want to configure your own routing and rules."
format="ternary"
@ -2075,21 +2115,25 @@
alias="short-addr"
nmcli-description="Short IEEE 802.15.4 address to be used within a restricted environment."
format="integer"
values="0 - 65535" />
values="0 - 65535"
special-values="unset (0xffff)" />
<property name="pan-id"
alias="pan-id"
nmcli-description="IEEE 802.15.4 Personal Area Network (PAN) identifier."
format="integer"
values="0 - 65535" />
values="0 - 65535"
special-values="unset (0xffff)" />
<property name="page"
alias="page"
nmcli-description="IEEE 802.15.4 channel page. A positive integer or -1, meaning &quot;do not set, use whatever the device is already set to&quot;."
format="integer"
values="-32768 - 32767" />
values="-32768 - 32767"
special-values="default (-1)" />
<property name="channel"
alias="channel"
nmcli-description="IEEE 802.15.4 channel. A positive integer or -1, meaning &quot;do not set, use whatever the device is already set to&quot;."
format="integer"
values="-32768 - 32767" />
values="-32768 - 32767"
special-values="default (-1)" />
</setting>
</nm-setting-docs>

View File

@ -125,6 +125,7 @@ keywords = collections.OrderedDict(
("variable", KEYWORD_XML_TYPE_ATTR),
("format", KEYWORD_XML_TYPE_ATTR),
("values", KEYWORD_XML_TYPE_ATTR),
("special-values", KEYWORD_XML_TYPE_ATTR),
("default", KEYWORD_XML_TYPE_ATTR),
("example", KEYWORD_XML_TYPE_ATTR),
("description", KEYWORD_XML_TYPE_ELEM),

View File

@ -297,6 +297,7 @@ for setting_name in iter_keys_of_dicts(settings_roots, key_fcn_setting_name):
node_set_attr(property_node, "type", properties_attrs)
node_set_attr(property_node, "values", properties_attrs)
node_set_attr(property_node, "special-values", properties_attrs)
node_set_attr(property_node, "default", properties_attrs)
node_set_attr(property_node, "alias", properties_attrs)