1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301 USA.
19 * Copyright 2011 - 2013 Red Hat, Inc.
22 #ifndef __NM_SETTING_BOND_H__
23 #define __NM_SETTING_BOND_H__
25 #if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
26 #error "Only <NetworkManager.h> can be included directly."
29 #include <nm-setting.h>
33 #define NM_TYPE_SETTING_BOND (nm_setting_bond_get_type ())
34 #define NM_SETTING_BOND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SETTING_BOND, NMSettingBond))
35 #define NM_SETTING_BOND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SETTING_BOND, NMSettingBondClass))
36 #define NM_IS_SETTING_BOND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SETTING_BOND))
37 #define NM_IS_SETTING_BOND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_SETTING_BOND))
38 #define NM_SETTING_BOND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SETTING_BOND, NMSettingBondClass))
40 #define NM_SETTING_BOND_SETTING_NAME "bond"
42 #define NM_SETTING_BOND_OPTIONS "options"
44 /* Valid options for the 'options' property */
45 #define NM_SETTING_BOND_OPTION_MODE "mode"
46 #define NM_SETTING_BOND_OPTION_MIIMON "miimon"
47 #define NM_SETTING_BOND_OPTION_DOWNDELAY "downdelay"
48 #define NM_SETTING_BOND_OPTION_UPDELAY "updelay"
49 #define NM_SETTING_BOND_OPTION_ARP_INTERVAL "arp_interval"
50 #define NM_SETTING_BOND_OPTION_ARP_IP_TARGET "arp_ip_target"
51 #define NM_SETTING_BOND_OPTION_ARP_VALIDATE "arp_validate"
52 #define NM_SETTING_BOND_OPTION_PRIMARY "primary"
53 #define NM_SETTING_BOND_OPTION_PRIMARY_RESELECT "primary_reselect"
54 #define NM_SETTING_BOND_OPTION_FAIL_OVER_MAC "fail_over_mac"
55 #define NM_SETTING_BOND_OPTION_USE_CARRIER "use_carrier"
56 #define NM_SETTING_BOND_OPTION_AD_SELECT "ad_select"
57 #define NM_SETTING_BOND_OPTION_XMIT_HASH_POLICY "xmit_hash_policy"
58 #define NM_SETTING_BOND_OPTION_RESEND_IGMP "resend_igmp"
59 #define NM_SETTING_BOND_OPTION_LACP_RATE "lacp_rate"
61 struct _NMSettingBond {
66 NMSettingClass parent;
72 GType nm_setting_bond_get_type (void);
74 NMSetting * nm_setting_bond_new (void);
75 guint32 nm_setting_bond_get_num_options (NMSettingBond *setting);
76 gboolean nm_setting_bond_get_option (NMSettingBond *setting,
78 const char **out_name,
79 const char **out_value);
80 const char * nm_setting_bond_get_option_by_name (NMSettingBond *setting,
82 gboolean nm_setting_bond_add_option (NMSettingBond *setting,
85 gboolean nm_setting_bond_remove_option (NMSettingBond *setting,
88 gboolean nm_setting_bond_validate_option (const char *name,
91 const char **nm_setting_bond_get_valid_options (NMSettingBond *setting);
93 const char * nm_setting_bond_get_option_default (NMSettingBond *setting,
98 #endif /* __NM_SETTING_BOND_H__ */