Use the best network interface to route an ip instead of the first interface in getLocalInterfaces on Windows.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6469 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2013-07-01 15:12:06 +00:00
parent 81874da2cc
commit af5c31a4f5
4 changed files with 57 additions and 16 deletions

View file

@ -45,6 +45,19 @@
// For win32 systems (tested on MingW+Ubuntu)
#define stat64 _stati64
// Should be in Iphlpapi.h, but mingw doesn't seem to have these
// Values copied directly from:
// http://msdn.microsoft.com/en-us/library/aa366845(v=vs.85).aspx
// (Title: MIB_IPADDRROW structure)
#ifndef MIB_IPADDR_DISCONNECTED
#define MIB_IPADDR_DISCONNECTED 0x0008 // Address is on disconnected interface
#endif
#ifndef MIB_IPADDR_DELETED
#define MIB_IPADDR_DELETED 0x0040 // Address is being deleted
#endif
#endif // WINDOWS_SYS
#endif // RSWIN_H_