summaryrefslogtreecommitdiff
path: root/include/openvpn-msg.h
diff options
context:
space:
mode:
authorAlberto Gonzalez Iniesta <agi@inittab.org>2016-12-27 18:25:47 +0100
committerAlberto Gonzalez Iniesta <agi@inittab.org>2016-12-27 18:25:47 +0100
commit79f3537f69e125f19f59c36aa090120a63186a54 (patch)
tree2089a3b7dac990841dbc2e4d9b2f535b82dbb0af /include/openvpn-msg.h
parentf2137fedb30cb87448eb03b2f288920df6187571 (diff)
parent3a2bbdb05ca6a6996e424c9fb225cb0d53804125 (diff)
Merge tag 'upstream/2.4.0'
Upstream version 2.4.0
Diffstat (limited to 'include/openvpn-msg.h')
-rw-r--r--include/openvpn-msg.h110
1 files changed, 55 insertions, 55 deletions
diff --git a/include/openvpn-msg.h b/include/openvpn-msg.h
index f7fbdd2..5f3c96c 100644
--- a/include/openvpn-msg.h
+++ b/include/openvpn-msg.h
@@ -5,7 +5,7 @@
* packet encryption, packet authentication, and
* packet compression.
*
- * Copyright (C) 2013 Heiko Hund <heiko.hund@sophos.com>
+ * Copyright (C) 2013-2017 Heiko Hund <heiko.hund@sophos.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
@@ -26,90 +26,90 @@
#define OPENVPN_MSG_H_
typedef enum {
- msg_acknowledgement,
- msg_add_address,
- msg_del_address,
- msg_add_route,
- msg_del_route,
- msg_add_dns_cfg,
- msg_del_dns_cfg,
- msg_add_nbt_cfg,
- msg_del_nbt_cfg,
- msg_flush_neighbors,
- msg_add_block_dns,
- msg_del_block_dns,
- msg_register_dns
+ msg_acknowledgement,
+ msg_add_address,
+ msg_del_address,
+ msg_add_route,
+ msg_del_route,
+ msg_add_dns_cfg,
+ msg_del_dns_cfg,
+ msg_add_nbt_cfg,
+ msg_del_nbt_cfg,
+ msg_flush_neighbors,
+ msg_add_block_dns,
+ msg_del_block_dns,
+ msg_register_dns
} message_type_t;
typedef struct {
- message_type_t type;
- size_t size;
- int message_id;
+ message_type_t type;
+ size_t size;
+ int message_id;
} message_header_t;
typedef union {
- struct in_addr ipv4;
- struct in6_addr ipv6;
+ struct in_addr ipv4;
+ struct in6_addr ipv6;
} inet_address_t;
typedef struct {
- int index;
- char name[256];
+ int index;
+ char name[256];
} interface_t;
typedef struct {
- message_header_t header;
- short family;
- inet_address_t address;
- int prefix_len;
- interface_t iface;
+ message_header_t header;
+ short family;
+ inet_address_t address;
+ int prefix_len;
+ interface_t iface;
} address_message_t;
typedef struct {
- message_header_t header;
- short family;
- inet_address_t prefix;
- int prefix_len;
- inet_address_t gateway;
- interface_t iface;
- int metric;
+ message_header_t header;
+ short family;
+ inet_address_t prefix;
+ int prefix_len;
+ inet_address_t gateway;
+ interface_t iface;
+ int metric;
} route_message_t;
typedef struct {
- message_header_t header;
- interface_t iface;
- char domains[512];
- short family;
- int addr_len;
- inet_address_t addr[4]; /* support up to 4 dns addresses */
+ message_header_t header;
+ interface_t iface;
+ char domains[512];
+ short family;
+ int addr_len;
+ inet_address_t addr[4]; /* support up to 4 dns addresses */
} dns_cfg_message_t;
typedef struct {
- message_header_t header;
- interface_t iface;
- int disable_nbt;
- int nbt_type;
- char scope_id[256];
- struct in_addr primary_nbns;
- struct in_addr secondary_nbns;
+ message_header_t header;
+ interface_t iface;
+ int disable_nbt;
+ int nbt_type;
+ char scope_id[256];
+ struct in_addr primary_nbns;
+ struct in_addr secondary_nbns;
} nbt_cfg_message_t;
-// TODO: NTP
+/* TODO: NTP */
typedef struct {
- message_header_t header;
- short family;
- interface_t iface;
+ message_header_t header;
+ short family;
+ interface_t iface;
} flush_neighbors_message_t;
typedef struct {
- message_header_t header;
- int error_number;
+ message_header_t header;
+ int error_number;
} ack_message_t;
typedef struct {
- message_header_t header;
- interface_t iface;
+ message_header_t header;
+ interface_t iface;
} block_dns_message_t;
-#endif
+#endif /* ifndef OPENVPN_MSG_H_ */