Diff for /qemu/tap-win32.c between versions 1.1.1.4 and 1.1.1.5

version 1.1.1.4, 2018/04/24 16:47:07 version 1.1.1.5, 2018/04/24 16:50:21
Line 24 Line 24
  *  You should have received a copy of the GNU General Public License   *  You should have received a copy of the GNU General Public License
  *  along with this program (see the file COPYING included with this   *  along with this program (see the file COPYING included with this
  *  distribution); if not, write to the Free Software Foundation, Inc.,   *  distribution); if not, write to the Free Software Foundation, Inc.,
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA   *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */   */
 #include "qemu-common.h"  #include "qemu-common.h"
 #include "net.h"  #include "net.h"
Line 77 Line 77
 // Compile time configuration  // Compile time configuration
 //======================  //======================
   
 //#define DEBUG_TAP_WIN32 1  //#define DEBUG_TAP_WIN32
   
 #define TUN_ASYNCHRONOUS_WRITES 1  #define TUN_ASYNCHRONOUS_WRITES 1
   
Line 509  static DWORD WINAPI tap_win32_thread_ent Line 509  static DWORD WINAPI tap_win32_thread_ent
                 result = GetOverlappedResult( overlapped->handle, &overlapped->read_overlapped,                  result = GetOverlappedResult( overlapped->handle, &overlapped->read_overlapped,
                                               &read_size, FALSE);                                                &read_size, FALSE);
                 if (!result) {                  if (!result) {
 #if DEBUG_TAP_WIN32  #ifdef DEBUG_TAP_WIN32
                     LPVOID lpBuffer;                      LPVOID lpBuffer;
                     dwError = GetLastError();                      dwError = GetLastError();
                     FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,                      FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
Line 520  static DWORD WINAPI tap_win32_thread_ent Line 520  static DWORD WINAPI tap_win32_thread_ent
 #endif  #endif
                 }                  }
             } else {              } else {
 #if DEBUG_TAP_WIN32  #ifdef DEBUG_TAP_WIN32
                 LPVOID lpBuffer;                  LPVOID lpBuffer;
                 FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,                  FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
                                NULL, dwError, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),                                 NULL, dwError, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
Line 660  static void tap_win32_send(void *opaque) Line 660  static void tap_win32_send(void *opaque)
     }      }
 }  }
   
 int tap_win32_init(VLANState *vlan, const char *ifname)  int tap_win32_init(VLANState *vlan, const char *model,
                      const char *name, const char *ifname)
 {  {
     TAPState *s;      TAPState *s;
   
Line 672  int tap_win32_init(VLANState *vlan, cons Line 673  int tap_win32_init(VLANState *vlan, cons
         return -1;          return -1;
     }      }
   
     s->vc = qemu_new_vlan_client(vlan, tap_receive, NULL, s);      s->vc = qemu_new_vlan_client(vlan, model, name, tap_receive, NULL, s);
   
     snprintf(s->vc->info_str, sizeof(s->vc->info_str),      snprintf(s->vc->info_str, sizeof(s->vc->info_str),
              "tap: ifname=%s", ifname);               "tap: ifname=%s", ifname);

Removed from v.1.1.1.4  
changed lines
  Added in v.1.1.1.5


unix.superglobalmegacorp.com