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
15G_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 */
37typedef struct _NMDeviceTunClass NMDeviceTunClass;
38
39NM_AVAILABLE_IN_1_2
40GType nm_device_tun_get_type(void);
41
42NM_AVAILABLE_IN_1_2
43NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address)
44const char *nm_device_tun_get_hw_address(NMDeviceTun *device);
45
46NM_AVAILABLE_IN_1_2
47const char *nm_device_tun_get_mode(NMDeviceTun *device);
48NM_AVAILABLE_IN_1_2
49gint64 nm_device_tun_get_owner(NMDeviceTun *device);
50NM_AVAILABLE_IN_1_2
51gint64 nm_device_tun_get_group(NMDeviceTun *device);
52NM_AVAILABLE_IN_1_2
53gboolean nm_device_tun_get_no_pi(NMDeviceTun *device);
54NM_AVAILABLE_IN_1_2
55gboolean nm_device_tun_get_vnet_hdr(NMDeviceTun *device);
56NM_AVAILABLE_IN_1_2
57gboolean nm_device_tun_get_multi_queue(NMDeviceTun *device);
58
59G_END_DECLS
60
61#endif /* __NM_DEVICE_TUN_H__ */
62

source code of include/libnm/nm-device-tun.h