blob: d28e3658dff290c025358be0a54193fc6213488f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
/*
* Interface to linux dco networking code
*
* Copyright (C) 2020-2023 Antonio Quartulli <a@unstable.cc>
* Copyright (C) 2020-2023 Arne Schwabe <arne@rfc2549.org>
* Copyright (C) 2020-2023 OpenVPN Inc <sales@openvpn.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program (see the file COPYING included with this
* distribution); if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef DCO_LINUX_H
#define DCO_LINUX_H
#if defined(ENABLE_DCO) && defined(TARGET_LINUX)
#include "event.h"
#include "ovpn_dco_linux.h"
#include <netlink/socket.h>
#include <netlink/netlink.h>
typedef enum ovpn_key_slot dco_key_slot_t;
typedef enum ovpn_cipher_alg dco_cipher_t;
typedef struct
{
struct nl_sock *nl_sock;
struct nl_cb *nl_cb;
int status;
enum ovpn_mode ifmode;
int ovpn_dco_id;
int ovpn_dco_mcast_id;
unsigned int ifindex;
int dco_message_type;
int dco_message_peer_id;
int dco_del_peer_reason;
uint64_t dco_read_bytes;
uint64_t dco_write_bytes;
} dco_context_t;
#endif /* defined(ENABLE_DCO) && defined(TARGET_LINUX) */
#endif /* ifndef DCO_LINUX_H */
|