1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2/*
3 * Copyright (C) 2018 Red Hat, Inc.
4 */
5
6#ifndef __NM_SETTING_ETHTOOL_H__
7#define __NM_SETTING_ETHTOOL_H__
8
9#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION)
10#error "Only <NetworkManager.h> can be included directly."
11#endif
12
13#include "nm-setting.h"
14
15G_BEGIN_DECLS
16
17NM_AVAILABLE_IN_1_20
18gboolean nm_ethtool_optname_is_feature(const char *optname);
19
20NM_AVAILABLE_IN_1_26
21gboolean nm_ethtool_optname_is_coalesce(const char *optname);
22
23NM_AVAILABLE_IN_1_26
24gboolean nm_ethtool_optname_is_ring(const char *optname);
25
26NM_AVAILABLE_IN_1_32
27gboolean nm_ethtool_optname_is_pause(const char *optname);
28
29/*****************************************************************************/
30
31#define NM_TYPE_SETTING_ETHTOOL (nm_setting_ethtool_get_type())
32#define NM_SETTING_ETHTOOL(obj) \
33 (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_SETTING_ETHTOOL, NMSettingEthtool))
34#define NM_SETTING_ETHTOOL_CLASS(klass) \
35 (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_SETTING_ETHTOOL, NMSettingEthtoolClass))
36#define NM_IS_SETTING_ETHTOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_SETTING_ETHTOOL))
37#define NM_IS_SETTING_ETHTOOL_CLASS(klass) \
38 (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_SETTING_ETHTOOL))
39#define NM_SETTING_ETHTOOL_GET_CLASS(obj) \
40 (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_SETTING_ETHTOOL, NMSettingEthtoolClass))
41
42#define NM_SETTING_ETHTOOL_SETTING_NAME "ethtool"
43
44/*****************************************************************************/
45
46typedef struct _NMSettingEthtoolClass NMSettingEthtoolClass;
47
48NM_AVAILABLE_IN_1_14
49GType nm_setting_ethtool_get_type(void);
50
51NM_AVAILABLE_IN_1_14
52NMSetting *nm_setting_ethtool_new(void);
53
54/*****************************************************************************/
55
56NM_AVAILABLE_IN_1_20
57NM_DEPRECATED_IN_1_26
58const char **nm_setting_ethtool_get_optnames(NMSettingEthtool *setting, guint *out_length);
59
60NM_AVAILABLE_IN_1_14
61NM_DEPRECATED_IN_1_26
62NMTernary nm_setting_ethtool_get_feature(NMSettingEthtool *setting, const char *optname);
63NM_AVAILABLE_IN_1_14
64NM_DEPRECATED_IN_1_26
65void
66nm_setting_ethtool_set_feature(NMSettingEthtool *setting, const char *optname, NMTernary value);
67NM_AVAILABLE_IN_1_14
68NM_DEPRECATED_IN_1_26
69void nm_setting_ethtool_clear_features(NMSettingEthtool *setting);
70
71G_END_DECLS
72
73#endif /* __NM_SETTING_ETHTOOL_H__ */
74

source code of include/libnm/nm-setting-ethtool.h