device: renew dhcp leases on awake for software devices
[NetworkManager.git] / libnm-util / nm-setting-infiniband.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 Red Hat, Inc.
20  */
21
22 #ifndef NM_SETTING_INFINIBAND_H
23 #define NM_SETTING_INFINIBAND_H
24
25 #include <nm-setting.h>
26
27 G_BEGIN_DECLS
28
29 #define NM_TYPE_SETTING_INFINIBAND            (nm_setting_infiniband_get_type ())
30 #define NM_SETTING_INFINIBAND(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SETTING_INFINIBAND, NMSettingInfiniband))
31 #define NM_SETTING_INFINIBAND_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SETTING_INFINIBAND, NMSettingInfinibandClass))
32 #define NM_IS_SETTING_INFINIBAND(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SETTING_INFINIBAND))
33 #define NM_IS_SETTING_INFINIBAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_SETTING_INFINIBAND))
34 #define NM_SETTING_INFINIBAND_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SETTING_INFINIBAND, NMSettingInfinibandClass))
35
36 #define NM_SETTING_INFINIBAND_SETTING_NAME "infiniband"
37
38 /**
39  * NMSettingInfinibandError:
40  * @NM_SETTING_INFINIBAND_ERROR_UNKNOWN: unknown or unclassified error
41  * @NM_SETTING_INFINIBAND_ERROR_INVALID_PROPERTY: the property was invalid
42  * @NM_SETTING_INFINIBAND_ERROR_MISSING_PROPERTY: the property was missing and is
43  * required
44  */
45 typedef enum {
46         NM_SETTING_INFINIBAND_ERROR_UNKNOWN = 0,      /*< nick=UnknownError >*/
47         NM_SETTING_INFINIBAND_ERROR_INVALID_PROPERTY, /*< nick=InvalidProperty >*/
48         NM_SETTING_INFINIBAND_ERROR_MISSING_PROPERTY  /*< nick=MissingProperty >*/
49 } NMSettingInfinibandError;
50
51 #define NM_SETTING_INFINIBAND_ERROR nm_setting_infiniband_error_quark ()
52 GQuark nm_setting_infiniband_error_quark (void);
53
54 #define NM_SETTING_INFINIBAND_MAC_ADDRESS    "mac-address"
55 #define NM_SETTING_INFINIBAND_MTU            "mtu"
56 #define NM_SETTING_INFINIBAND_TRANSPORT_MODE "transport-mode"
57 #define NM_SETTING_INFINIBAND_P_KEY          "p-key"
58 #define NM_SETTING_INFINIBAND_PARENT         "parent"
59
60 typedef struct {
61         NMSetting parent;
62 } NMSettingInfiniband;
63
64 typedef struct {
65         NMSettingClass parent;
66
67         /* Padding for future expansion */
68         void (*_reserved1) (void);
69         void (*_reserved2) (void);
70         void (*_reserved3) (void);
71         void (*_reserved4) (void);
72 } NMSettingInfinibandClass;
73
74 GType nm_setting_infiniband_get_type (void);
75
76 NMSetting *       nm_setting_infiniband_new                (void);
77 const GByteArray *nm_setting_infiniband_get_mac_address    (NMSettingInfiniband *setting);
78 guint32           nm_setting_infiniband_get_mtu            (NMSettingInfiniband *setting);
79 const char *      nm_setting_infiniband_get_transport_mode (NMSettingInfiniband *setting);
80 int               nm_setting_infiniband_get_p_key          (NMSettingInfiniband *setting);
81 const char *      nm_setting_infiniband_get_parent         (NMSettingInfiniband *setting);
82
83 G_END_DECLS
84
85 #endif /* NM_SETTING_INFINIBAND_H */