OpenVPN
src
openvpn
dco_freebsd.h
Go to the documentation of this file.
1
/*
2
* Interface to FreeBSD dco networking code
3
*
4
* Copyright (C) 2022 Rubicon Communications, LLC (Netgate). All Rights Reserved.
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2
8
* as published by the Free Software Foundation.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program (see the file COPYING included with this
17
* distribution); if not, see <https://www.gnu.org/licenses/>.
18
*/
19
#ifndef DCO_FREEBSD_H
20
#define DCO_FREEBSD_H
21
22
#if defined(ENABLE_DCO) && defined(TARGET_FREEBSD)
23
24
#include "
buffer.h
"
25
#include "
event.h
"
26
27
#include "
ovpn_dco_freebsd.h
"
28
29
#define DCO_IROUTE_METRIC 100
30
31
typedef
enum
ovpn_key_slot
dco_key_slot_t;
32
typedef
enum
ovpn_key_cipher
dco_cipher_t;
33
34
enum
ovpn_message_type_t
35
{
36
OVPN_CMD_DEL_PEER
,
37
OVPN_CMD_PACKET,
38
OVPN_CMD_SWAP_KEYS
,
39
OVPN_CMD_FLOAT_PEER
,
40
};
41
42
enum
ovpn_del_reason_t
43
{
44
OVPN_DEL_PEER_REASON_EXPIRED
,
45
OVPN_DEL_PEER_REASON_TRANSPORT_ERROR
,
46
OVPN_DEL_PEER_REASON_USERSPACE
,
47
OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT
,
48
};
49
50
typedef
struct
dco_context
51
{
52
bool
open;
53
int
fd;
54
int
pipefd[2];
55
56
char
ifname[IFNAMSIZ];
57
58
int
dco_message_type;
59
int
dco_message_peer_id;
60
int
dco_del_peer_reason;
61
struct
sockaddr_storage dco_float_peer_ss;
62
uint64_t dco_read_bytes;
63
uint64_t dco_write_bytes;
64
65
struct
context
*c;
66
}
dco_context_t
;
67
68
#endif
/* defined(ENABLE_DCO) && defined(TARGET_FREEBSD) */
69
#endif
/* ifndef DCO_FREEBSD_H */
buffer.h
dco_context_t
void * dco_context_t
Definition
dco.h:261
event.h
ovpn_dco_freebsd.h
ovpn_key_cipher
ovpn_key_cipher
Definition
ovpn_dco_freebsd.h:57
ovpn_key_slot
ovpn_key_slot
Definition
ovpn_dco_freebsd.h:51
OVPN_DEL_PEER_REASON_EXPIRED
@ OVPN_DEL_PEER_REASON_EXPIRED
Definition
ovpn_dco_linux.h:23
OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT
@ OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT
Definition
ovpn_dco_linux.h:25
OVPN_DEL_PEER_REASON_TRANSPORT_ERROR
@ OVPN_DEL_PEER_REASON_TRANSPORT_ERROR
Definition
ovpn_dco_linux.h:24
OVPN_DEL_PEER_REASON_USERSPACE
@ OVPN_DEL_PEER_REASON_USERSPACE
Definition
ovpn_dco_linux.h:22
OVPN_CMD_FLOAT_PEER
@ OVPN_CMD_FLOAT_PEER
Definition
ovpn_dco_win.h:160
OVPN_CMD_SWAP_KEYS
@ OVPN_CMD_SWAP_KEYS
Definition
ovpn_dco_win.h:159
OVPN_CMD_DEL_PEER
@ OVPN_CMD_DEL_PEER
Definition
ovpn_dco_win.h:158
context
Contains all state information for one tunnel.
Definition
openvpn.h:474
Generated by
1.9.8