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,16 +5,26 @@
#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 );
int link_set_up( char *link_name, int state );
/* Our programs use this common struct to take advantage of common init code */
struct session {
struct rlocs *rlocs;
int listen_if;
int output_if;
int same_if;
};
int session_setup( struct session *session, char *config_file, char *listen_if, char *output_if );
void session_teardown( struct session *session );
#endif