device: renew dhcp leases on awake for software devices
[NetworkManager.git] / libnm / nm-device-vxlan.h
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /*
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the
15  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  * Boston, MA 02110-1301 USA.
17  *
18  * Copyright 2015 Red Hat, Inc.
19  */
20
21 #ifndef __NM_DEVICE_VXLAN_H__
22 #define __NM_DEVICE_VXLAN_H__
23
24 #if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
25 #error "Only <NetworkManager.h> can be included directly."
26 #endif
27
28 #include <nm-device.h>
29
30 G_BEGIN_DECLS
31
32 #define NM_TYPE_DEVICE_VXLAN            (nm_device_vxlan_get_type ())
33 #define NM_DEVICE_VXLAN(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_VXLAN, NMDeviceVxlan))
34 #define NM_DEVICE_VXLAN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_VXLAN, NMDeviceVxlanClass))
35 #define NM_IS_DEVICE_VXLAN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_VXLAN))
36 #define NM_IS_DEVICE_VXLAN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_VXLAN))
37 #define NM_DEVICE_VXLAN_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_VXLAN, NMDeviceVxlanClass))
38
39 #define NM_DEVICE_VXLAN_HW_ADDRESS    "hw-address"
40 #define NM_DEVICE_VXLAN_CARRIER       "carrier"
41 #define NM_DEVICE_VXLAN_PARENT        "parent"
42 #define NM_DEVICE_VXLAN_ID            "id"
43 #define NM_DEVICE_VXLAN_GROUP         "group"
44 #define NM_DEVICE_VXLAN_LOCAL         "local"
45 #define NM_DEVICE_VXLAN_SRC_PORT_MIN  "src-port-min"
46 #define NM_DEVICE_VXLAN_SRC_PORT_MAX  "src-port-max"
47 #define NM_DEVICE_VXLAN_LEARNING      "learning"
48 #define NM_DEVICE_VXLAN_AGEING        "ageing"
49 #define NM_DEVICE_VXLAN_TOS           "tos"
50 #define NM_DEVICE_VXLAN_TTL           "ttl"
51 #define NM_DEVICE_VXLAN_LIMIT         "limit"
52 #define NM_DEVICE_VXLAN_PROXY         "proxy"
53 #define NM_DEVICE_VXLAN_RSC           "rsc"
54 #define NM_DEVICE_VXLAN_L2MISS        "l2miss"
55 #define NM_DEVICE_VXLAN_L3MISS        "l3miss"
56 #define NM_DEVICE_VXLAN_DST_PORT      "dst-port"
57
58 struct _NMDeviceVxlan {
59         NMDevice parent;
60 };
61
62 typedef struct {
63         NMDeviceClass parent;
64
65         /*< private >*/
66         gpointer padding[4];
67 } NMDeviceVxlanClass;
68
69 NM_AVAILABLE_IN_1_2
70 GType nm_device_vxlan_get_type (void);
71 NM_AVAILABLE_IN_1_2
72 const char * nm_device_vxlan_get_hw_address (NMDeviceVxlan *device);
73 NM_AVAILABLE_IN_1_2
74 gboolean     nm_device_vxlan_get_carrier (NMDeviceVxlan *device);
75 NM_AVAILABLE_IN_1_2
76 NMDevice *   nm_device_vxlan_get_parent (NMDeviceVxlan *device);
77 NM_AVAILABLE_IN_1_2
78 guint        nm_device_vxlan_get_id (NMDeviceVxlan *device);
79 NM_AVAILABLE_IN_1_2
80 const char * nm_device_vxlan_get_group (NMDeviceVxlan *device);
81 NM_AVAILABLE_IN_1_2
82 const char * nm_device_vxlan_get_local (NMDeviceVxlan *device);
83 NM_AVAILABLE_IN_1_2
84 guint        nm_device_vxlan_get_src_port_min (NMDeviceVxlan *device);
85 NM_AVAILABLE_IN_1_2
86 guint        nm_device_vxlan_get_src_port_max (NMDeviceVxlan *device);
87 NM_AVAILABLE_IN_1_2
88 guint        nm_device_vxlan_get_dst_port (NMDeviceVxlan *device);
89 NM_AVAILABLE_IN_1_2
90 gboolean     nm_device_vxlan_get_learning (NMDeviceVxlan *device);
91 NM_AVAILABLE_IN_1_2
92 guint        nm_device_vxlan_get_ageing (NMDeviceVxlan *device);
93 NM_AVAILABLE_IN_1_2
94 guint        nm_device_vxlan_get_tos (NMDeviceVxlan *device);
95 NM_AVAILABLE_IN_1_2
96 guint        nm_device_vxlan_get_ttl (NMDeviceVxlan *device);
97 NM_AVAILABLE_IN_1_2
98 guint        nm_device_vxlan_get_limit (NMDeviceVxlan *device);
99 NM_AVAILABLE_IN_1_2
100 gboolean     nm_device_vxlan_get_proxy (NMDeviceVxlan *device);
101 NM_AVAILABLE_IN_1_2
102 gboolean     nm_device_vxlan_get_rsc (NMDeviceVxlan *device);
103 NM_AVAILABLE_IN_1_2
104 gboolean     nm_device_vxlan_get_l2miss (NMDeviceVxlan *device);
105 NM_AVAILABLE_IN_1_2
106 gboolean     nm_device_vxlan_get_l3miss (NMDeviceVxlan *device);
107
108 G_END_DECLS
109
110 #endif /* __NM_DEVICE_VXLAN_H__ */