* added function to extract Local Address from udpstack.

* update local address when a reset is called.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4417 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2011-07-10 00:37:09 +00:00
parent f6f721a492
commit 21145a29bb
2 changed files with 8 additions and 0 deletions

View File

@ -75,10 +75,17 @@ UdpLayer *UdpStack::getUdpLayer() /* for testing only */
return udpLayer;
}
bool UdpStack::getLocalAddress(struct sockaddr_in &local)
{
local = laddr;
return true;
}
bool UdpStack::resetAddress(struct sockaddr_in &local)
{
std::cerr << "UdpStack::resetAddress(" << local << ")";
std::cerr << std::endl;
laddr = local;
return udpLayer->reset(local);
}

View File

@ -78,6 +78,7 @@ virtual ~UdpStack() { return; }
UdpLayer *getUdpLayer(); /* for testing only */
bool getLocalAddress(struct sockaddr_in &local);
bool resetAddress(struct sockaddr_in &local);