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
/* message type #0 is treated as magic number by process_incoming_dco() */
37
OVPN_CMD_NO_MESSAGE = 0,
38
OVPN_CMD_DEL_PEER
,
39
OVPN_CMD_PACKET,
40
OVPN_CMD_SWAP_KEYS
,
41
OVPN_CMD_FLOAT_PEER
,
42
};
43
44
enum
ovpn_del_reason_t
45
{
46
OVPN_DEL_PEER_REASON_EXPIRED
,
47
OVPN_DEL_PEER_REASON_TRANSPORT_ERROR
,
48
OVPN_DEL_PEER_REASON_USERSPACE
,
49
OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT
,
50
};
51
52
typedef
struct
dco_context
53
{
54
bool
open;
55
int
fd;
56
int
pipefd[2];
57
58
char
ifname[IFNAMSIZ];
59
60
int
dco_message_type;
61
int
dco_message_peer_id;
62
int
dco_del_peer_reason;
63
struct
sockaddr_storage dco_float_peer_ss;
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:259
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:167
OVPN_CMD_SWAP_KEYS
@ OVPN_CMD_SWAP_KEYS
Definition
ovpn_dco_win.h:166
OVPN_CMD_DEL_PEER
@ OVPN_CMD_DEL_PEER
Definition
ovpn_dco_win.h:165
context
Contains all state information for one tunnel.
Definition
openvpn.h:474
Generated by
1.9.8