--- gvpe/src/device-cygwin.C 2004/01/17 01:18:36 1.7 +++ gvpe/src/device-cygwin.C 2005/03/23 21:55:39 1.10 @@ -1,10 +1,12 @@ /* device-cygwin.C -- Stub for Cygwin environment - Copyright (C) 2003-2004 Marc Lehmann + Copyright (C) 2003-2005 Marc Lehmann Copyright (C) 2002-2003 Ivo Timmermans , 2002-2003 Guus Sliepen - This program is free software; you can redistribute it and/or modify + This file is part of GVPE. + + GVPE is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -15,7 +17,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software + along with gvpe; if not, write to the Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -30,13 +32,14 @@ #include "config.h" -#include +#include +#include +#include #include #include #include #include #include -#include #include "conf.h" #include "util.h" @@ -102,7 +105,7 @@ else { slog (L_ERR, "WIN32 TAP: ReadFile returned error: %s", wstrerror (GetLastError ())); - exit (1); + exit (EXIT_FAILURE); } } @@ -121,6 +124,12 @@ return _("cygwin cipe/openvpn tap device"); } +const char * +tap_device::if_up () +{ + return ""; +} + tap_device::tap_device () { HKEY key, key2; @@ -142,7 +151,7 @@ { slog (L_ERR, _("WIN32 TAP: unable to read registry: %s"), wstrerror (GetLastError ())); - exit (1); + exit (EXIT_FAILURE); } for (i = 0;; i++) @@ -193,7 +202,7 @@ if (!found) { slog (L_ERR, _("WIN32 TAP: no windows tap device found!")); - exit (1); + exit (EXIT_FAILURE); } /* Try to open the corresponding tap device */ @@ -211,7 +220,7 @@ { slog (L_ERR, _("WIN32 TAP: %s is not a usable windows tap device %s: %s"), adaptername, tapname, wstrerror (GetLastError ())); - exit (1); + exit (EXIT_FAILURE); } strcpy (ifrname, (char *)tapname); @@ -225,7 +234,7 @@ slog (L_ERR, _("WIN32 TAP: could not get MAC address from windows tap device %s: %s"), adaptername, wstrerror (GetLastError ())); - exit (1); + exit (EXIT_FAILURE); } pipe (iopipe);