From 1cc3d00cb76beb3849aaa53d95f6a669363eb052 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 9 Feb 2022 19:04:05 +0100 Subject: [PATCH] libnm/doc: list route attributes in `man nm-settings-nmcli` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit IPv4: routes A list of IPv4 destination addresses, prefix length, optional IPv4 next hop addresses, optional route metric, optional attribute. The valid syntax is: "ip[/prefix] [next-hop] [metric] [attribute=val]...[,ip[/prefix]...]". For example "192.0.2.0/24 10.1.1.1 77, 198.51.100.0/24". Various attributes are supported: • "cwnd" - an unsigned 32 bit integer. • "initcwnd" - an unsigned 32 bit integer. • "initrwnd" - an unsigned 32 bit integer. • "lock-cwnd" - a boolean value. • "lock-initcwnd" - a boolean value. • "lock-initrwnd" - a boolean value. • "lock-mtu" - a boolean value. • "lock-window" - a boolean value. • "mtu" - an unsigned 32 bit integer. • "onlink" - a boolean value. • "scope" - an unsigned 8 bit integer. IPv4 only. • "src" - an IPv4 address. • "table" - an unsigned 32 bit integer. The default depends on ipv4.route-table. • "tos" - an unsigned 8 bit integer. IPv4 only. • "type" - one of unicast, local, blackhole, unavailable, prohibit. The default is unicast. • "window" - an unsigned 32 bit integer. For details see also `man ip-route`. Format: a comma separated list of routes IPv6: routes A list of IPv6 destination addresses, prefix length, optional IPv6 next hop addresses, optional route metric, optional attribute. The valid syntax is: "ip[/prefix] [next-hop] [metric] [attribute=val]...[,ip[/prefix]...]". Various attributes are supported: • "cwnd" - an unsigned 32 bit integer. • "from" - an IPv6 address with optional prefix. IPv6 only. • "initcwnd" - an unsigned 32 bit integer. • "initrwnd" - an unsigned 32 bit integer. • "lock-cwnd" - a boolean value. • "lock-initcwnd" - a boolean value. • "lock-initrwnd" - a boolean value. • "lock-mtu" - a boolean value. • "lock-window" - a boolean value. • "mtu" - an unsigned 32 bit integer. • "onlink" - a boolean value. • "src" - an IPv6 address. • "table" - an unsigned 32 bit integer. The default depends on ipv6.route-table. • "type" - one of unicast, local, blackhole, unavailable, prohibit. The default is unicast. • "window" - an unsigned 32 bit integer. For details see also `man ip-route`. Format: a comma separated list of routes (cherry picked from commit 7b1e9a5c3d146c7ddd83f552c290fc841388cfda) --- src/libnm-core-impl/nm-setting-ip4-config.c | 70 ++++++++++++++++++++- src/libnm-core-impl/nm-setting-ip6-config.c | 65 +++++++++++++++++++ 2 files changed, 132 insertions(+), 3 deletions(-) diff --git a/src/libnm-core-impl/nm-setting-ip4-config.c b/src/libnm-core-impl/nm-setting-ip4-config.c index 6c2ba10d6c..76043cd50a 100644 --- a/src/libnm-core-impl/nm-setting-ip4-config.c +++ b/src/libnm-core-impl/nm-setting-ip4-config.c @@ -949,9 +949,73 @@ nm_setting_ip4_config_class_init(NMSettingIP4ConfigClass *klass) * property: routes * format: a comma separated list of routes * description: A list of IPv4 destination addresses, prefix length, optional IPv4 - * next hop addresses, optional route metric, optional attribute. The valid syntax is: - * "ip[/prefix] [next-hop] [metric] [attribute=val]...[,ip[/prefix]...]". For example - * "192.0.2.0/24 10.1.1.1 77, 198.51.100.0/24". + * next hop addresses, optional route metric, optional attribute. The valid syntax is: + * "ip[/prefix] [next-hop] [metric] [attribute=val]...[,ip[/prefix]...]". For example + * "192.0.2.0/24 10.1.1.1 77, 198.51.100.0/24". + * description-docbook: + * + * A list of IPv4 destination addresses, prefix length, optional IPv4 + * next hop addresses, optional route metric, optional attribute. The valid syntax is: + * "ip[/prefix] [next-hop] [metric] [attribute=val]...[,ip[/prefix]...]". + * For example "192.0.2.0/24 10.1.1.1 77, 198.51.100.0/24". + * + * + * Various attributes are supported: + * + * + * "cwnd" - an unsigned 32 bit integer. + * + * + * "initcwnd" - an unsigned 32 bit integer. + * + * + * "initrwnd" - an unsigned 32 bit integer. + * + * + * "lock-cwnd" - a boolean value. + * + * + * "lock-initcwnd" - a boolean value. + * + * + * "lock-initrwnd" - a boolean value. + * + * + * "lock-mtu" - a boolean value. + * + * + * "lock-window" - a boolean value. + * + * + * "mtu" - an unsigned 32 bit integer. + * + * + * "onlink" - a boolean value. + * + * + * "scope" - an unsigned 8 bit integer. IPv4 only. + * + * + * "src" - an IPv4 address. + * + * + * "table" - an unsigned 32 bit integer. The default depends on ipv4.route-table. + * + * + * "tos" - an unsigned 8 bit integer. IPv4 only. + * + * + * "type" - one of unicast, local, blackhole, + * unavailable, prohibit. The default is unicast. + * + * + * "window" - an unsigned 32 bit integer. + * + * + * + * + * For details see also `man ip-route`. + * * ---end--- */ _nm_properties_override_gobj( diff --git a/src/libnm-core-impl/nm-setting-ip6-config.c b/src/libnm-core-impl/nm-setting-ip6-config.c index 99032e97f2..54f3f96b87 100644 --- a/src/libnm-core-impl/nm-setting-ip6-config.c +++ b/src/libnm-core-impl/nm-setting-ip6-config.c @@ -989,6 +989,71 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass) * default metric for the device. * ---end--- */ + /* ---nmcli--- + * property: routes + * format: a comma separated list of routes + * description-docbook: + * + * A list of IPv6 destination addresses, prefix length, optional IPv6 + * next hop addresses, optional route metric, optional attribute. The valid syntax is: + * "ip[/prefix] [next-hop] [metric] [attribute=val]...[,ip[/prefix]...]". + * + * + * Various attributes are supported: + * + * + * "cwnd" - an unsigned 32 bit integer. + * + * + * "from" - an IPv6 address with optional prefix. IPv6 only. + * + * + * "initcwnd" - an unsigned 32 bit integer. + * + * + * "initrwnd" - an unsigned 32 bit integer. + * + * + * "lock-cwnd" - a boolean value. + * + * + * "lock-initcwnd" - a boolean value. + * + * + * "lock-initrwnd" - a boolean value. + * + * + * "lock-mtu" - a boolean value. + * + * + * "lock-window" - a boolean value. + * + * + * "mtu" - an unsigned 32 bit integer. + * + * + * "onlink" - a boolean value. + * + * + * "src" - an IPv6 address. + * + * + * "table" - an unsigned 32 bit integer. The default depends on ipv6.route-table. + * + * + * "type" - one of unicast, local, blackhole, + * unavailable, prohibit. The default is unicast. + * + * + * "window" - an unsigned 32 bit integer. + * + * + * + * + * For details see also `man ip-route`. + * + * ---end--- + */ _nm_properties_override_gobj( properties_override, g_object_class_find_property(G_OBJECT_CLASS(setting_class), NM_SETTING_IP_CONFIG_ROUTES),