ipv4-end-point-demux: add method to fetch list of all endpoints
GetAllEndPoints() will be used by the network simulation cradle. After a wakeup event, all sockets (Endpoints) have to be checked for state changes.
This commit is contained in:
@@ -168,6 +168,24 @@ Ipv4EndPointDemux::DeAllocate (Ipv4EndPoint *endPoint)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* return list of all available Endpoints
|
||||
*/
|
||||
Ipv4EndPointDemux::EndPoints
|
||||
Ipv4EndPointDemux::GetAllEndPoints (void)
|
||||
{
|
||||
NS_LOG_FUNCTION_NOARGS ();
|
||||
EndPoints ret;
|
||||
|
||||
for (EndPointsI i = m_endPoints.begin (); i != m_endPoints.end (); i++)
|
||||
{
|
||||
Ipv4EndPoint* endP = *i;
|
||||
ret.push_back(endP);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* If we have an exact match, we return it.
|
||||
* Otherwise, if we find a generic match, we return it.
|
||||
|
||||
@@ -48,6 +48,7 @@ public:
|
||||
Ipv4EndPointDemux ();
|
||||
~Ipv4EndPointDemux ();
|
||||
|
||||
EndPoints GetAllEndPoints (void);
|
||||
bool LookupPortLocal (uint16_t port);
|
||||
bool LookupLocal (Ipv4Address addr, uint16_t port);
|
||||
EndPoints Lookup (Ipv4Address daddr,
|
||||
|
||||
Reference in New Issue
Block a user