device: renew dhcp leases on awake for software devices
[NetworkManager.git] / src / nm-dcb.h
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* NetworkManager -- Network link manager
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program 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
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  *
18  * Copyright (C) 2013 Red Hat, Inc.
19  */
20
21 #ifndef __NETWORKMANAGER_DCB_H__
22 #define __NETWORKMANAGER_DCB_H__
23
24 #include "nm-default.h"
25 #include "nm-setting-dcb.h"
26
27 gboolean nm_dcb_enable (const char *iface, gboolean enable, GError **error);
28 gboolean nm_dcb_setup (const char *iface, NMSettingDcb *s_dcb, GError **error);
29 gboolean nm_dcb_cleanup (const char *iface, GError **error);
30
31 /* For testcases only! */
32 typedef gboolean (*DcbFunc) (char **argv,
33                              guint which,
34                              gpointer user_data,
35                              GError **error);
36
37 #define DCBTOOL 0
38 #define FCOEADM 1
39
40 gboolean do_helper (const char *iface,
41                     guint which,
42                     DcbFunc run_func,
43                     gpointer user_data,
44                     GError **error,
45                     const char *fmt,
46                     ...) G_GNUC_PRINTF(6, 7);
47
48 gboolean _dcb_enable (const char *iface,
49                       gboolean enable,
50                       DcbFunc run_func,
51                       gpointer user_data,
52                       GError **error);
53
54 gboolean _dcb_setup (const char *iface,
55                      NMSettingDcb *s_dcb,
56                      DcbFunc run_func,
57                      gpointer user_data,
58                      GError **error);
59
60 gboolean _dcb_cleanup (const char *iface,
61                        DcbFunc run_func,
62                        gpointer user_data,
63                        GError **error);
64
65 gboolean _fcoe_setup (const char *iface,
66                       NMSettingDcb *s_dcb,
67                       DcbFunc run_func,
68                       gpointer user_data,
69                       GError **error);
70
71 gboolean _fcoe_cleanup (const char *iface,
72                         DcbFunc run_func,
73                         gpointer user_data,
74                         GError **error);
75
76 #endif /* __NETWORKMANAGER_DCB_H__ */