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 | |
15 | G_BEGIN_DECLS |
16 | |
17 | NM_AVAILABLE_IN_1_20 |
18 | gboolean nm_ethtool_optname_is_feature(const char *optname); |
19 | |
20 | NM_AVAILABLE_IN_1_26 |
21 | gboolean nm_ethtool_optname_is_coalesce(const char *optname); |
22 | |
23 | NM_AVAILABLE_IN_1_26 |
24 | gboolean nm_ethtool_optname_is_ring(const char *optname); |
25 | |
26 | NM_AVAILABLE_IN_1_32 |
27 | gboolean 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 | |
46 | typedef struct _NMSettingEthtoolClass NMSettingEthtoolClass; |
47 | |
48 | NM_AVAILABLE_IN_1_14 |
49 | GType nm_setting_ethtool_get_type(void); |
50 | |
51 | NM_AVAILABLE_IN_1_14 |
52 | NMSetting *nm_setting_ethtool_new(void); |
53 | |
54 | /*****************************************************************************/ |
55 | |
56 | NM_AVAILABLE_IN_1_20 |
57 | NM_DEPRECATED_IN_1_26 |
58 | const char **nm_setting_ethtool_get_optnames(NMSettingEthtool *setting, guint *out_length); |
59 | |
60 | NM_AVAILABLE_IN_1_14 |
61 | NM_DEPRECATED_IN_1_26 |
62 | NMTernary nm_setting_ethtool_get_feature(NMSettingEthtool *setting, const char *optname); |
63 | NM_AVAILABLE_IN_1_14 |
64 | NM_DEPRECATED_IN_1_26 |
65 | void |
66 | nm_setting_ethtool_set_feature(NMSettingEthtool *setting, const char *optname, NMTernary value); |
67 | NM_AVAILABLE_IN_1_14 |
68 | NM_DEPRECATED_IN_1_26 |
69 | void nm_setting_ethtool_clear_features(NMSettingEthtool *setting); |
70 | |
71 | G_END_DECLS |
72 | |
73 | #endif /* __NM_SETTING_ETHTOOL_H__ */ |
74 | |