1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
2 | /* |
3 | * Copyright (C) 2013 Jiri Pirko <jiri@resnulli.us> |
4 | */ |
5 | |
6 | #ifndef __NM_SETTING_TEAM_PORT_H__ |
7 | #define __NM_SETTING_TEAM_PORT_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 | #include "nm-setting-team.h" |
15 | |
16 | G_BEGIN_DECLS |
17 | |
18 | #define NM_TYPE_SETTING_TEAM_PORT (nm_setting_team_port_get_type()) |
19 | #define NM_SETTING_TEAM_PORT(obj) \ |
20 | (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_SETTING_TEAM_PORT, NMSettingTeamPort)) |
21 | #define NM_SETTING_TEAM_PORT_CLASS(klass) \ |
22 | (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_SETTING_TEAM_PORT, NMSettingTeamPortClass)) |
23 | #define NM_IS_SETTING_TEAM_PORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_SETTING_TEAM_PORT)) |
24 | #define NM_IS_SETTING_TEAM_PORT_CLASS(klass) \ |
25 | (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_SETTING_TEAM_PORT)) |
26 | #define NM_SETTING_TEAM_PORT_GET_CLASS(obj) \ |
27 | (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_SETTING_TEAM_PORT, NMSettingTeamPortClass)) |
28 | |
29 | #define NM_SETTING_TEAM_PORT_SETTING_NAME "team-port" |
30 | |
31 | #define NM_SETTING_TEAM_PORT_CONFIG "config" |
32 | #define NM_SETTING_TEAM_PORT_QUEUE_ID "queue-id" |
33 | #define NM_SETTING_TEAM_PORT_PRIO "prio" |
34 | #define NM_SETTING_TEAM_PORT_STICKY "sticky" |
35 | #define NM_SETTING_TEAM_PORT_LACP_PRIO "lacp-prio" |
36 | #define NM_SETTING_TEAM_PORT_LACP_KEY "lacp-key" |
37 | #define NM_SETTING_TEAM_PORT_LINK_WATCHERS "link-watchers" |
38 | |
39 | #define NM_SETTING_TEAM_PORT_QUEUE_ID_DEFAULT -1 |
40 | #define NM_SETTING_TEAM_PORT_LACP_PRIO_DEFAULT 255 |
41 | |
42 | typedef struct _NMSettingTeamPortClass NMSettingTeamPortClass; |
43 | |
44 | GType nm_setting_team_port_get_type(void); |
45 | |
46 | NMSetting *nm_setting_team_port_new(void); |
47 | |
48 | const char *nm_setting_team_port_get_config(NMSettingTeamPort *setting); |
49 | NM_AVAILABLE_IN_1_12 |
50 | int nm_setting_team_port_get_queue_id(NMSettingTeamPort *setting); |
51 | NM_AVAILABLE_IN_1_12 |
52 | int nm_setting_team_port_get_prio(NMSettingTeamPort *setting); |
53 | NM_AVAILABLE_IN_1_12 |
54 | gboolean nm_setting_team_port_get_sticky(NMSettingTeamPort *setting); |
55 | NM_AVAILABLE_IN_1_12 |
56 | int nm_setting_team_port_get_lacp_prio(NMSettingTeamPort *setting); |
57 | NM_AVAILABLE_IN_1_12 |
58 | int nm_setting_team_port_get_lacp_key(NMSettingTeamPort *setting); |
59 | NM_AVAILABLE_IN_1_12 |
60 | guint nm_setting_team_port_get_num_link_watchers(NMSettingTeamPort *setting); |
61 | NM_AVAILABLE_IN_1_12 |
62 | NMTeamLinkWatcher *nm_setting_team_port_get_link_watcher(NMSettingTeamPort *setting, guint idx); |
63 | NM_AVAILABLE_IN_1_12 |
64 | gboolean nm_setting_team_port_add_link_watcher(NMSettingTeamPort *setting, |
65 | NMTeamLinkWatcher *link_watcher); |
66 | NM_AVAILABLE_IN_1_12 |
67 | void nm_setting_team_port_remove_link_watcher(NMSettingTeamPort *setting, guint idx); |
68 | NM_AVAILABLE_IN_1_12 |
69 | gboolean nm_setting_team_port_remove_link_watcher_by_value(NMSettingTeamPort *setting, |
70 | NMTeamLinkWatcher *link_watcher); |
71 | NM_AVAILABLE_IN_1_12 |
72 | void nm_setting_team_port_clear_link_watchers(NMSettingTeamPort *setting); |
73 | G_END_DECLS |
74 | |
75 | #endif /* __NM_SETTING_TEAM_PORT_H__ */ |
76 | |