device: renew dhcp leases on awake for software devices
[NetworkManager.git] / libnm-core / nm-setting-bridge.h
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2
3 /*
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.
8  *
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.
13  *
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.
18  *
19  * Copyright 2011 - 2015 Red Hat, Inc.
20  */
21
22 #ifndef __NM_SETTING_BRIDGE_H__
23 #define __NM_SETTING_BRIDGE_H__
24
25 #if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
26 #error "Only <NetworkManager.h> can be included directly."
27 #endif
28
29 #include <nm-setting.h>
30
31 G_BEGIN_DECLS
32
33 #define NM_TYPE_SETTING_BRIDGE            (nm_setting_bridge_get_type ())
34 #define NM_SETTING_BRIDGE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SETTING_BRIDGE, NMSettingBridge))
35 #define NM_SETTING_BRIDGE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SETTING_BRIDGE, NMSettingBridgeClass))
36 #define NM_IS_SETTING_BRIDGE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SETTING_BRIDGE))
37 #define NM_IS_SETTING_BRIDGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_SETTING_BRIDGE))
38 #define NM_SETTING_BRIDGE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SETTING_BRIDGE, NMSettingBridgeClass))
39
40 #define NM_SETTING_BRIDGE_SETTING_NAME "bridge"
41
42 #define NM_SETTING_BRIDGE_MAC_ADDRESS    "mac-address"
43 #define NM_SETTING_BRIDGE_STP            "stp"
44 #define NM_SETTING_BRIDGE_PRIORITY       "priority"
45 #define NM_SETTING_BRIDGE_FORWARD_DELAY  "forward-delay"
46 #define NM_SETTING_BRIDGE_HELLO_TIME     "hello-time"
47 #define NM_SETTING_BRIDGE_MAX_AGE        "max-age"
48 #define NM_SETTING_BRIDGE_AGEING_TIME    "ageing-time"
49 #define NM_SETTING_BRIDGE_MULTICAST_SNOOPING "multicast-snooping"
50
51 struct _NMSettingBridge {
52         NMSetting parent;
53 };
54
55 typedef struct {
56         NMSettingClass parent;
57
58         /*< private >*/
59         gpointer padding[4];
60 } NMSettingBridgeClass;
61
62 GType nm_setting_bridge_get_type (void);
63
64 NMSetting *  nm_setting_bridge_new                (void);
65
66 const char * nm_setting_bridge_get_mac_address    (NMSettingBridge *setting);
67
68 gboolean     nm_setting_bridge_get_stp            (NMSettingBridge *setting);
69
70 guint16      nm_setting_bridge_get_priority       (NMSettingBridge *setting);
71
72 guint16      nm_setting_bridge_get_forward_delay  (NMSettingBridge *setting);
73
74 guint16      nm_setting_bridge_get_hello_time     (NMSettingBridge *setting);
75
76 guint16      nm_setting_bridge_get_max_age        (NMSettingBridge *setting);
77
78 guint32      nm_setting_bridge_get_ageing_time    (NMSettingBridge *setting);
79
80 gboolean     nm_setting_bridge_get_multicast_snooping (NMSettingBridge *setting);
81
82 G_END_DECLS
83
84 #endif /* __NM_SETTING_BRIDGE_H__ */