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-2024 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, write to the Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22  */
23 
24 #ifndef OPENVPN_MSG_H_
25 #define OPENVPN_MSG_H_
26 
27 #include <windef.h>
28 #include <ws2tcpip.h>
29 
30 typedef enum {
50 
51 typedef struct {
53  size_t size;
56 
57 typedef union {
58  struct in_addr ipv4;
59  struct in6_addr ipv6;
61 
62 typedef struct {
63  int index;
64  char name[256];
65 } interface_t;
66 
67 typedef enum {
71 
72 typedef struct {
74  short family;
79 
80 typedef struct {
82  short family;
87  int metric;
89 
90 typedef struct {
93  char domains[512];
94  short family;
95  int addr_len;
96  inet_address_t addr[4]; /* support up to 4 dns addresses */
98 
99 typedef struct {
102  int addr_len;
103  inet_address_t addr[4]; /* support up to 4 dns addresses */
105 
106 typedef struct {
110  int nbt_type;
111  char scope_id[256];
112  struct in_addr primary_nbns;
113  struct in_addr secondary_nbns;
115 
116 /* TODO: NTP */
117 
118 typedef struct {
120  short family;
123 
124 typedef struct {
127 } ack_message_t;
128 
129 typedef struct {
134 
135 typedef struct {
139 
140 typedef struct {
142  HANDLE device;
148 
149 typedef struct {
152  short family;
153  int mtu;
155 
156 #endif /* ifndef OPENVPN_MSG_H_ */
ack_message_t::header
message_header_t header
Definition: openvpn-msg.h:125
enable_dhcp_message_t::iface
interface_t iface
Definition: openvpn-msg.h:137
set_mtu_message_t::mtu
int mtu
Definition: openvpn-msg.h:153
address_message_t
Definition: openvpn-msg.h:72
address_message_t::iface
interface_t iface
Definition: openvpn-msg.h:77
msg_del_dns_cfg
@ msg_del_dns_cfg
Definition: openvpn-msg.h:37
dns_cfg_message_t::family
short family
Definition: openvpn-msg.h:94
wfp_block_message_t::flags
wfp_block_flags_t flags
Definition: openvpn-msg.h:131
msg_add_dns_cfg
@ msg_add_dns_cfg
Definition: openvpn-msg.h:36
route_message_t::metric
int metric
Definition: openvpn-msg.h:87
msg_register_dns
@ msg_register_dns
Definition: openvpn-msg.h:43
dns_cfg_message_t
Definition: openvpn-msg.h:90
dns_cfg_message_t::iface
interface_t iface
Definition: openvpn-msg.h:92
set_mtu_message_t::iface
interface_t iface
Definition: openvpn-msg.h:151
nbt_cfg_message_t::iface
interface_t iface
Definition: openvpn-msg.h:108
enable_dhcp_message_t
Definition: openvpn-msg.h:135
route_message_t::iface
interface_t iface
Definition: openvpn-msg.h:86
enable_dhcp_message_t::header
message_header_t header
Definition: openvpn-msg.h:136
register_ring_buffers_message_t::send_tail_moved
HANDLE send_tail_moved
Definition: openvpn-msg.h:145
ack_message_t
Definition: openvpn-msg.h:124
register_ring_buffers_message_t::header
message_header_t header
Definition: openvpn-msg.h:141
message_header_t
Definition: openvpn-msg.h:51
msg_set_mtu
@ msg_set_mtu
Definition: openvpn-msg.h:46
msg_register_ring_buffers
@ msg_register_ring_buffers
Definition: openvpn-msg.h:45
register_ring_buffers_message_t
Definition: openvpn-msg.h:140
msg_add_route
@ msg_add_route
Definition: openvpn-msg.h:34
set_mtu_message_t::family
short family
Definition: openvpn-msg.h:152
msg_enable_dhcp
@ msg_enable_dhcp
Definition: openvpn-msg.h:44
wins_cfg_message_t::addr_len
int addr_len
Definition: openvpn-msg.h:102
interface_t::index
int index
Definition: openvpn-msg.h:63
nbt_cfg_message_t::header
message_header_t header
Definition: openvpn-msg.h:107
route_message_t
Definition: openvpn-msg.h:80
wfp_block_dns
@ wfp_block_dns
Definition: openvpn-msg.h:69
route_message_t::prefix_len
int prefix_len
Definition: openvpn-msg.h:84
address_message_t::prefix_len
int prefix_len
Definition: openvpn-msg.h:76
register_ring_buffers_message_t::receive_ring_handle
HANDLE receive_ring_handle
Definition: openvpn-msg.h:144
ack_message_t::error_number
int error_number
Definition: openvpn-msg.h:126
nbt_cfg_message_t::nbt_type
int nbt_type
Definition: openvpn-msg.h:110
wfp_block_local
@ wfp_block_local
Definition: openvpn-msg.h:68
address_message_t::address
inet_address_t address
Definition: openvpn-msg.h:75
register_ring_buffers_message_t::device
HANDLE device
Definition: openvpn-msg.h:142
wins_cfg_message_t::iface
interface_t iface
Definition: openvpn-msg.h:101
msg_del_route
@ msg_del_route
Definition: openvpn-msg.h:35
route_message_t::header
message_header_t header
Definition: openvpn-msg.h:81
message_header_t::type
message_type_t type
Definition: openvpn-msg.h:52
wfp_block_flags_t
wfp_block_flags_t
Definition: openvpn-msg.h:67
msg_add_nbt_cfg
@ msg_add_nbt_cfg
Definition: openvpn-msg.h:38
wfp_block_message_t
Definition: openvpn-msg.h:129
register_ring_buffers_message_t::send_ring_handle
HANDLE send_ring_handle
Definition: openvpn-msg.h:143
wins_cfg_message_t::header
message_header_t header
Definition: openvpn-msg.h:100
route_message_t::prefix
inet_address_t prefix
Definition: openvpn-msg.h:83
msg_del_wfp_block
@ msg_del_wfp_block
Definition: openvpn-msg.h:42
msg_add_wins_cfg
@ msg_add_wins_cfg
Definition: openvpn-msg.h:47
route_message_t::family
short family
Definition: openvpn-msg.h:82
register_ring_buffers_message_t::receive_tail_moved
HANDLE receive_tail_moved
Definition: openvpn-msg.h:146
flush_neighbors_message_t::header
message_header_t header
Definition: openvpn-msg.h:119
flush_neighbors_message_t
Definition: openvpn-msg.h:118
message_header_t::message_id
int message_id
Definition: openvpn-msg.h:54
dns_cfg_message_t::addr_len
int addr_len
Definition: openvpn-msg.h:95
msg_del_nbt_cfg
@ msg_del_nbt_cfg
Definition: openvpn-msg.h:39
set_mtu_message_t
Definition: openvpn-msg.h:149
flush_neighbors_message_t::iface
interface_t iface
Definition: openvpn-msg.h:121
address_message_t::header
message_header_t header
Definition: openvpn-msg.h:73
msg_acknowledgement
@ msg_acknowledgement
Definition: openvpn-msg.h:31
message_type_t
message_type_t
Definition: openvpn-msg.h:30
flush_neighbors_message_t::family
short family
Definition: openvpn-msg.h:120
wfp_block_message_t::header
message_header_t header
Definition: openvpn-msg.h:130
msg_del_address
@ msg_del_address
Definition: openvpn-msg.h:33
msg_del_wins_cfg
@ msg_del_wins_cfg
Definition: openvpn-msg.h:48
set_mtu_message_t::header
message_header_t header
Definition: openvpn-msg.h:150
interface_t
Definition: openvpn-msg.h:62
msg_add_address
@ msg_add_address
Definition: openvpn-msg.h:32
wfp_block_message_t::iface
interface_t iface
Definition: openvpn-msg.h:132
msg_add_wfp_block
@ msg_add_wfp_block
Definition: openvpn-msg.h:41
nbt_cfg_message_t
Definition: openvpn-msg.h:106
route_message_t::gateway
inet_address_t gateway
Definition: openvpn-msg.h:85
message_header_t::size
size_t size
Definition: openvpn-msg.h:53
nbt_cfg_message_t::disable_nbt
int disable_nbt
Definition: openvpn-msg.h:109
wins_cfg_message_t
Definition: openvpn-msg.h:99
msg_flush_neighbors
@ msg_flush_neighbors
Definition: openvpn-msg.h:40
dns_cfg_message_t::header
message_header_t header
Definition: openvpn-msg.h:91
address_message_t::family
short family
Definition: openvpn-msg.h:74
inet_address_t
Definition: openvpn-msg.h:57