Reorganise so we have wrapper, unwraper and hide-eid.

unwrapper and hide-eid don't work yet, of course.
This commit is contained in:
Nick Thomas
2013-08-06 15:20:48 +01:00
parent 202b77bb57
commit 13090d3c75
9 changed files with 391 additions and 180 deletions

View File

@@ -5,6 +5,9 @@
#include <netinet/ip.h>
#include <netinet/ip6.h>
#define IPPROTO_HIDE_EID 0xfd
struct packet {
union {
#ifdef __USE_BSD
@@ -37,4 +40,9 @@ struct rsp_data {
void compute_ip_checksum( struct iphdr* pkt );
int wrap_ipv4_packet(struct rlocs* reg, struct recv_pkt* pkt, struct rsp_data* out);
int wrap_ipv6_packet(struct rlocs* reg, struct recv_pkt* pkt, struct rsp_data* out);
int unwrap_ipv4_packet(struct rlocs* reg, struct recv_pkt* pkt, struct rsp_data* out);
int unwrap_ipv6_packet(struct rlocs* reg, struct recv_pkt* pkt, struct rsp_data* out);
#endif