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
31typedef enum ovpn_key_slot dco_key_slot_t;
32typedef enum ovpn_key_cipher dco_cipher_t;
33
34enum ovpn_message_type_t
35{
37 OVPN_CMD_PACKET,
40};
41
42enum ovpn_del_reason_t
43{
48};
49
50typedef 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;
67
68#endif /* defined(ENABLE_DCO) && defined(TARGET_FREEBSD) */
69#endif /* ifndef DCO_FREEBSD_H */
void * dco_context_t
Definition dco.h:261
ovpn_key_cipher
ovpn_key_slot
@ OVPN_DEL_PEER_REASON_EXPIRED
@ OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT
@ OVPN_DEL_PEER_REASON_TRANSPORT_ERROR
@ OVPN_DEL_PEER_REASON_USERSPACE
@ OVPN_CMD_FLOAT_PEER
@ OVPN_CMD_SWAP_KEYS
@ OVPN_CMD_DEL_PEER
Contains all state information for one tunnel.
Definition openvpn.h:474