mirror of
https://github.com/ntop/n2n.git
synced 2024-04-21 16:31:34 +00:00
added Windows support to n2n-route tool (#1023)
* added Windows support to n2n-route tool * fixed includes * more include fixes * one more include addition * more compile fixes * wish I had a working Windows VM * fixed some more Windows compile errors * considered Windows-specific lib linkage * promised to never code OS specific tools again * removed invisible invalid characters * where to get if_idx from * retrieving interface index for route * bracket... * one more bracket... * added optional gateway parameter to user-defined routes * clarification * clarification * Windows needs special network init * adapted waiting-for-key
This commit is contained in:
+4
-3
@@ -92,8 +92,7 @@
|
||||
#include <net/if_arp.h>
|
||||
#include <net/if.h>
|
||||
#include <linux/if_tun.h>
|
||||
#include <linux/netlink.h>
|
||||
#include <linux/rtnetlink.h>
|
||||
#include <net/route.h>
|
||||
#endif /* #ifdef __linux__ */
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
@@ -108,7 +107,6 @@
|
||||
#endif
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/ip.h>
|
||||
#include <netinet/udp.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
@@ -137,6 +135,9 @@
|
||||
#include "n2n_typedefs.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h> /* for privilege check in tools/n2n-route */
|
||||
#include <lmaccess.h> /* for privilege check in tools/n2n-route */
|
||||
#include <lmapibuf.h> /* for privilege check in tools/n2n-route */
|
||||
#include <winsock2.h> /* for tcp */
|
||||
#define SHUT_RDWR SD_BOTH /* for tcp */
|
||||
#include "wintap.h"
|
||||
|
||||
Reference in New Issue
Block a user