--- gvpe/src/device-cygwin.C 2003/10/15 06:06:41 1.6 +++ gvpe/src/device-cygwin.C 2008/08/07 17:54:26 1.12 @@ -1,22 +1,34 @@ /* device-cygwin.C -- Stub for Cygwin environment - Copyright (C) 2003 Marc Lehmann + Copyright (C) 2003-2008 Marc Lehmann Copyright (C) 2002-2003 Ivo Timmermans , 2002-2003 Guus Sliepen - This program 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. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - 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 - Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + 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 3 of the License, or (at your + option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 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, see . + + Additional permission under GNU GPL version 3 section 7 + + If you modify this Program, or any covered work, by linking or + combining it with the OpenSSL project's OpenSSL library (or a modified + version of that library), containing parts covered by the terms of the + OpenSSL or SSLeay licenses, the licensors of this Program grant you + additional permission to convey the resulting work. Corresponding + Source for a non-source form of such a combination shall include the + source code for the parts of OpenSSL used as well as that of the + covered work. */ // unfortunately, there is be no way to set MAC addresses under windows, @@ -30,13 +42,14 @@ #include "config.h" -#include +#include +#include +#include #include #include #include #include #include -#include #include "conf.h" #include "util.h" @@ -102,7 +115,7 @@ else { slog (L_ERR, "WIN32 TAP: ReadFile returned error: %s", wstrerror (GetLastError ())); - exit (1); + exit (EXIT_FAILURE); } } @@ -121,6 +134,12 @@ return _("cygwin cipe/openvpn tap device"); } +const char * +tap_device::if_up () +{ + return ""; +} + tap_device::tap_device () { HKEY key, key2; @@ -142,7 +161,7 @@ { slog (L_ERR, _("WIN32 TAP: unable to read registry: %s"), wstrerror (GetLastError ())); - exit (1); + exit (EXIT_FAILURE); } for (i = 0;; i++) @@ -193,7 +212,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 +230,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 +244,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);