Files
hide-eid/pass-1/util.h
Nick Thomas 13090d3c75 Reorganise so we have wrapper, unwraper and hide-eid.
unwrapper and hide-eid don't work yet, of course.
2013-08-06 15:20:48 +01:00

30 lines
736 B
C

#ifndef _UTIL_H_
#define _UTIL_H
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#define info(msg, ...) { fprintf( stdout, msg, ##__VA_ARGS__ ) ; fprintf( stdout, "\n" ); }
#define warn(msg, ...) { fprintf( stderr, msg, ##__VA_ARGS__ ) ; fprintf( stderr, "\n" ); }
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