Massive commit - changing from sockaddr_in => sockaddr_storage.

In preparation for making RS support IPv6.

NB: This breaks the build of retroshare-gui, as the
sockaddr_storage_xxx fns are only defined as prototypes for now.

All the aux libraries like udp / stun / tcponudp / dht have still to be converted.

These changes will probably break various things and need to be tested thoroughly.




git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@6735 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2013-09-13 14:35:19 +00:00
parent fd071161bf
commit 6290d8fed9
66 changed files with 1182 additions and 1046 deletions

View file

@ -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 &routeAddr, struct in_addr &prefAddr); // returns best addr.
bool getLocalInterfaces(in_addr &routeAddr, std::list<struct in_addr> &addrs); // returns all possible addrs.
bool getPreferredInterface(struct sockaddr_storage &existAddr, struct sockaddr_storage &prefAddr); // returns best addr.
bool getLocalInterfaces(struct sockaddr_storage &existAddr, std::list<struct sockaddr_storage> &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);