X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/tripe/blobdiff_plain/d360f042becf2ccaf3d242f793ae88df778207b0..3707586241f0c48d3c38987250d58a8cb7c62459:/tripe.h diff --git a/tripe.h b/tripe.h index 420a6fdf..069840e7 100644 --- a/tripe.h +++ b/tripe.h @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: tripe.h,v 1.11 2002/01/13 14:57:42 mdw Exp $ + * $Id: tripe.h,v 1.12 2003/04/06 10:25:17 mdw Exp $ * * Main header file for TrIPE * @@ -29,6 +29,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: tripe.h,v $ + * Revision 1.12 2003/04/06 10:25:17 mdw + * Support Linux TUN/TAP device. Fix some bugs. + * * Revision 1.11 2002/01/13 14:57:42 mdw * Fix crap typo. * @@ -101,6 +104,11 @@ #include #include +#if TUN_TYPE == TUN_LINUX +# include +# include +#endif + #include #include @@ -147,6 +155,7 @@ #define TUN_NOTDEF 0 #define TUN_UNET 1 #define TUN_BSD 2 +#define TUN_LINUX 3 /* --- Trace flags --- */ @@ -376,9 +385,13 @@ enum { */ typedef struct tunnel { -#if TUN_TYPE == TUN_UNET +#if TUN_TYPE == TUN_UNET sel_file f; /* Selector for Usernet device */ struct peer *p; /* Pointer to my peer */ +#elif TUN_TYPE == TUN_LINUX + sel_file f; /* Selector for TUN/TAP device */ + struct peer *p; /* Pointer to my peer */ + char ifn[IFNAMSIZ]; /* Interface name buffer */ #elif TUN_TYPE == TUN_BSD sel_file f; /* Selector for tunnel device */ struct peer *p; /* Pointer to my peer */