mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-08 14:22:31 -04:00
add address list to gui
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1812 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d2f9f1c4f1
commit
e0543329ad
5 changed files with 26 additions and 4 deletions
|
@ -3850,5 +3850,4 @@ void peerConnectState::printIpAddressList(std::list<IpAddressTimed> ipTimedList)
|
|||
std::cerr << " seenTime : " << ipListIt->seenTime << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -96,7 +96,8 @@ class RsPeerDetails
|
|||
std::string localAddr;
|
||||
uint16_t localPort;
|
||||
std::string extAddr;
|
||||
uint16_t extPort;
|
||||
uint16_t extPort;
|
||||
std::list<std::string> ipAddressList;
|
||||
|
||||
uint32_t netMode;
|
||||
uint32_t tryNetMode; /* only for ownState */
|
||||
|
|
|
@ -368,6 +368,15 @@ bool p3Peers::getPeerDetails(std::string id, RsPeerDetails &d)
|
|||
d.extPort = ntohs(best_servr_addr.sin_port);
|
||||
d.lastConnect = pcs.lastcontact;
|
||||
d.connectPeriod = 0;
|
||||
std::list<std::string> ipAddressList;
|
||||
std::list<IpAddressTimed> pcsList = pcs.getIpAddressList();
|
||||
for (std::list<IpAddressTimed>::iterator ipListIt = pcsList.begin(); ipListIt!=(pcsList.end()); ipListIt++) {
|
||||
std::ostringstream toto;
|
||||
toto << ntohs(ipListIt->ipAddr.sin_port);
|
||||
ipAddressList.push_back(std::string(inet_ntoa(ipListIt->ipAddr.sin_addr)) + ":" + toto.str());
|
||||
}
|
||||
d.ipAddressList = ipAddressList;
|
||||
|
||||
|
||||
/* Translate */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue