NetworkManagerQt

iptunneldevice.h
1/*
2 SPDX-FileCopyrightText: 2017 Jan Grulich <jgrulich@redhat.com>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#ifndef NETWORKMANAGERQT_IPTUNNEL_DEVICE_H
8#define NETWORKMANAGERQT_IPTUNNEL_DEVICE_H
9
10#include "device.h"
11#include <networkmanagerqt/networkmanagerqt_export.h>
12
13namespace NetworkManager
14{
15class IpTunnelDevicePrivate;
16
17/**
18 * A Ip Tunnel device interface
19 */
20class NETWORKMANAGERQT_EXPORT IpTunnelDevice : public Device
21{
22 Q_OBJECT
23 Q_PROPERTY(uchar encapsulationLimit READ encapsulationLimit NOTIFY encapsulationLimitChanged)
24 Q_PROPERTY(uint flowLabel READ flowLabel NOTIFY flowLabelChanged)
25 Q_PROPERTY(QString inputKey READ inputKey NOTIFY inputKeyChanged)
26 Q_PROPERTY(QString local READ local NOTIFY localChanged)
27 Q_PROPERTY(uint mode READ mode NOTIFY modeChanged)
28 Q_PROPERTY(QString outputKey READ outputKey NOTIFY outputKeyChanged)
29 Q_PROPERTY(NetworkManager::Device::Ptr parent READ parent NOTIFY parentChanged)
30 Q_PROPERTY(bool pathMtuDiscovery READ pathMtuDiscovery NOTIFY pathMtuDiscoveryChanged)
31 Q_PROPERTY(QString remote READ remote NOTIFY remoteChanged)
32 Q_PROPERTY(uchar tos READ tos NOTIFY tosChanged)
33 Q_PROPERTY(uchar ttl READ ttl NOTIFY ttlChanged)
34
35public:
37 typedef QList<Ptr> List;
38 explicit IpTunnelDevice(const QString &path, QObject *parent = nullptr);
39 ~IpTunnelDevice() override;
40
41 Type type() const override;
42
43 /**
44 * How many additional levels of encapsulation are permitted to be prepended to packets.
45 * This property applies only to IPv6 tunnels.
46 */
47 uchar encapsulationLimit() const;
48 /**
49 * The flow label to assign to tunnel packets. This property applies only to IPv6 tunnels.
50 */
51 uint flowLabel() const;
52 /**
53 * The key used for incoming packets.
54 */
55 QString inputKey() const;
56 /**
57 * The local endpoint of the tunnel.
58 */
59 QString local() const;
60 /**
61 * The tunneling mode.
62 */
63 uint mode() const;
64 /**
65 * The key used for outgoing packets.
66 */
67 QString outputKey() const;
68 /**
69 * The object path of the parent device.
70 */
71 NetworkManager::Device::Ptr parent() const;
72 /**
73 * Whether path MTU discovery is enabled on this tunnel.
74 */
75 bool pathMtuDiscovery() const;
76 /**
77 * The remote endpoint of the tunnel.
78 */
79 QString remote() const;
80 /**
81 * The type of service (IPv4) or traffic class (IPv6) assigned to tunneled packets.
82 */
83 uchar tos() const;
84 /**
85 * The TTL assigned to tunneled packets. 0 is a special value meaning that packets inherit the TTL value
86 */
87 uchar ttl() const;
88
89Q_SIGNALS:
90 /**
91 * Emitted when the encapsulation limit has changed
92 */
93 void encapsulationLimitChanged(uchar limit);
94 /**
95 * Emitted when the flow label has changed
96 */
97 void flowLabelChanged(uint flowLabel);
98 /**
99 * Emitted when the key used for incoming packets has changed
100 */
101 void inputKeyChanged(const QString &inputKey);
102 /**
103 * Emitted when the local endpoint of the tunnel has changed
104 */
105 void localChanged(const QString &local);
106 /**
107 * Emitted when the tunneling mode has changed
108 */
109 void modeChanged(uint mode);
110 /**
111 * Emitted when the key used for outgoing packets has changed
112 */
113 void outputKeyChanged(const QString &outputKey);
114 /**
115 * Emitted when the parent of this device has changed
116 */
117 void parentChanged(const QString &parent);
118 /**
119 * Emitted when the path MTU discovery enablemened has changed
120 */
121 void pathMtuDiscoveryChanged(bool pathMtuDiscovery);
122 /**
123 * Emitted when the remote endpoint of the tunnel has changed
124 */
125 void remoteChanged(const QString &remote);
126 /**
127 * Emitted when the type of service or traffic class assigned to tunneled packets has changed
128 */
129 void tosChanged(uchar tos);
130 /**
131 * Emitted when the TTL assigned to tunneled packets has changed
132 */
133 void ttlChanged(uchar ttl);
134
135private:
136 Q_DECLARE_PRIVATE(IpTunnelDevice)
137};
138
139}
140
141#endif
This class represents a common device interface.
Definition device.h:34
Type
Device type.
Definition device.h:191
A Ip Tunnel device interface.
void ttlChanged(uchar ttl)
Emitted when the TTL assigned to tunneled packets has changed.
void modeChanged(uint mode)
Emitted when the tunneling mode has changed.
void tosChanged(uchar tos)
Emitted when the type of service or traffic class assigned to tunneled packets has changed.
void outputKeyChanged(const QString &outputKey)
Emitted when the key used for outgoing packets has changed.
void parentChanged(const QString &parent)
Emitted when the parent of this device has changed.
void localChanged(const QString &local)
Emitted when the local endpoint of the tunnel has changed.
void encapsulationLimitChanged(uchar limit)
Emitted when the encapsulation limit has changed.
void flowLabelChanged(uint flowLabel)
Emitted when the flow label has changed.
void pathMtuDiscoveryChanged(bool pathMtuDiscovery)
Emitted when the path MTU discovery enablemened has changed.
void inputKeyChanged(const QString &inputKey)
Emitted when the key used for incoming packets has changed.
void remoteChanged(const QString &remote)
Emitted when the remote endpoint of the tunnel has changed.
This class allows querying the underlying system to discover the available network interfaces and rea...
Definition accesspoint.h:21
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:21 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.