diff --git a/src/internet-stack/ipv4-end-point-demux.cc b/src/internet-stack/ipv4-end-point-demux.cc index 3d3f779be..54ed3fbbe 100644 --- a/src/internet-stack/ipv4-end-point-demux.cc +++ b/src/internet-stack/ipv4-end-point-demux.cc @@ -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. diff --git a/src/internet-stack/ipv4-end-point-demux.h b/src/internet-stack/ipv4-end-point-demux.h index 61e580e3c..58a417264 100644 --- a/src/internet-stack/ipv4-end-point-demux.h +++ b/src/internet-stack/ipv4-end-point-demux.h @@ -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,