OpenVPN
src
openvpn
dco_linux.h
Go to the documentation of this file.
1
/*
2
* Interface to linux dco networking code
3
*
4
* Copyright (C) 2020-2025 Antonio Quartulli <a@unstable.cc>
5
* Copyright (C) 2020-2025 Arne Schwabe <arne@rfc2549.org>
6
* Copyright (C) 2020-2025 OpenVPN Inc <sales@openvpn.net>
7
*
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License version 2
10
* as published by the Free Software Foundation.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program (see the file COPYING included with this
19
* distribution); if not, write to the Free Software Foundation, Inc.,
20
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
*/
22
#ifndef DCO_LINUX_H
23
#define DCO_LINUX_H
24
25
#if defined(ENABLE_DCO) && defined(TARGET_LINUX)
26
27
#include "
event.h
"
28
29
#include "
ovpn_dco_linux.h
"
30
31
#include <netlink/socket.h>
32
#include <netlink/netlink.h>
33
34
/* Defines to avoid mismatching with other platforms */
35
#define OVPN_CMD_DEL_PEER OVPN_CMD_PEER_DEL_NTF
36
#define OVPN_CMD_SWAP_KEYS OVPN_CMD_KEY_SWAP_NTF
37
38
typedef
enum
ovpn_key_slot
dco_key_slot_t;
39
typedef
enum
ovpn_cipher_alg
dco_cipher_t;
40
41
/* OVPN section */
42
43
#ifndef IFLA_OVPN_MAX
44
45
enum
ovpn_mode {
46
OVPN_MODE_P2P
,
47
OVPN_MODE_MP
,
48
};
49
50
enum
ovpn_ifla_attrs {
51
IFLA_OVPN_UNSPEC = 0,
52
IFLA_OVPN_MODE,
53
54
__IFLA_OVPN_MAX,
55
};
56
57
#define IFLA_OVPN_MAX (__IFLA_OVPN_MAX - 1)
58
59
#endif
/* ifndef IFLA_OVPN_MAX */
60
61
typedef
struct
62
{
63
struct
nl_sock *nl_sock;
64
struct
nl_cb *nl_cb;
65
int
status
;
66
67
enum
ovpn_mode ifmode;
68
69
int
ovpn_dco_id;
70
int
ovpn_dco_mcast_id;
71
72
unsigned
int
ifindex;
73
74
int
dco_message_type;
75
int
dco_message_peer_id;
76
int
dco_message_key_id;
77
int
dco_del_peer_reason;
78
uint64_t dco_read_bytes;
79
uint64_t dco_write_bytes;
80
}
dco_context_t
;
81
82
#endif
/* defined(ENABLE_DCO) && defined(TARGET_LINUX) */
83
#endif
/* ifndef DCO_LINUX_H */
dco_context_t
void * dco_context_t
Definition
dco.h:267
event.h
status
static SERVICE_STATUS status
Definition
interactive.c:52
ovpn_key_slot
ovpn_key_slot
Definition
ovpn_dco_freebsd.h:47
ovpn_dco_linux.h
ovpn_cipher_alg
ovpn_cipher_alg
Definition
ovpn_dco_linux.h:14
OVPN_MODE_MP
@ OVPN_MODE_MP
Definition
ovpn_dco_win.h:135
OVPN_MODE_P2P
@ OVPN_MODE_P2P
Definition
ovpn_dco_win.h:134
Generated by
1.9.8