A Discrete-Event Network Simulator
API
Public Types | Public Member Functions | Private Attributes | List of all members
ns3::dsdv::QueueEntry Class Reference

DSDV Queue Entry. More...

#include "dsdv-packet-queue.h"

Public Types

typedef Ipv4RoutingProtocol::ErrorCallback ErrorCallback
 Error callback function typedef. More...
 
typedef Ipv4RoutingProtocol::UnicastForwardCallback UnicastForwardCallback
 Unicast forward call back function typedef. More...
 

Public Member Functions

 QueueEntry (Ptr< const Packet > pa=0, Ipv4Header const &h=Ipv4Header(), UnicastForwardCallback ucb=UnicastForwardCallback(), ErrorCallback ecb=ErrorCallback())
 c-tor More...
 
ErrorCallback GetErrorCallback () const
 Get error callback function. More...
 
Time GetExpireTime () const
 Get expire time. More...
 
Ipv4Header GetIpv4Header () const
 Get IP header. More...
 
Ptr< const PacketGetPacket () const
 Get packet. More...
 
UnicastForwardCallback GetUnicastForwardCallback () const
 Get unicast forward callback function. More...
 
bool operator== (QueueEntry const &o) const
 Compare queue entries. More...
 
void SetErrorCallback (ErrorCallback ecb)
 Set error callback function. More...
 
void SetExpireTime (Time exp)
 Set expire time. More...
 
void SetIpv4Header (Ipv4Header h)
 Set IP header. More...
 
void SetPacket (Ptr< const Packet > p)
 Set packet. More...
 
void SetUnicastForwardCallback (UnicastForwardCallback ucb)
 Set unicast forward callback function. More...
 

Private Attributes

ErrorCallback m_ecb
 Error callback. More...
 
Time m_expire
 Expire time for queue entry. More...
 
Ipv4Header m_header
 IP header. More...
 
Ptr< const Packetm_packet
 Data packet. More...
 
UnicastForwardCallback m_ucb
 Unicast forward callback. More...
 

Detailed Description

DSDV Queue Entry.

Definition at line 45 of file dsdv-packet-queue.h.

Member Typedef Documentation

◆ ErrorCallback

Error callback function typedef.

Definition at line 51 of file dsdv-packet-queue.h.

◆ UnicastForwardCallback

Unicast forward call back function typedef.

Definition at line 49 of file dsdv-packet-queue.h.

Constructor & Destructor Documentation

◆ QueueEntry()

ns3::dsdv::QueueEntry::QueueEntry ( Ptr< const Packet pa = 0,
Ipv4Header const &  h = Ipv4Header (),
UnicastForwardCallback  ucb = UnicastForwardCallback (),
ErrorCallback  ecb = ErrorCallback () 
)
inline

c-tor

Parameters
pathe packet to create the entry
hthe Ipv4Header
ucbthe UnicastForwardCallback function
ecbthe ErrorCallback function

Definition at line 60 of file dsdv-packet-queue.h.

Member Function Documentation

◆ GetErrorCallback()

ErrorCallback ns3::dsdv::QueueEntry::GetErrorCallback ( ) const
inline

Get error callback function.

Returns
the error callback

Definition at line 102 of file dsdv-packet-queue.h.

References m_ecb.

◆ GetExpireTime()

Time ns3::dsdv::QueueEntry::GetExpireTime ( ) const
inline

Get expire time.

Returns
the expire time

Definition at line 158 of file dsdv-packet-queue.h.

References m_expire, and ns3::Simulator::Now().

Referenced by ns3::dsdv::IsExpired::operator()().

◆ GetIpv4Header()

Ipv4Header ns3::dsdv::QueueEntry::GetIpv4Header ( ) const
inline

◆ GetPacket()

Ptr<const Packet> ns3::dsdv::QueueEntry::GetPacket ( ) const
inline

Get packet.

Returns
the current packet

Definition at line 118 of file dsdv-packet-queue.h.

References m_packet.

Referenced by ns3::dsdv::PacketQueue::Drop(), ns3::dsdv::PacketQueue::Enqueue(), and ns3::dsdv::RoutingProtocol::SendPacketFromQueue().

◆ GetUnicastForwardCallback()

UnicastForwardCallback ns3::dsdv::QueueEntry::GetUnicastForwardCallback ( ) const
inline

Get unicast forward callback function.

Returns
the unicast forward callback

Definition at line 86 of file dsdv-packet-queue.h.

References m_ucb.

Referenced by ns3::dsdv::RoutingProtocol::SendPacketFromQueue().

◆ operator==()

bool ns3::dsdv::QueueEntry::operator== ( QueueEntry const &  o) const
inline

Compare queue entries.

Parameters
oQueueEntry to compare
Returns
true if equal

Definition at line 76 of file dsdv-packet-queue.h.

References ns3::Ipv4Header::GetDestination(), m_expire, m_header, and m_packet.

◆ SetErrorCallback()

void ns3::dsdv::QueueEntry::SetErrorCallback ( ErrorCallback  ecb)
inline

Set error callback function.

Parameters
ecbthe error callback

Definition at line 110 of file dsdv-packet-queue.h.

References m_ecb.

◆ SetExpireTime()

void ns3::dsdv::QueueEntry::SetExpireTime ( Time  exp)
inline

Set expire time.

Parameters
exp

Definition at line 150 of file dsdv-packet-queue.h.

References m_expire, and ns3::Simulator::Now().

Referenced by ns3::dsdv::PacketQueue::Enqueue().

◆ SetIpv4Header()

void ns3::dsdv::QueueEntry::SetIpv4Header ( Ipv4Header  h)
inline

Set IP header.

Parameters
hThe IPv4 header

Definition at line 142 of file dsdv-packet-queue.h.

References m_header.

◆ SetPacket()

void ns3::dsdv::QueueEntry::SetPacket ( Ptr< const Packet p)
inline

Set packet.

Parameters
pThe current packet

Definition at line 126 of file dsdv-packet-queue.h.

References m_packet.

◆ SetUnicastForwardCallback()

void ns3::dsdv::QueueEntry::SetUnicastForwardCallback ( UnicastForwardCallback  ucb)
inline

Set unicast forward callback function.

Parameters
ucbthe unicast forward callback

Definition at line 94 of file dsdv-packet-queue.h.

References m_ucb.

Member Data Documentation

◆ m_ecb

ErrorCallback ns3::dsdv::QueueEntry::m_ecb
private

Error callback.

Definition at line 171 of file dsdv-packet-queue.h.

Referenced by GetErrorCallback(), and SetErrorCallback().

◆ m_expire

Time ns3::dsdv::QueueEntry::m_expire
private

Expire time for queue entry.

Definition at line 173 of file dsdv-packet-queue.h.

Referenced by GetExpireTime(), operator==(), and SetExpireTime().

◆ m_header

Ipv4Header ns3::dsdv::QueueEntry::m_header
private

IP header.

Definition at line 167 of file dsdv-packet-queue.h.

Referenced by GetIpv4Header(), operator==(), and SetIpv4Header().

◆ m_packet

Ptr<const Packet> ns3::dsdv::QueueEntry::m_packet
private

Data packet.

Definition at line 165 of file dsdv-packet-queue.h.

Referenced by GetPacket(), operator==(), and SetPacket().

◆ m_ucb

UnicastForwardCallback ns3::dsdv::QueueEntry::m_ucb
private

Unicast forward callback.

Definition at line 169 of file dsdv-packet-queue.h.

Referenced by GetUnicastForwardCallback(), and SetUnicastForwardCallback().


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