A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::Ipv4EndPoint Class Reference

A representation of an internet endpoint/connection. More...

#include <ipv4-end-point.h>

+ Collaboration diagram for ns3::Ipv4EndPoint:

Public Member Functions

 Ipv4EndPoint (Ipv4Address address, uint16_t port)
 ~Ipv4EndPoint ()
void BindToNetDevice (Ptr< NetDevice > netdevice)
void ForwardIcmp (Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo)
void ForwardUp (Ptr< Packet > p, const Ipv4Header &header, uint16_t sport, Ptr< Ipv4Interface > incomingInterface)
Ptr< NetDeviceGetBoundNetDevice (void)
Ipv4Address GetLocalAddress (void)
uint16_t GetLocalPort (void)
Ipv4Address GetPeerAddress (void)
uint16_t GetPeerPort (void)
void SetDestroyCallback (Callback< void > callback)
void SetIcmpCallback (Callback< void, Ipv4Address, uint8_t, uint8_t, uint8_t, uint32_t > callback)
void SetLocalAddress (Ipv4Address address)
void SetPeer (Ipv4Address address, uint16_t port)
void SetRxCallback (Callback< void, Ptr< Packet >, Ipv4Header, uint16_t, Ptr< Ipv4Interface > > callback)

Private Member Functions

void DoForwardIcmp (Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo)
void DoForwardUp (Ptr< Packet > p, const Ipv4Header &header, uint16_t sport, Ptr< Ipv4Interface > incomingInterface)

Private Attributes

Ptr< NetDevicem_boundnetdevice
Callback< void > m_destroyCallback
Callback< void, Ipv4Address,
uint8_t, uint8_t, uint8_t,
uint32_t > 
m_icmpCallback
Ipv4Address m_localAddr
uint16_t m_localPort
Ipv4Address m_peerAddr
uint16_t m_peerPort
Callback< void, Ptr< Packet >
, Ipv4Header, uint16_t, Ptr
< Ipv4Interface > > 
m_rxCallback

Detailed Description

A representation of an internet endpoint/connection.

This class provides an internet four-tuple (source and destination ports and addresses). These are used in the ns3::Ipv4EndPointDemux as targets of lookups. The class also has a callback for notification to higher layers that a packet from a lower layer was received. In the ns3 internet-stack, these notifications are automatically registered to be received by the corresponding socket.

Definition at line 47 of file ipv4-end-point.h.

Constructor & Destructor Documentation

ns3::Ipv4EndPoint::Ipv4EndPoint ( Ipv4Address  address,
uint16_t  port 
)

Definition at line 30 of file ipv4-end-point.cc.

ns3::Ipv4EndPoint::~Ipv4EndPoint ( )

Member Function Documentation

void ns3::Ipv4EndPoint::BindToNetDevice ( Ptr< NetDevice netdevice)

Definition at line 83 of file ipv4-end-point.cc.

References m_boundnetdevice.

Referenced by ns3::UdpSocketImpl::BindToNetDevice(), and ns3::TcpSocketBase::BindToNetDevice().

+ Here is the caller graph for this function:

void ns3::Ipv4EndPoint::DoForwardIcmp ( Ipv4Address  icmpSource,
uint8_t  icmpTtl,
uint8_t  icmpType,
uint8_t  icmpCode,
uint32_t  icmpInfo 
)
private

Definition at line 143 of file ipv4-end-point.cc.

References m_icmpCallback.

Referenced by ForwardIcmp().

+ Here is the caller graph for this function:

void ns3::Ipv4EndPoint::DoForwardUp ( Ptr< Packet p,
const Ipv4Header header,
uint16_t  sport,
Ptr< Ipv4Interface incomingInterface 
)
private

Definition at line 123 of file ipv4-end-point.cc.

References m_rxCallback.

Referenced by ForwardUp().

+ Here is the caller graph for this function:

void ns3::Ipv4EndPoint::ForwardIcmp ( Ipv4Address  icmpSource,
uint8_t  icmpTtl,
uint8_t  icmpType,
uint8_t  icmpCode,
uint32_t  icmpInfo 
)

Definition at line 130 of file ipv4-end-point.cc.

References DoForwardIcmp(), ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), m_icmpCallback, NS_LOG_FUNCTION, and ns3::Simulator::ScheduleNow().

