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, write to the Free Software Foundation, Inc.,
18 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef DCO_FREEBSD_H
21#define DCO_FREEBSD_H
22
23#if defined(ENABLE_DCO) && defined(TARGET_FREEBSD)
24
25#include "buffer.h"
26#include "event.h"
27
28#include "ovpn_dco_freebsd.h"
29
30#define DCO_IROUTE_METRIC 100
31
32typedef enum ovpn_key_slot dco_key_slot_t;
33typedef enum ovpn_key_cipher dco_cipher_t;
34
35enum ovpn_message_type_t {
37 OVPN_CMD_PACKET,
39};
40
41enum ovpn_del_reason_t {
46};
47
48typedef struct dco_context {
49 bool open;
50 int fd;
51 int pipefd[2];
52
53 char ifname[IFNAMSIZ];
54
55 int dco_message_type;
56 int dco_message_peer_id;
57 int dco_del_peer_reason;
58 uint64_t dco_read_bytes;
59 uint64_t dco_write_bytes;
61
62#endif /* defined(ENABLE_DCO) && defined(TARGET_FREEBSD) */
63#endif /* ifndef DCO_FREEBSD_H */
void * dco_context_t
Definition dco.h:267
ovpn_key_cipher
ovpn_key_slot
@ OVPN_CMD_SWAP_KEYS
@ OVPN_CMD_DEL_PEER
@OVPN_CMD_DEL_PEER: Remove peer from internal table
@ OVPN_DEL_PEER_REASON_EXPIRED
@ OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT
@ OVPN_DEL_PEER_REASON_TRANSPORT_ERROR
@ OVPN_DEL_PEER_REASON_USERSPACE