OpenVPN
openvpn-msg.h
Go to the documentation of this file.
1/*
2 * OpenVPN -- An application to securely tunnel IP networks
3 * over a single TCP/UDP port, with support for SSL/TLS-based
4 * session authentication and key exchange,
5 * packet encryption, packet authentication, and
6 * packet compression.
7 *
8 * Copyright (C) 2013-2025 Heiko Hund <heiko.hund@sophos.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2
12 * as published by the Free Software Foundation.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, see <https://www.gnu.org/licenses/>.
21 */
22
23#ifndef OPENVPN_MSG_H_
24#define OPENVPN_MSG_H_
25
26#include <windef.h>
27#include <ws2tcpip.h>
28
53
54typedef struct
55{
57 size_t size;
60
61typedef union
62{
63 struct in_addr ipv4;
64 struct in6_addr ipv6;
66
67typedef struct
68{
69 int index;
70 char name[256];
72
73typedef enum
74{
76 wfp_block_dns = 1 << 1
78
87
98
99typedef struct
100{
103 char domains[512];
104 short family;
106 inet_address_t addr[4]; /* support up to 4 dns addresses */
108
109
110typedef enum
111{
114
115#define NRPT_ADDR_NUM 8 /* Max. number of addresses */
116#define NRPT_ADDR_SIZE 48 /* Max. address strlen + some */
118typedef struct
119{
123 char resolve_domains[512]; /* double \0 terminated */
124 char search_domains[512];
127
128typedef struct
129{
133 inet_address_t addr[4]; /* support up to 4 dns addresses */
135
136typedef struct
137{
142 char scope_id[256];
143 struct in_addr primary_nbns;
144 struct in_addr secondary_nbns;
146
147/* TODO: NTP */
148
155
161
168
174
182
188
194
195#endif /* ifndef OPENVPN_MSG_H_ */
nrpt_flags_t
@ nrpt_dnssec
wfp_block_flags_t
Definition openvpn-msg.h:74
@ wfp_block_local
Definition openvpn-msg.h:75
@ wfp_block_dns
Definition openvpn-msg.h:76
char nrpt_address_t[NRPT_ADDR_SIZE]
message_type_t
Definition openvpn-msg.h:30
@ msg_add_nrpt_cfg
Definition openvpn-msg.h:38
@ msg_del_address
Definition openvpn-msg.h:33
@ msg_add_wins_cfg
Definition openvpn-msg.h:49
@ msg_add_address
Definition openvpn-msg.h:32
@ msg_del_nbt_cfg
Definition openvpn-msg.h:41
@ msg_del_wfp_block
Definition openvpn-msg.h:44
@ msg_enable_dhcp
Definition openvpn-msg.h:46
@ msg_add_wfp_block
Definition openvpn-msg.h:43
@ msg_add_route
Definition openvpn-msg.h:34
@ msg_add_nbt_cfg
Definition openvpn-msg.h:40
@ msg_create_adapter
Definition openvpn-msg.h:51
@ msg_del_wins_cfg
Definition openvpn-msg.h:50
@ deprecated_msg_register_ring_buffers
Definition openvpn-msg.h:47
@ msg_acknowledgement
Definition openvpn-msg.h:31
@ msg_add_dns_cfg
Definition openvpn-msg.h:36
@ msg_register_dns
Definition openvpn-msg.h:45
@ msg_del_nrpt_cfg
Definition openvpn-msg.h:39
@ msg_del_route
Definition openvpn-msg.h:35
@ msg_set_mtu
Definition openvpn-msg.h:48
@ msg_flush_neighbors
Definition openvpn-msg.h:42
@ msg_del_dns_cfg
Definition openvpn-msg.h:37
adapter_type_t
@ ADAPTER_TYPE_DCO
@ ADAPTER_TYPE_TAP
#define NRPT_ADDR_SIZE
#define NRPT_ADDR_NUM
message_header_t header
inet_address_t address
Definition openvpn-msg.h:83
message_header_t header
Definition openvpn-msg.h:81
interface_t iface
Definition openvpn-msg.h:85
message_header_t header
adapter_type_t adapter_type
message_header_t header
interface_t iface
message_header_t header
message_header_t header
message_type_t type
Definition openvpn-msg.h:56
message_header_t header
interface_t iface
message_header_t header
message_header_t header
Definition openvpn-msg.h:90
interface_t iface
Definition openvpn-msg.h:95
inet_address_t gateway
Definition openvpn-msg.h:94
inet_address_t prefix
Definition openvpn-msg.h:92
message_header_t header
interface_t iface
wfp_block_flags_t flags
message_header_t header
interface_t iface
message_header_t header