about summary refs log tree commit diff
path: root/src/libnm-core-impl/nm-setting-ethtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnm-core-impl/nm-setting-ethtool.c')
-rw-r--r--src/libnm-core-impl/nm-setting-ethtool.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/libnm-core-impl/nm-setting-ethtool.c b/src/libnm-core-impl/nm-setting-ethtool.c
index ab1ed0e2..06c9c12b 100644
--- a/src/libnm-core-impl/nm-setting-ethtool.c
+++ b/src/libnm-core-impl/nm-setting-ethtool.c
@@ -76,6 +76,37 @@ nm_ethtool_optname_is_ring(const char *optname)
 }
 
 /**
+ * nm_ethtool_optname_is_channels:
+ * @optname: (nullable): the option name to check
+ *
+ * Checks whether @optname is a valid option name for a channels setting.
+ *
+ * Returns: %TRUE, if @optname is valid
+ *
+ * Since: 1.46
+ */
+gboolean
+nm_ethtool_optname_is_channels(const char *optname)
+{
+    return optname && nm_ethtool_id_is_channels(nm_ethtool_id_get_by_name(optname));
+}
+
+/**
+ * nm_ethtool_optname_is_eee:
+ * @optname: (nullable): the option name to check
+ *
+ * Checks whether @optname is a valid option name for an eee setting.
+ *
+ * Returns: %TRUE, if @optname is valid
+ *
+ * Since: 1.46
+ */
+gboolean
+nm_ethtool_optname_is_eee(const char *optname)
+{
+    return optname && nm_ethtool_id_is_eee(nm_ethtool_id_get_by_name(optname));
+}
+/**
  * nm_ethtool_optname_is_pause:
  * @optname: (nullable): the option name to check
  *