Demultiplexor for end points. More...
#include <ipv6-end-point-demux.h>
Public Types | |
| typedef std::list< Ipv6EndPoint * > | EndPoints |
|
typedef std::list < Ipv6EndPoint * >::iterator | EndPointsI |
Public Member Functions | |
| Ipv6EndPointDemux () | |
| Constructor. | |
| ~Ipv6EndPointDemux () | |
| Destructor. | |
| Ipv6EndPoint * | Allocate (void) |
| Allocate a Ipv6EndPoint. More... | |
| Ipv6EndPoint * | Allocate (Ipv6Address address) |
| Allocate a Ipv6EndPoint. More... | |
| Ipv6EndPoint * | Allocate (uint16_t port) |
| Allocate a Ipv6EndPoint. More... | |
| Ipv6EndPoint * | Allocate (Ipv6Address address, uint16_t port) |
| Allocate a Ipv6EndPoint. More... | |
| Ipv6EndPoint * | Allocate (Ipv6Address localAddress, uint16_t localPort, Ipv6Address peerAddress, uint16_t peerPort) |
| Allocate a Ipv6EndPoint. More... | |
| void | DeAllocate (Ipv6EndPoint *endPoint) |
| Remove a end point. More... | |
| EndPoints | GetEndPoints () const |
| Get the entire list of end points registered. More... | |
| EndPoints | Lookup (Ipv6Address dst, uint16_t dport, Ipv6Address src, uint16_t sport, Ptr< Ipv6Interface > incomingInterface) |
| lookup for a match with all the parameters. More... | |
| bool | LookupLocal (Ipv6Address addr, uint16_t port) |
| Lookup for address and port. More... | |
| bool | LookupPortLocal (uint16_t port) |
| Lookup for port local. More... | |
| Ipv6EndPoint * | SimpleLookup (Ipv6Address dst, uint16_t dport, Ipv6Address src, uint16_t sport) |
| Simple lookup for a four-tuple match. More... | |
Private Member Functions | |
| uint16_t | AllocateEphemeralPort () |
| Allocate a ephemeral port. More... | |
Private Attributes | |
| EndPoints | m_endPoints |
| A list of IPv6 end points. | |
| uint16_t | m_ephemeral |
| The ephemeral port. | |
| uint16_t | m_portFirst |
| The first ephemeral port. | |
| uint16_t | m_portLast |
| The last ephemeral port. | |
Demultiplexor for end points.
Definition at line 37 of file ipv6-end-point-demux.h.
| Ipv6EndPoint * ns3::Ipv6EndPointDemux::Allocate | ( | void | ) |
Allocate a Ipv6EndPoint.
Definition at line 75 of file ipv6-end-point-demux.cc.
References AllocateEphemeralPort(), ns3::Ipv6Address::GetAny(), m_endPoints, NS_LOG_DEBUG, NS_LOG_FUNCTION_NOARGS, and NS_LOG_WARN.
Referenced by Allocate().
| Ipv6EndPoint * ns3::Ipv6EndPointDemux::Allocate | ( | Ipv6Address | address | ) |
Allocate a Ipv6EndPoint.
| address | IPv6 address |
Definition at line 90 of file ipv6-end-point-demux.cc.
References AllocateEphemeralPort(), m_endPoints, NS_LOG_DEBUG, NS_LOG_FUNCTION, and NS_LOG_WARN.
| Ipv6EndPoint * ns3::Ipv6EndPointDemux::Allocate | ( | uint16_t | port | ) |
Allocate a Ipv6EndPoint.
| port | local port |
Definition at line 105 of file ipv6-end-point-demux.cc.
References Allocate(), ns3::Ipv6Address::GetAny(), and NS_LOG_FUNCTION.
| Ipv6EndPoint * ns3::Ipv6EndPointDemux::Allocate | ( | Ipv6Address | address, |
| uint16_t | port | ||
| ) |
Allocate a Ipv6EndPoint.
| address | local address |
| port | local port |
Definition at line 112 of file ipv6-end-point-demux.cc.
References LookupLocal(), m_endPoints, NS_LOG_DEBUG, NS_LOG_FUNCTION, and NS_LOG_WARN.
| Ipv6EndPoint * ns3::Ipv6EndPointDemux::Allocate | ( | Ipv6Address | localAddress, |
| uint16_t | localPort, | ||
| Ipv6Address | peerAddress, | ||
| uint16_t | peerPort | ||
| ) |
Allocate a Ipv6EndPoint.
| localAddress | local address |
| localPort | local port |
| peerAddress | peer address |
| peerPort | peer port |
Definition at line 126 of file ipv6-end-point-demux.cc.
References m_endPoints, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_WARN, and ns3::Ipv6EndPoint::SetPeer().
|
private |
Allocate a ephemeral port.
Definition at line 321 of file ipv6-end-point-demux.cc.
References LookupPortLocal(), m_ephemeral, m_portFirst, m_portLast, and NS_LOG_FUNCTION_NOARGS.
Referenced by Allocate().
| void ns3::Ipv6EndPointDemux::DeAllocate | ( | Ipv6EndPoint * | endPoint | ) |
Remove a end point.
| endPoint | the end point to remove |
Definition at line 151 of file ipv6-end-point-demux.cc.
References m_endPoints, and NS_LOG_FUNCTION_NOARGS.
| Ipv6EndPointDemux::EndPoints ns3::Ipv6EndPointDemux::GetEndPoints | ( | ) | const |
Get the entire list of end points registered.
Definition at line 343 of file ipv6-end-point-demux.cc.
References m_endPoints.
| Ipv6EndPointDemux::EndPoints ns3::Ipv6EndPointDemux::Lookup | ( | Ipv6Address | dst, |
| uint16_t | dport, | ||
| Ipv6Address | src, | ||
| uint16_t | sport, | ||
| Ptr< Ipv6Interface > | incomingInterface | ||
| ) |
lookup for a match with all the parameters.
| dst | destination address to test |
| dport | destination port to test |
| src | source address to test |
| sport | source port to test |
| incomingInterface | the incoming interface |
Definition at line 170 of file ipv6-end-point-demux.cc.
References ns3::Ipv6Address::GetAllRoutersMulticast(), ns3::Ipv6Address::GetAny(), ns3::Ipv6EndPoint::GetBoundNetDevice(), ns3::Ipv6Interface::GetDevice(), ns3::Ipv6EndPoint::GetLocalAddress(), ns3::Ipv6EndPoint::GetLocalPort(), ns3::Ipv6EndPoint::GetPeerAddress(), ns3::Ipv6EndPoint::GetPeerPort(), m_endPoints, NS_LOG_DEBUG, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
| bool ns3::Ipv6EndPointDemux::LookupLocal | ( | Ipv6Address | addr, |
| uint16_t | port | ||
| ) |
Lookup for address and port.
| addr | address to test |
| port | port to test |
Definition at line 61 of file ipv6-end-point-demux.cc.
References m_endPoints, and NS_LOG_FUNCTION.
Referenced by Allocate().
| bool ns3::Ipv6EndPointDemux::LookupPortLocal | ( | uint16_t | port | ) |
Lookup for port local.
| port | port to test |
Definition at line 48 of file ipv6-end-point-demux.cc.
References m_endPoints, and NS_LOG_FUNCTION.
Referenced by AllocateEphemeralPort().
| Ipv6EndPoint * ns3::Ipv6EndPointDemux::SimpleLookup | ( | Ipv6Address | dst, |
| uint16_t | dport, | ||
| Ipv6Address | src, | ||
| uint16_t | sport | ||
| ) |
Simple lookup for a four-tuple match.
| dst | destination address to test |
| dport | destination port to test |
| src | source address to test |
| sport | source port to test |
Definition at line 281 of file ipv6-end-point-demux.cc.
References ns3::Ipv6Address::GetAny(), and m_endPoints.