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
16G_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
42typedef struct _NMSettingTeamPortClass NMSettingTeamPortClass;
43
44GType nm_setting_team_port_get_type(void);
45
46NMSetting *nm_setting_team_port_new(void);
47
48const char *nm_setting_team_port_get_config(NMSettingTeamPort *setting);
49NM_AVAILABLE_IN_1_12
50int nm_setting_team_port_get_queue_id(NMSettingTeamPort *setting);
51NM_AVAILABLE_IN_1_12
52int nm_setting_team_port_get_prio(NMSettingTeamPort *setting);
53NM_AVAILABLE_IN_1_12
54gboolean nm_setting_team_port_get_sticky(NMSettingTeamPort *setting);
55NM_AVAILABLE_IN_1_12
56int nm_setting_team_port_get_lacp_prio(NMSettingTeamPort *setting);
57NM_AVAILABLE_IN_1_12
58int nm_setting_team_port_get_lacp_key(NMSettingTeamPort *setting);
59NM_AVAILABLE_IN_1_12
60guint nm_setting_team_port_get_num_link_watchers(NMSettingTeamPort *setting);
61NM_AVAILABLE_IN_1_12
62NMTeamLinkWatcher *nm_setting_team_port_get_link_watcher(NMSettingTeamPort *setting, guint idx);
63NM_AVAILABLE_IN_1_12
64gboolean nm_setting_team_port_add_link_watcher(NMSettingTeamPort *setting,
65 NMTeamLinkWatcher *link_watcher);
66NM_AVAILABLE_IN_1_12
67void nm_setting_team_port_remove_link_watcher(NMSettingTeamPort *setting, guint idx);
68NM_AVAILABLE_IN_1_12
69gboolean nm_setting_team_port_remove_link_watcher_by_value(NMSettingTeamPort *setting,
70 NMTeamLinkWatcher *link_watcher);
71NM_AVAILABLE_IN_1_12
72void nm_setting_team_port_clear_link_watchers(NMSettingTeamPort *setting);
73G_END_DECLS
74
75#endif /* __NM_SETTING_TEAM_PORT_H__ */
76

source code of include/libnm/nm-setting-team-port.h