
We're a bit closer to something sane, now. We can wrap, but not unwrap, packets. Asymmetric encryption is *big*. encrypted text with a 4096-bit RSA public key is 512 bytes. We can't fragment yet. Fortunately, this isn't an infinite regress once we *can* fragment. Performance is still a big question mark, of course. There may still be endianness issues hanging around. The eid<->rloc map is almost certainly far, far too slow to be of any use in the real world.
22 lines
505 B
C
22 lines
505 B
C
#ifndef _UTIL_H_
|
|
#define _UTIL_H
|
|
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
#include <netinet/ip.h>
|
|
|
|
#define info(msg, ...) { fprintf( stdout, msg, ##__VA_ARGS__ ) ; fprintf( stdout, "\n" ); }
|
|
#define warn(msg, ...) { fprintf( stderr, msg, ##__VA_ARGS__ ) ; fprintf( stderr, "\n" ); }
|
|
|
|
#define IPPROTO_HIDE_EID 0xfd
|
|
|
|
void* xmalloc( size_t bytes );
|
|
int create_tun( const char* name );
|
|
void compute_ip_checksum( struct iphdr* pkt );
|
|
|
|
|
|
int link_set_up( char *link_name, int state );
|
|
|
|
#endif |