mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-06 08:05:18 -04:00
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:
parent
81874da2cc
commit
af5c31a4f5
4 changed files with 57 additions and 16 deletions
|
@ -101,8 +101,8 @@ int sockaddr_cmp(struct sockaddr_in &addr1, struct sockaddr_in &addr2 );
|
|||
int inaddr_cmp(struct sockaddr_in addr1, struct sockaddr_in addr2 );
|
||||
int inaddr_cmp(struct sockaddr_in addr1, unsigned long);
|
||||
|
||||
bool getPreferredInterface(struct in_addr &prefAddr); // returns best addr.
|
||||
bool getLocalInterfaces(std::list<struct in_addr> &addrs); // returns all possible addrs.
|
||||
bool getPreferredInterface(struct in_addr &routeAddr, struct in_addr &prefAddr); // returns best addr.
|
||||
bool getLocalInterfaces(in_addr &routeAddr, std::list<struct in_addr> &addrs); // returns all possible addrs.
|
||||
|
||||
// checks (addr1 & 255.255.255.0) == (addr2 & 255.255.255.0)
|
||||
bool isSameSubnet(struct in_addr *addr1, struct in_addr *addr2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue