ns3::Ipv4EndPoint Class Reference

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

#include <ipv4-end-point.h>

Collaboration diagram for ns3::Ipv4EndPoint:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Ipv4EndPoint (Ipv4Address address, uint16_t port)
 ~Ipv4EndPoint ()
Ipv4Address GetLocalAddress (void)
void SetLocalAddress (Ipv4Address address)
uint16_t GetLocalPort (void)
Ipv4Address GetPeerAddress (void)
uint16_t GetPeerPort (void)
void SetPeer (Ipv4Address address, uint16_t port)
void SetRxCallback (Callback< void, Ptr< Packet >, Ipv4Address, uint16_t > callback)
void SetIcmpCallback (Callback< void, Ipv4Address, uint8_t, uint8_t, uint8_t, uint32_t > callback)
void SetDestroyCallback (Callback< void > callback)
void ForwardUp (Ptr< Packet > p, Ipv4Address saddr, uint16_t sport)
void ForwardIcmp (Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo)

Private Member Functions

void DoForwardUp (Ptr< Packet > p, Ipv4Address saddr, uint16_t sport)
void DoForwardIcmp (Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo)

Private Attributes

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

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 44 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::DoForwardIcmp ( Ipv4Address  icmpSource,
uint8_t  icmpTtl,
uint8_t  icmpType,
uint8_t  icmpCode,
uint32_t  icmpInfo 
) [private]

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

References m_icmpCallback.

Referenced by ForwardIcmp().

void ns3::Ipv4EndPoint::DoForwardUp ( Ptr< Packet p,
Ipv4Address  saddr,
uint16_t  sport 
) [private]

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

References m_rxCallback.

Referenced by ForwardUp().

void ns3::Ipv4EndPoint::ForwardIcmp ( Ipv4Address  icmpSource,
uint8_t  icmpTtl,
uint8_t  icmpType,
uint8_t  icmpCode,
uint32_t  icmpInfo 
)
void ns3::Ipv4EndPoint::ForwardUp ( Ptr< Packet p,
Ipv4Address  saddr,
uint16_t  sport 
)
Ipv4Address ns3::Ipv4EndPoint::GetLocalAddress ( void   ) 
uint16_t ns3::Ipv4EndPoint::GetLocalPort ( void   ) 
Ipv4Address ns3::Ipv4EndPoint::GetPeerAddress ( void   ) 

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

References m_peerAddr.

Referenced by ns3::TcpSocketImpl::ForwardUp(), and ns3::Ipv4EndPointDemux::Lookup().

uint16_t ns3::Ipv4EndPoint::GetPeerPort ( void   ) 

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

References m_peerPort.

Referenced by ns3::TcpSocketImpl::ForwardUp(), and ns3::Ipv4EndPointDemux::Lookup().

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 84 of file ipv4-end-point.cc.

References m_icmpCallback.

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

void ns3::Ipv4EndPoint::SetLocalAddress ( Ipv4Address  address  ) 
void ns3::Ipv4EndPoint::SetPeer ( Ipv4Address  address,
uint16_t  port 
)
void ns3::Ipv4EndPoint::SetRxCallback ( Callback< void, Ptr< Packet >, Ipv4Address, uint16_t >  callback  ) 

Member Data Documentation

Definition at line 82 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 81 of file ipv4-end-point.h.

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

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

Referenced by GetLocalAddress(), and SetLocalAddress().

uint16_t ns3::Ipv4EndPoint::m_localPort [private]

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

Referenced by GetLocalPort().

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

Referenced by GetPeerAddress(), and SetPeer().

uint16_t ns3::Ipv4EndPoint::m_peerPort [private]

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

Referenced by GetPeerPort(), and SetPeer().

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

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


The documentation for this class was generated from the following files:
Generated on Thu Dec 3 14:11:39 2009 for NS-3 by  doxygen 1.6.3