mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-19 11:54:22 -04:00
Commit of the new UDP Connection methods and
the rewrite of the retroshare core networking stack. This check-in commits the changes to the pqi code, and provides the majority of the improvements. (1) Introduced new interfaces for DHT and UPnP abstraction: p3dhtmgr.h, p3upnpmgr.h (2) Introduces abstraction for Authentication: p3authmgr.h (3) New Connection Manager to coordinate networking code: p3connmgr.h (4) New Configuration Manager: p3cfgmgr.h This library has been significantly modified to support DHT synced connections to enable connections between Firewalled Friends. The connection code has been rewritten within a new framework, which should make extensions easier to code. Also removed significant amount of old code relating to Tunnels, Channels etc. This will be recycled later as higher level services that should not be part of the core networking library. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@306 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
de0ce110b9
commit
6435357c07
63 changed files with 8336 additions and 10839 deletions
|
@ -436,6 +436,15 @@ in_addr_t pqi_inet_netof(struct in_addr addr)
|
|||
//return abit;
|
||||
}
|
||||
|
||||
int sockaddr_cmp(struct sockaddr_in &addr1, struct sockaddr_in &addr2 )
|
||||
{
|
||||
if (addr1.sin_family != addr2.sin_family)
|
||||
return addr1.sin_family - addr2.sin_family;
|
||||
if (addr1.sin_addr.s_addr != addr2.sin_addr.s_addr)
|
||||
return (addr1.sin_addr.s_addr - addr2.sin_addr.s_addr);
|
||||
if (addr1.sin_port != addr2.sin_port)
|
||||
return (addr1.sin_port - addr2.sin_port);
|
||||
}
|
||||
|
||||
int inaddr_cmp(struct sockaddr_in addr1, struct sockaddr_in addr2 )
|
||||
{
|
||||
|
@ -660,7 +669,7 @@ bool isSameSubnet(struct in_addr *addr1, struct in_addr *addr2)
|
|||
bool LookupDNSAddr(std::string name, struct sockaddr_in &addr)
|
||||
{
|
||||
|
||||
#if 0
|
||||
#if 1
|
||||
char service[100];
|
||||
struct addrinfo hints_st;
|
||||
struct addrinfo *hints = &hints_st;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue