OpenVPN
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
Functions
Variables
Data Structures
Data Structures
Class Hierarchy
Data Fields
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
w
x
z
Typedefs
a
b
c
d
e
f
h
i
l
m
n
o
p
r
s
u
w
Enumerations
_
a
c
d
e
f
g
h
k
m
n
o
p
r
t
u
v
w
Enumerator
_
a
c
d
e
f
g
i
k
m
n
o
p
r
s
t
u
v
w
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
include
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
{
31
msg_acknowledgement
,
32
msg_add_address
,
33
msg_del_address
,
34
msg_add_route
,
35
msg_del_route
,
36
msg_add_dns_cfg
,
37
msg_del_dns_cfg
,
38
msg_add_nrpt_cfg
,
39
msg_del_nrpt_cfg
,
40
msg_add_nbt_cfg
,
41
msg_del_nbt_cfg
,
42
msg_flush_neighbors
,
43
msg_add_wfp_block
,
44
msg_del_wfp_block
,
45
msg_register_dns
,
46
msg_enable_dhcp
,
47
deprecated_msg_register_ring_buffers
,
48
msg_set_mtu
,
49
msg_add_wins_cfg
,
50
msg_del_wins_cfg
,
51
msg_create_adapter
52
}
message_type_t
;
30
typedef
enum
{
…
};
53
54
typedef
struct
{
55
message_type_t
type
;
56
size_t
size
;
57
int
message_id
;
58
}
message_header_t
;
54
typedef
struct
{
…
};
59
60
typedef
union
{
61
struct
in_addr ipv4;
62
struct
in6_addr ipv6;
63
}
inet_address_t
;
60
typedef
union
{
…
};
64
65
typedef
struct
{
66
int
index
;
67
char
name[256];
68
}
interface_t
;
65
typedef
struct
{
…
};
69
70
typedef
enum
{
71
wfp_block_local
= 1<<0,
72
wfp_block_dns
= 1<<1
73
}
wfp_block_flags_t
;
70
typedef
enum
{
…
};
74
75
typedef
struct
{
76
message_header_t
header
;
77
short
family
;
78
inet_address_t
address
;
79
int
prefix_len
;
80
interface_t
iface
;
81
}
address_message_t
;
75
typedef
struct
{
…
};
82
83
typedef
struct
{
84
message_header_t
header
;
85
short
family
;
86
inet_address_t
prefix
;
87
int
prefix_len
;
88
inet_address_t
gateway
;
89
interface_t
iface
;
90
int
metric
;
91
}
route_message_t
;
83
typedef
struct
{
…
};
92
93
typedef
struct
{
94
message_header_t
header
;
95
interface_t
iface
;
96
char
domains[512];
97
short
family
;
98
int
addr_len
;
99
inet_address_t
addr[4];
/* support up to 4 dns addresses */
100
}
dns_cfg_message_t
;
93
typedef
struct
{
…
};
101
102
103
typedef
enum
{
104
nrpt_dnssec
105
}
nrpt_flags_t
;
103
typedef
enum
{
…
};
106
107
#define NRPT_ADDR_NUM 8
/* Max. number of addresses */
108
#define NRPT_ADDR_SIZE 48
/* Max. address strlen + some */
109
typedef
char
nrpt_address_t
[
NRPT_ADDR_SIZE
];
110
typedef
struct
{
111
message_header_t
header
;
112
interface_t
iface
;
113
nrpt_address_t
addresses[
NRPT_ADDR_NUM
];
114
char
resolve_domains[512];
/* double \0 terminated */
115
char
search_domains[512];
116
nrpt_flags_t
flags
;
117
}
nrpt_dns_cfg_message_t
;
110
typedef
struct
{
…
};
118
119
typedef
struct
{
120
message_header_t
header
;
121
interface_t
iface
;
122
int
addr_len
;
123
inet_address_t
addr[4];
/* support up to 4 dns addresses */
124
}
wins_cfg_message_t
;
119
typedef
struct
{
…
};
125
126
typedef
struct
{
127
message_header_t
header
;
128
interface_t
iface
;
129
int
disable_nbt
;
130
int
nbt_type
;
131
char
scope_id[256];
132
struct
in_addr primary_nbns;
133
struct
in_addr secondary_nbns;
134
}
nbt_cfg_message_t
;
126
typedef
struct
{
…
};
135
136
/* TODO: NTP */
137
138
typedef
struct
{
139
message_header_t
header
;
140
short
family
;
141
interface_t
iface
;
142
}
flush_neighbors_message_t
;
138
typedef
struct
{
…
};
143
144
typedef
struct
{
145
message_header_t
header
;
146
int
error_number
;
147
}
ack_message_t
;
144
typedef
struct
{
…
};
148
149
typedef
struct
{
150
message_header_t
header
;
151
wfp_block_flags_t
flags
;
152
interface_t
iface
;
153
}
wfp_block_message_t
;
149
typedef
struct
{
…
};
154
155
typedef
struct
{
156
message_header_t
header
;
157
interface_t
iface
;
158
}
enable_dhcp_message_t
;
155
typedef
struct
{
…
};
159
160
typedef
struct
{
161
message_header_t
header
;
162
interface_t
iface
;
163
short
family
;
164
int
mtu
;
165
}
set_mtu_message_t
;
160
typedef
struct
{
…
};
166
167
typedef
enum
{
168
ADAPTER_TYPE_DCO
,
169
ADAPTER_TYPE_TAP
,
170
}
adapter_type_t
;
167
typedef
enum
{
…
};
171
172
typedef
struct
{
173
message_header_t
header
;
174
adapter_type_t
adapter_type
;
175
}
create_adapter_message_t
;
172
typedef
struct
{
…
};
176
177
#endif
/* ifndef OPENVPN_MSG_H_ */
nrpt_flags_t
nrpt_flags_t
Definition
openvpn-msg.h:103
nrpt_dnssec
@ nrpt_dnssec
Definition
openvpn-msg.h:104
wfp_block_flags_t
wfp_block_flags_t
Definition
openvpn-msg.h:70
wfp_block_local
@ wfp_block_local
Definition
openvpn-msg.h:71
wfp_block_dns
@ wfp_block_dns
Definition
openvpn-msg.h:72
nrpt_address_t
char nrpt_address_t[NRPT_ADDR_SIZE]
Definition
openvpn-msg.h:109
message_type_t
message_type_t
Definition
openvpn-msg.h:30
msg_add_nrpt_cfg
@ msg_add_nrpt_cfg
Definition
openvpn-msg.h:38
msg_del_address
@ msg_del_address
Definition
openvpn-msg.h:33
msg_add_wins_cfg
@ msg_add_wins_cfg
Definition
openvpn-msg.h:49
msg_add_address
@ msg_add_address
Definition
openvpn-msg.h:32
msg_del_nbt_cfg
@ msg_del_nbt_cfg
Definition
openvpn-msg.h:41
msg_del_wfp_block
@ msg_del_wfp_block
Definition
openvpn-msg.h:44
msg_enable_dhcp
@ msg_enable_dhcp
Definition
openvpn-msg.h:46
msg_add_wfp_block
@ msg_add_wfp_block
Definition
openvpn-msg.h:43
msg_add_route
@ msg_add_route
Definition
openvpn-msg.h:34
msg_add_nbt_cfg
@ msg_add_nbt_cfg
Definition
openvpn-msg.h:40
msg_create_adapter
@ msg_create_adapter
Definition
openvpn-msg.h:51
msg_del_wins_cfg
@ msg_del_wins_cfg
Definition
openvpn-msg.h:50
deprecated_msg_register_ring_buffers
@ deprecated_msg_register_ring_buffers
Definition
openvpn-msg.h:47
msg_acknowledgement
@ msg_acknowledgement
Definition
openvpn-msg.h:31
msg_add_dns_cfg
@ msg_add_dns_cfg
Definition
openvpn-msg.h:36
msg_register_dns
@ msg_register_dns
Definition
openvpn-msg.h:45
msg_del_nrpt_cfg
@ msg_del_nrpt_cfg
Definition
openvpn-msg.h:39
msg_del_route
@ msg_del_route
Definition
openvpn-msg.h:35
msg_set_mtu
@ msg_set_mtu
Definition
openvpn-msg.h:48
msg_flush_neighbors
@ msg_flush_neighbors
Definition
openvpn-msg.h:42
msg_del_dns_cfg
@ msg_del_dns_cfg
Definition
openvpn-msg.h:37
adapter_type_t
adapter_type_t
Definition
openvpn-msg.h:167
ADAPTER_TYPE_DCO
@ ADAPTER_TYPE_DCO
Definition
openvpn-msg.h:168
ADAPTER_TYPE_TAP
@ ADAPTER_TYPE_TAP
Definition
openvpn-msg.h:169
NRPT_ADDR_SIZE
#define NRPT_ADDR_SIZE
Definition
openvpn-msg.h:108
NRPT_ADDR_NUM
#define NRPT_ADDR_NUM
Definition
openvpn-msg.h:107
ack_message_t
Definition
openvpn-msg.h:144
ack_message_t::error_number
int error_number
Definition
openvpn-msg.h:146
ack_message_t::header
message_header_t header
Definition
openvpn-msg.h:145
address_message_t
Definition
openvpn-msg.h:75
address_message_t::address
inet_address_t address
Definition
openvpn-msg.h:78
address_message_t::family
short family
Definition
openvpn-msg.h:77
address_message_t::header
message_header_t header
Definition
openvpn-msg.h:76
address_message_t::prefix_len
int prefix_len
Definition
openvpn-msg.h:79
address_message_t::iface
interface_t iface
Definition
openvpn-msg.h:80
create_adapter_message_t
Definition
openvpn-msg.h:172
create_adapter_message_t::header
message_header_t header
Definition
openvpn-msg.h:173
create_adapter_message_t::adapter_type
adapter_type_t adapter_type
Definition
openvpn-msg.h:174
dns_cfg_message_t
Definition
openvpn-msg.h:93
dns_cfg_message_t::header
message_header_t header
Definition
openvpn-msg.h:94
dns_cfg_message_t::family
short family
Definition
openvpn-msg.h:97
dns_cfg_message_t::addr_len
int addr_len
Definition
openvpn-msg.h:98
dns_cfg_message_t::iface
interface_t iface
Definition
openvpn-msg.h:95
enable_dhcp_message_t
Definition
openvpn-msg.h:155
enable_dhcp_message_t::header
message_header_t header
Definition
openvpn-msg.h:156
enable_dhcp_message_t::iface
interface_t iface
Definition
openvpn-msg.h:157
flush_neighbors_message_t
Definition
openvpn-msg.h:138
flush_neighbors_message_t::family
short family
Definition
openvpn-msg.h:140
flush_neighbors_message_t::iface
interface_t iface
Definition
openvpn-msg.h:141
flush_neighbors_message_t::header
message_header_t header
Definition
openvpn-msg.h:139
interface_t
Definition
openvpn-msg.h:65
interface_t::index
int index
Definition
openvpn-msg.h:66
message_header_t
Definition
openvpn-msg.h:54
message_header_t::size
size_t size
Definition
openvpn-msg.h:56
message_header_t::message_id
int message_id
Definition
openvpn-msg.h:57
message_header_t::type
message_type_t type
Definition
openvpn-msg.h:55
nbt_cfg_message_t
Definition
openvpn-msg.h:126
nbt_cfg_message_t::header
message_header_t header
Definition
openvpn-msg.h:127
nbt_cfg_message_t::iface
interface_t iface
Definition
openvpn-msg.h:128
nbt_cfg_message_t::disable_nbt
int disable_nbt
Definition
openvpn-msg.h:129
nbt_cfg_message_t::nbt_type
int nbt_type
Definition
openvpn-msg.h:130
nrpt_dns_cfg_message_t
Definition
openvpn-msg.h:110
nrpt_dns_cfg_message_t::flags
nrpt_flags_t flags
Definition
openvpn-msg.h:116
nrpt_dns_cfg_message_t::iface
interface_t iface
Definition
openvpn-msg.h:112
nrpt_dns_cfg_message_t::header
message_header_t header
Definition
openvpn-msg.h:111
route_message_t
Definition
openvpn-msg.h:83
route_message_t::header
message_header_t header
Definition
openvpn-msg.h:84
route_message_t::family
short family
Definition
openvpn-msg.h:85
route_message_t::prefix_len
int prefix_len
Definition
openvpn-msg.h:87
route_message_t::iface
interface_t iface
Definition
openvpn-msg.h:89
route_message_t::gateway
inet_address_t gateway
Definition
openvpn-msg.h:88
route_message_t::prefix
inet_address_t prefix
Definition
openvpn-msg.h:86
route_message_t::metric
int metric
Definition
openvpn-msg.h:90
set_mtu_message_t
Definition
openvpn-msg.h:160
set_mtu_message_t::header
message_header_t header
Definition
openvpn-msg.h:161
set_mtu_message_t::mtu
int mtu
Definition
openvpn-msg.h:164
set_mtu_message_t::iface
interface_t iface
Definition
openvpn-msg.h:162
set_mtu_message_t::family
short family
Definition
openvpn-msg.h:163
wfp_block_message_t
Definition
openvpn-msg.h:149
wfp_block_message_t::flags
wfp_block_flags_t flags
Definition
openvpn-msg.h:151
wfp_block_message_t::header
message_header_t header
Definition
openvpn-msg.h:150
wfp_block_message_t::iface
interface_t iface
Definition
openvpn-msg.h:152
wins_cfg_message_t
Definition
openvpn-msg.h:119
wins_cfg_message_t::iface
interface_t iface
Definition
openvpn-msg.h:121
wins_cfg_message_t::addr_len
int addr_len
Definition
openvpn-msg.h:122
wins_cfg_message_t::header
message_header_t header
Definition
openvpn-msg.h:120
inet_address_t
Definition
openvpn-msg.h:60
Generated by
1.9.8