From 4da7c13d93df0c839339a98498fee08580cbc8bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= Date: Fri, 11 Aug 2023 15:58:43 +0200 Subject: [PATCH] docs: Improve documentation of ip-tunnel.mode property Use the new "expand enumvals" feature of the doc generation scripts to document the accepted values more accurately. This way, all possible values are shown. New generated text for dbus man page: The tunneling mode, valid values: NM_IP_TUNNEL_MODE_IPIP (1), NM_IP_TUNNEL_MODE_GRE (2), NM_IP_TUNNEL_MODE_SIT (3), NM_IP_TUNNEL_MODE_ISATAP (4), NM_IP_TUNNEL_MODE_VTI (5), NM_IP_TUNNEL_MODE_IP6IP6 (6), NM_IP_TUNNEL_MODE_IPIP6 (7), NM_IP_TUNNEL_MODE_IP6GRE (8), NM_IP_TUNNEL_MODE_VTI6 (9), NM_IP_TUNNEL_MODE_GRETAP (10), NM_IP_TUNNEL_MODE_IP6GRETAP (11) New generated text for nmcli, both for interactive mode and for the man page: The tunneling mode, valid values: ipip (1), gre (2), sit (3), isatap (4), vti (5), ip6ip6 (6), ipip6 (7), ip6gre (8), vti6 (9), gretap (10), ip6gretap (11) In this case, the "enumvals with docs expansion" hasn't been used because the option names are self explanatory and their explanations don't add additional value. --- src/libnm-core-impl/nm-setting-ip-tunnel.c | 8 ++++++-- src/libnm-core-public/nm-dbus-interface.h | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/libnm-core-impl/nm-setting-ip-tunnel.c b/src/libnm-core-impl/nm-setting-ip-tunnel.c index d28eb73fd7..f01b1e5197 100644 --- a/src/libnm-core-impl/nm-setting-ip-tunnel.c +++ b/src/libnm-core-impl/nm-setting-ip-tunnel.c @@ -593,11 +593,15 @@ nm_setting_ip_tunnel_class_init(NMSettingIPTunnelClass *klass) /** * NMSettingIPTunnel:mode: * - * The tunneling mode, for example %NM_IP_TUNNEL_MODE_IPIP or - * %NM_IP_TUNNEL_MODE_GRE. + * The tunneling mode, valid values: #NMIPTunnelMode. * * Since: 1.2 **/ + /* ---nmcli,dbus--- + * property: mode + * description: The tunneling mode, valid values: #NMIPTunnelMode:* + * ---end--- + */ _nm_setting_property_define_direct_uint32(properties_override, obj_properties, NM_SETTING_IP_TUNNEL_MODE, diff --git a/src/libnm-core-public/nm-dbus-interface.h b/src/libnm-core-public/nm-dbus-interface.h index b490e3b11c..a7483b7808 100644 --- a/src/libnm-core-public/nm-dbus-interface.h +++ b/src/libnm-core-public/nm-dbus-interface.h @@ -943,6 +943,11 @@ typedef enum /*< flags >*/ { * Since: 1.2 */ typedef enum { + /** + * NM_IP_TUNNEL_MODE_UNKNOWN: (attributes NM.internal=1) + * + * Unknown/unset tunnel mode + */ NM_IP_TUNNEL_MODE_UNKNOWN = 0, NM_IP_TUNNEL_MODE_IPIP = 1, NM_IP_TUNNEL_MODE_GRE = 2,