summaryrefslogtreecommitdiffstats
path: root/proto.h
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-06-11 08:45:09 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-06-11 08:45:09 +0000
commit90efcacba6378a4e29275cd6e9914d73d836a4a4 (patch)
treeda032ba71582994f9e1f2ed7162ba14f152cb7d7 /proto.h
parent4d84de11b1fdd795b00086f1901787de358c9230 (diff)
downloadopenvpn-90efcacba6378a4e29275cd6e9914d73d836a4a4.tar.gz
openvpn-90efcacba6378a4e29275cd6e9914d73d836a4a4.tar.xz
openvpn-90efcacba6378a4e29275cd6e9914d73d836a4a4.zip
Updated version to 2.1_rc7e.
Added client authentication and packet filtering capability to management interface. Extended packet filtering capability to work on both --dev tun and --dev tap tunnels. Updated valgrind-suppress file. Made "Linux ip addr del failed" error nonfatal. Amplified --client-cert-not-required warning. Added #pragma pack to proto.h. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2991 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/proto.h b/proto.h
index 77d9c0d..2be24ef 100644
--- a/proto.h
+++ b/proto.h
@@ -28,6 +28,8 @@
#include "common.h"
#include "buffer.h"
+#pragma pack(1)
+
/*
* Tunnel types
*/
@@ -62,6 +64,24 @@ struct openvpn_ethhdr
uint16_t proto; /* packet type ID field */
};
+struct openvpn_arp {
+# define ARP_MAC_ADDR_TYPE 0x0001
+ uint16_t mac_addr_type; // 0x0001
+
+ uint16_t proto_addr_type; // 0x0800
+ uint8_t mac_addr_size; // 0x06
+ uint8_t proto_addr_size; // 0x04
+
+# define ARP_REQUEST 0x0001
+# define ARP_REPLY 0x0002
+ uint16_t arp_command; // 0x0001 for ARP request, 0x0002 for ARP reply
+
+ uint8_t mac_src[OPENVPN_ETH_ALEN];
+ in_addr_t ip_src;
+ uint8_t mac_dest[OPENVPN_ETH_ALEN];
+ in_addr_t ip_dest;
+};
+
struct openvpn_iphdr {
# define OPENVPN_IPH_GET_VER(v) (((v) >> 4) & 0x0F)
# define OPENVPN_IPH_GET_LEN(v) (((v) & 0x0F) << 2)
@@ -129,6 +149,8 @@ struct openvpn_tcphdr {
#define OPENVPN_TCPOPT_MAXSEG 2
#define OPENVPN_TCPOLEN_MAXSEG 4
+#pragma pack()
+
/*
* The following macro is used to update an
* internet checksum. "acc" is a 32-bit