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-2023 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 typedef enum {
47 
48 typedef struct {
50  size_t size;
53 
54 typedef union {
55  struct in_addr ipv4;
56  struct in6_addr ipv6;
58 
59 typedef struct {
60  int index;
61  char name[256];
62 } interface_t;
63 
64 typedef struct {
66  short family;
71 
72 typedef struct {
74  short family;
79  int metric;
81 
82 typedef struct {
85  char domains[512];
86  short family;
87  int addr_len;
88  inet_address_t addr[4]; /* support up to 4 dns addresses */
90 
91 typedef struct {
94  int addr_len;
95  inet_address_t addr[4]; /* support up to 4 dns addresses */
97 
98 typedef struct {
102  int nbt_type;
103  char scope_id[256];
104  struct in_addr primary_nbns;
105  struct in_addr secondary_nbns;
107 
108 /* TODO: NTP */
109 
110 typedef struct {
112  short family;
115 
116 typedef struct {
119 } ack_message_t;
120 
121 typedef struct {
125 
126 typedef struct {
130 
131 typedef struct {
133  HANDLE device;
139 
140 typedef struct {
143  short family;
144  int mtu;
146 
147 #endif /* ifndef OPENVPN_MSG_H_ */
ack_message_t::header
message_header_t header
Definition: openvpn-msg.h:117
enable_dhcp_message_t::iface
interface_t iface
Definition: openvpn-msg.h:128
set_mtu_message_t::mtu
int mtu
Definition: openvpn-msg.h:144
address_message_t
Definition: openvpn-msg.h:64
address_message_t::iface
interface_t iface
Definition: openvpn-msg.h:69
msg_del_dns_cfg
@ msg_del_dns_cfg
Definition: openvpn-msg.h:34
dns_cfg_message_t::family
short family
Definition: openvpn-msg.h:86
block_dns_message_t::iface
interface_t iface
Definition: openvpn-msg.h:123
msg_add_dns_cfg
@ msg_add_dns_cfg
Definition: openvpn-msg.h:33
route_message_t::metric
int metric
Definition: openvpn-msg.h:79
msg_register_dns
@ msg_register_dns
Definition: openvpn-msg.h:40
dns_cfg_message_t
Definition: openvpn-msg.h:82
dns_cfg_message_t::iface
interface_t iface
Definition: openvpn-msg.h:84
set_mtu_message_t::iface
interface_t iface
Definition: openvpn-msg.h:142
nbt_cfg_message_t::iface
interface_t iface
Definition: openvpn-msg.h:100
enable_dhcp_message_t
Definition: openvpn-msg.h:126
route_message_t::iface
interface_t iface
Definition: openvpn-msg.h:78
enable_dhcp_message_t::header
message_header_t header
Definition: openvpn-msg.h:127
register_ring_buffers_message_t::send_tail_moved
HANDLE send_tail_moved
Definition: openvpn-msg.h:136
ack_message_t
Definition: openvpn-msg.h:116
register_ring_buffers_message_t::header
message_header_t header
Definition: openvpn-msg.h:132
message_header_t
Definition: openvpn-msg.h:48
msg_set_mtu
@ msg_set_mtu
Definition: openvpn-msg.h:43
msg_register_ring_buffers
@ msg_register_ring_buffers
Definition: openvpn-msg.h:42
register_ring_buffers_message_t
Definition: openvpn-msg.h:131
msg_add_route
@ msg_add_route
Definition: openvpn-msg.h:31
set_mtu_message_t::family
short family
Definition: openvpn-msg.h:143
msg_enable_dhcp
@ msg_enable_dhcp
Definition: openvpn-msg.h:41
wins_cfg_message_t::addr_len
int addr_len
Definition: openvpn-msg.h:94
interface_t::index
int index
Definition: openvpn-msg.h:60
nbt_cfg_message_t::header
message_header_t header
Definition: openvpn-msg.h:99
route_message_t
Definition: openvpn-msg.h:72
route_message_t::prefix_len
int prefix_len
Definition: openvpn-msg.h:76
block_dns_message_t::header
message_header_t header
Definition: openvpn-msg.h:122
address_message_t::prefix_len
int prefix_len
Definition: openvpn-msg.h:68
register_ring_buffers_message_t::receive_ring_handle
HANDLE receive_ring_handle
Definition: openvpn-msg.h:135
ack_message_t::error_number
int error_number
Definition: openvpn-msg.h:118
nbt_cfg_message_t::nbt_type
int nbt_type
Definition: openvpn-msg.h:102
msg_add_block_dns
@ msg_add_block_dns
Definition: openvpn-msg.h:38
address_message_t::address
inet_address_t address
Definition: openvpn-msg.h:67
register_ring_buffers_message_t::device
HANDLE device
Definition: openvpn-msg.h:133
wins_cfg_message_t::iface
interface_t iface
Definition: openvpn-msg.h:93
msg_del_route
@ msg_del_route
Definition: openvpn-msg.h:32
route_message_t::header
message_header_t header
Definition: openvpn-msg.h:73
message_header_t::type
message_type_t type
Definition: openvpn-msg.h:49
msg_add_nbt_cfg
@ msg_add_nbt_cfg
Definition: openvpn-msg.h:35
register_ring_buffers_message_t::send_ring_handle
HANDLE send_ring_handle
Definition: openvpn-msg.h:134
wins_cfg_message_t::header
message_header_t header
Definition: openvpn-msg.h:92
route_message_t::prefix
inet_address_t prefix
Definition: openvpn-msg.h:75
msg_add_wins_cfg
@ msg_add_wins_cfg
Definition: openvpn-msg.h:44
block_dns_message_t
Definition: openvpn-msg.h:121
route_message_t::family
short family
Definition: openvpn-msg.h:74
register_ring_buffers_message_t::receive_tail_moved
HANDLE receive_tail_moved
Definition: openvpn-msg.h:137
flush_neighbors_message_t::header
message_header_t header
Definition: openvpn-msg.h:111
flush_neighbors_message_t
Definition: openvpn-msg.h:110
message_header_t::message_id
int message_id
Definition: openvpn-msg.h:51
dns_cfg_message_t::addr_len
int addr_len
Definition: openvpn-msg.h:87
msg_del_nbt_cfg
@ msg_del_nbt_cfg
Definition: openvpn-msg.h:36
set_mtu_message_t
Definition: openvpn-msg.h:140
flush_neighbors_message_t::iface
interface_t iface
Definition: openvpn-msg.h:113
address_message_t::header
message_header_t header
Definition: openvpn-msg.h:65
msg_acknowledgement
@ msg_acknowledgement
Definition: openvpn-msg.h:28
message_type_t
message_type_t
Definition: openvpn-msg.h:27
msg_del_block_dns
@ msg_del_block_dns
Definition: openvpn-msg.h:39
flush_neighbors_message_t::family
short family
Definition: openvpn-msg.h:112
msg_del_address
@ msg_del_address
Definition: openvpn-msg.h:30
msg_del_wins_cfg
@ msg_del_wins_cfg
Definition: openvpn-msg.h:45
set_mtu_message_t::header
message_header_t header
Definition: openvpn-msg.h:141
interface_t
Definition: openvpn-msg.h:59
msg_add_address
@ msg_add_address
Definition: openvpn-msg.h:29
nbt_cfg_message_t
Definition: openvpn-msg.h:98
route_message_t::gateway
inet_address_t gateway
Definition: openvpn-msg.h:77
message_header_t::size
size_t size
Definition: openvpn-msg.h:50
nbt_cfg_message_t::disable_nbt
int disable_nbt
Definition: openvpn-msg.h:101
wins_cfg_message_t
Definition: openvpn-msg.h:91
msg_flush_neighbors
@ msg_flush_neighbors
Definition: openvpn-msg.h:37
dns_cfg_message_t::header
message_header_t header
Definition: openvpn-msg.h:83
address_message_t::family
short family
Definition: openvpn-msg.h:66
inet_address_t
Definition: openvpn-msg.h:54