Referenced by ns3::UdpL4Protocol::ReceiveIcmp().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Ipv4EndPoint::ForwardUp ( Ptr< Packet p,
const Ipv4Header header,
uint16_t  sport,
Ptr< Ipv4Interface incomingInterface 
)

Definition at line 113 of file ipv4-end-point.cc.

References DoForwardUp(), ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), m_rxCallback, and ns3::Simulator::ScheduleNow().

+ Here is the call graph for this function:

Ptr< NetDevice > ns3::Ipv4EndPoint::GetBoundNetDevice ( void  )

Definition at line 90 of file ipv4-end-point.cc.

References m_boundnetdevice.

Referenced by ns3::Ipv4EndPointDemux::Lookup().

+ Here is the caller graph for this function:

void ns3::Ipv4EndPoint::SetDestroyCallback ( Callback< void >  callback)
void ns3::Ipv4EndPoint::SetIcmpCallback ( Callback< void, Ipv4Address, uint8_t, uint8_t, uint8_t, uint32_t >  callback)

Definition at line 101 of file ipv4-end-point.cc.

References m_icmpCallback.

Referenced by ns3::UdpSocketImpl::FinishBind().

+ Here is the caller graph for this function:

void ns3::Ipv4EndPoint::SetLocalAddress ( Ipv4Address  address)

Definition at line 55 of file ipv4-end-point.cc.

References m_localAddr.

Referenced by ns3::TcpSocketBase::SetupEndpoint().

+ Here is the caller graph for this function:

void ns3::Ipv4EndPoint::SetPeer ( Ipv4Address  address,
uint16_t  port 
)

Definition at line 76 of file ipv4-end-point.cc.

References m_peerAddr, m_peerPort, and port.

Referenced by ns3::Ipv4EndPointDemux::Allocate(), ns3::TcpSocketBase::Connect(), and ns3::TcpSocketBase::ProcessSynRcvd().

+ Here is the caller graph for this function:

void ns3::Ipv4EndPoint::SetRxCallback ( Callback< void, Ptr< Packet >, Ipv4Header, uint16_t, Ptr< Ipv4Interface > >  callback)

Definition at line 96 of file ipv4-end-point.cc.

References m_rxCallback.

Referenced by ns3::NscTcpSocketImpl::CompleteFork(), ns3::NscTcpSocketImpl::FinishBind(), ns3::UdpSocketImpl::FinishBind(), and ns3::TcpSocketBase::SetupCallback().

+ Here is the caller graph for this function:

Member Data Documentation

Ptr<NetDevice> ns3::Ipv4EndPoint::m_boundnetdevice
private

Definition at line 88 of file ipv4-end-point.h.

Referenced by BindToNetDevice(), and GetBoundNetDevice().

Callback<void> ns3::Ipv4EndPoint::m_destroyCallback
private

Definition at line 91 of file ipv4-end-point.h.

Referenced by SetDestroyCallback(), and ~Ipv4EndPoint().

Callback<void,Ipv4Address,uint8_t,uint8_t,uint8_t,uint32_t> ns3::Ipv4EndPoint::m_icmpCallback
private

Definition at line 90 of file ipv4-end-point.h.

Referenced by DoForwardIcmp(), ForwardIcmp(), SetIcmpCallback(), and ~Ipv4EndPoint().

Ipv4Address ns3::Ipv4EndPoint::m_localAddr
private

Definition at line 84 of file ipv4-end-point.h.

Referenced by GetLocalAddress(), and SetLocalAddress().

uint16_t ns3::Ipv4EndPoint::m_localPort
private

Definition at line 85 of file ipv4-end-point.h.

Referenced by GetLocalPort().

Ipv4Address ns3::Ipv4EndPoint::m_peerAddr
private

Definition at line 86 of file ipv4-end-point.h.

Referenced by GetPeerAddress(), and SetPeer().

uint16_t ns3::Ipv4EndPoint::m_peerPort
private

Definition at line 87 of file ipv4-end-point.h.

Referenced by GetPeerPort(), and SetPeer().

Callback<void,Ptr<Packet>, Ipv4Header, uint16_t, Ptr<Ipv4Interface> > ns3::Ipv4EndPoint::m_rxCallback
private

Definition at line 89 of file ipv4-end-point.h.

Referenced by DoForwardUp(), ForwardUp(), SetRxCallback(), and ~Ipv4EndPoint().


The documentation for this class was generated from the following files: