Skip to content

Commit

Permalink
Fix adapter name length in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuele-f committed Jun 30, 2019
1 parent 69e1d50 commit 6d38d4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 5 additions & 1 deletion n2n.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,12 @@ typedef struct ether_hdr ether_hdr_t;
#include "n2n_wire.h"
#include "n2n_transforms.h"

/* N2N_IFNAMSIZ is needed on win32 even if dev_name is not used after declaration */
#ifdef WIN32
#define N2N_IFNAMSIZ 64
#else
#define N2N_IFNAMSIZ 16 /* 15 chars * NULL */
#endif

#ifndef WIN32
typedef struct tuntap_dev {
int fd;
Expand Down
3 changes: 0 additions & 3 deletions win32/wintap.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
#include "../n2n.h"
#include "n2n_win32.h"

/* 1500 bytes payload + 14 bytes ethernet header + 4 bytes VLAN tag */
#define MTU 1518

void initWin32() {
WSADATA wsaData;
int err;
Expand Down

0 comments on commit 6d38d4b

Please sign in to comment.