1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
2 | /* |
3 | * Copyright (C) 2015 Red Hat, Inc. |
4 | */ |
5 | |
6 | #ifndef __NM_DEVICE_TUN_H__ |
7 | #define __NM_DEVICE_TUN_H__ |
8 | |
9 | #if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) |
10 | #error "Only <NetworkManager.h> can be included directly." |
11 | #endif |
12 | |
13 | #include "nm-device.h" |
14 | |
15 | G_BEGIN_DECLS |
16 | |
17 | #define NM_TYPE_DEVICE_TUN (nm_device_tun_get_type()) |
18 | #define NM_DEVICE_TUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_TUN, NMDeviceTun)) |
19 | #define NM_DEVICE_TUN_CLASS(klass) \ |
20 | (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_TUN, NMDeviceTunClass)) |
21 | #define NM_IS_DEVICE_TUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_TUN)) |
22 | #define NM_IS_DEVICE_TUN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_TUN)) |
23 | #define NM_DEVICE_TUN_GET_CLASS(obj) \ |
24 | (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_TUN, NMDeviceTunClass)) |
25 | |
26 | #define NM_DEVICE_TUN_HW_ADDRESS "hw-address" |
27 | #define NM_DEVICE_TUN_OWNER "owner" |
28 | #define NM_DEVICE_TUN_GROUP "group" |
29 | #define NM_DEVICE_TUN_MODE "mode" |
30 | #define NM_DEVICE_TUN_NO_PI "no-pi" |
31 | #define NM_DEVICE_TUN_VNET_HDR "vnet-hdr" |
32 | #define NM_DEVICE_TUN_MULTI_QUEUE "multi-queue" |
33 | |
34 | /** |
35 | * NMDeviceTun: |
36 | */ |
37 | typedef struct _NMDeviceTunClass NMDeviceTunClass; |
38 | |
39 | NM_AVAILABLE_IN_1_2 |
40 | GType nm_device_tun_get_type(void); |
41 | |
42 | NM_AVAILABLE_IN_1_2 |
43 | NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) |
44 | const char *nm_device_tun_get_hw_address(NMDeviceTun *device); |
45 | |
46 | NM_AVAILABLE_IN_1_2 |
47 | const char *nm_device_tun_get_mode(NMDeviceTun *device); |
48 | NM_AVAILABLE_IN_1_2 |
49 | gint64 nm_device_tun_get_owner(NMDeviceTun *device); |
50 | NM_AVAILABLE_IN_1_2 |
51 | gint64 nm_device_tun_get_group(NMDeviceTun *device); |
52 | NM_AVAILABLE_IN_1_2 |
53 | gboolean nm_device_tun_get_no_pi(NMDeviceTun *device); |
54 | NM_AVAILABLE_IN_1_2 |
55 | gboolean nm_device_tun_get_vnet_hdr(NMDeviceTun *device); |
56 | NM_AVAILABLE_IN_1_2 |
57 | gboolean nm_device_tun_get_multi_queue(NMDeviceTun *device); |
58 | |
59 | G_END_DECLS |
60 | |
61 | #endif /* __NM_DEVICE_TUN_H__ */ |
62 | |