device: renew dhcp leases on awake for software devices
[NetworkManager.git] / libnm-util / nm-setting-ppp.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 2007 - 2008 Red Hat, Inc.
20  * Copyright 2007 - 2008 Novell, Inc.
21  */
22
23 #ifndef NM_SETTING_PPP_H
24 #define NM_SETTING_PPP_H
25
26 #include <nm-setting.h>
27
28 G_BEGIN_DECLS
29
30 #define NM_TYPE_SETTING_PPP            (nm_setting_ppp_get_type ())
31 #define NM_SETTING_PPP(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SETTING_PPP, NMSettingPPP))
32 #define NM_SETTING_PPP_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SETTING_PPP, NMSettingPPPClass))
33 #define NM_IS_SETTING_PPP(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SETTING_PPP))
34 #define NM_IS_SETTING_PPP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_SETTING_PPP))
35 #define NM_SETTING_PPP_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SETTING_PPP, NMSettingPPPClass))
36
37 #define NM_SETTING_PPP_SETTING_NAME "ppp"
38
39 /**
40  * NMSettingPPPError:
41  * @NM_SETTING_PPP_ERROR_UNKNOWN: unknown or unclassified error
42  * @NM_SETTING_PPP_ERROR_INVALID_PROPERTY: the property was invalid
43  * @NM_SETTING_PPP_ERROR_MISSING_PROPERTY: the property was missing and is
44  * required
45  * @NM_SETTING_PPP_ERROR_REQUIRE_MPPE_NOT_ALLOWED: requiring MPPE is not compatible
46  * with other setting configuration parameters
47  */
48 typedef enum {
49         NM_SETTING_PPP_ERROR_UNKNOWN = 0,             /*< nick=UnknownError >*/
50         NM_SETTING_PPP_ERROR_INVALID_PROPERTY,        /*< nick=InvalidProperty >*/
51         NM_SETTING_PPP_ERROR_MISSING_PROPERTY,        /*< nick=MissingProperty >*/
52         NM_SETTING_PPP_ERROR_REQUIRE_MPPE_NOT_ALLOWED /*< nick=RequireMPPENotAllowed >*/
53 } NMSettingPPPError;
54
55 #define NM_SETTING_PPP_ERROR nm_setting_ppp_error_quark ()
56 GQuark nm_setting_ppp_error_quark (void);
57
58 #define NM_SETTING_PPP_NOAUTH            "noauth"
59 #define NM_SETTING_PPP_REFUSE_EAP        "refuse-eap"
60 #define NM_SETTING_PPP_REFUSE_PAP        "refuse-pap"
61 #define NM_SETTING_PPP_REFUSE_CHAP       "refuse-chap"
62 #define NM_SETTING_PPP_REFUSE_MSCHAP     "refuse-mschap"
63 #define NM_SETTING_PPP_REFUSE_MSCHAPV2   "refuse-mschapv2"
64 #define NM_SETTING_PPP_NOBSDCOMP         "nobsdcomp"
65 #define NM_SETTING_PPP_NODEFLATE         "nodeflate"
66 #define NM_SETTING_PPP_NO_VJ_COMP        "no-vj-comp"
67 #define NM_SETTING_PPP_REQUIRE_MPPE      "require-mppe"
68 #define NM_SETTING_PPP_REQUIRE_MPPE_128  "require-mppe-128"
69 #define NM_SETTING_PPP_MPPE_STATEFUL     "mppe-stateful"
70 #define NM_SETTING_PPP_CRTSCTS           "crtscts"
71 #define NM_SETTING_PPP_BAUD              "baud"
72 #define NM_SETTING_PPP_MRU               "mru"
73 #define NM_SETTING_PPP_MTU               "mtu"
74 #define NM_SETTING_PPP_LCP_ECHO_FAILURE  "lcp-echo-failure"
75 #define NM_SETTING_PPP_LCP_ECHO_INTERVAL "lcp-echo-interval"
76
77 typedef struct {
78         NMSetting parent;
79 } NMSettingPPP;
80
81 typedef struct {
82         NMSettingClass parent;
83
84         /* Padding for future expansion */
85         void (*_reserved1) (void);
86         void (*_reserved2) (void);
87         void (*_reserved3) (void);
88         void (*_reserved4) (void);
89 } NMSettingPPPClass;
90
91 GType nm_setting_ppp_get_type (void);
92
93 NMSetting *nm_setting_ppp_new                   (void);
94 gboolean   nm_setting_ppp_get_noauth            (NMSettingPPP *setting);
95 gboolean   nm_setting_ppp_get_refuse_eap        (NMSettingPPP *setting);
96 gboolean   nm_setting_ppp_get_refuse_pap        (NMSettingPPP *setting);
97 gboolean   nm_setting_ppp_get_refuse_chap       (NMSettingPPP *setting);
98 gboolean   nm_setting_ppp_get_refuse_mschap     (NMSettingPPP *setting);
99 gboolean   nm_setting_ppp_get_refuse_mschapv2   (NMSettingPPP *setting);
100 gboolean   nm_setting_ppp_get_nobsdcomp         (NMSettingPPP *setting);
101 gboolean   nm_setting_ppp_get_nodeflate         (NMSettingPPP *setting);
102 gboolean   nm_setting_ppp_get_no_vj_comp        (NMSettingPPP *setting);
103 gboolean   nm_setting_ppp_get_require_mppe      (NMSettingPPP *setting);
104 gboolean   nm_setting_ppp_get_require_mppe_128  (NMSettingPPP *setting);
105 gboolean   nm_setting_ppp_get_mppe_stateful     (NMSettingPPP *setting);
106 gboolean   nm_setting_ppp_get_crtscts           (NMSettingPPP *setting);
107 guint32    nm_setting_ppp_get_baud              (NMSettingPPP *setting);
108 guint32    nm_setting_ppp_get_mru               (NMSettingPPP *setting);
109 guint32    nm_setting_ppp_get_mtu               (NMSettingPPP *setting);
110 guint32    nm_setting_ppp_get_lcp_echo_failure  (NMSettingPPP *setting);
111 guint32    nm_setting_ppp_get_lcp_echo_interval (NMSettingPPP *setting);
112
113 G_END_DECLS
114
115 #endif /* NM_SETTING_PPP_H */