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

Router advertisement daemon. More...

#include <introspected-doxygen.h>

+ Inheritance diagram for ns3::Radvd:

Public Member Functions

 Radvd ()
 Constructor.
 
virtual ~Radvd ()
 Destructor.
 
void AddConfiguration (Ptr< RadvdInterface > routerInterface)
 Add configuration for an interface;. More...
 
int64_t AssignStreams (int64_t stream)
 
- Public Member Functions inherited from ns3::Application
Ptr< NodeGetNode () const
 
void SetNode (Ptr< Node > node)
 
void SetStartTime (Time start)
 Specify application start time. More...
 
void SetStopTime (Time stop)
 Specify application stop time. More...
 
- Public Member Functions inherited from ns3::Object
void AggregateObject (Ptr< Object > other)
 
void Dispose (void)
 
AggregateIterator GetAggregateIterator (void) const
 
virtual TypeId GetInstanceTypeId (void) const
 
template<typename T >
Ptr< T > GetObject (void) const
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 
void Initialize (void)
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount (const SimpleRefCount &o)
 
uint32_t GetReferenceCount (void) const
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 
void Ref (void) const
 
void Unref (void) const
 
- Public Member Functions inherited from ns3::ObjectBase
void GetAttribute (std::string name, AttributeValue &value) const
 
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
 
void SetAttribute (std::string name, const AttributeValue &value)
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 

Static Public Member Functions

static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Application
static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 

Static Public Attributes

static const uint32_t MAX_RA_DELAY_TIME = 500
 Default value for maximum delay of RA (ms)
 

Protected Member Functions

virtual void DoDispose ()
 Dispose the instance.
 
- Protected Member Functions inherited from ns3::Application
virtual void DoInitialize (void)
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 
virtual void NotifyNewAggregate (void)
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 
virtual void NotifyConstructionCompleted (void)
 

Private Types

typedef std::map< uint32_t,
EventId
EventIdMap
 
typedef std::map< uint32_t,
EventId >::const_iterator 
EventIdMapCI
 
typedef std::map< uint32_t,
EventId >::iterator 
EventIdMapI
 
typedef std::list< Ptr
< RadvdInterface > > 
RadvdInterfaceList
 
typedef std::list< Ptr
< RadvdInterface >
>::const_iterator 
RadvdInterfaceListCI
 
typedef std::list< Ptr
< RadvdInterface > >::iterator 
RadvdInterfaceListI
 

Private Member Functions

void HandleRead (Ptr< Socket > socket)
 Handle received packet, especially router solicitation. More...
 
void ScheduleTransmit (Time dt, Ptr< RadvdInterface > config, EventId &eventId, Ipv6Address dst=Ipv6Address::GetAllNodesMulticast(), bool reschedule=false)
 Schedule sending a packet. More...
 
void Send (Ptr< RadvdInterface > config, Ipv6Address dst=Ipv6Address::GetAllNodesMulticast(), bool reschedule=false)
 Send a packet. More...
 
virtual void StartApplication ()
 Start the application.
 
virtual void StopApplication ()
 Stop the application.
 

Private Attributes

RadvdInterfaceList m_configurations
 List of configuration for interface.
 
EventIdMap m_eventIds
 Event ID map.
 
Ptr< UniformRandomVariablem_jitter
 Variable to provide jitter in advertisement interval.
 
Ptr< Socketm_socket
 Raw socket to send RA.
 

Additional Inherited Members

- Protected Attributes inherited from ns3::Application
Ptr< Nodem_node
 
EventId m_startEvent
 
Time m_startTime
 
EventId m_stopEvent
 
Time m_stopTime
 

Detailed Description

Router advertisement daemon.

Config Paths

ns3::Radvd is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/ApplicationList/[i]/$ns3::Radvd

Attributes

  • AdvertisementJitter: Uniform variable to provide jitter between min and max values of AdvInterval

Attributes defined in parent class ns3::Application

  • StartTime: Time at which the application will start
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: +0.0ns
    • Flags: construct write read
  • StopTime: Time at which the application will stop
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: +0.0ns
    • Flags: construct write read

No TraceSources are defined for this type.

Definition at line 47 of file radvd.h.

Member Function Documentation

void ns3::Radvd::AddConfiguration ( Ptr< RadvdInterface routerInterface)

Add configuration for an interface;.

Parameters
routerInterfaceconfiguration

Definition at line 123 of file radvd.cc.

References m_configurations, and NS_LOG_FUNCTION.

int64_t ns3::Radvd::AssignStreams ( int64_t  stream)

Assign a fixed random variable stream number to the random variables used by this model. Return the number of streams (possibly zero) that have been assigned.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Definition at line 130 of file radvd.cc.

References m_jitter, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().

TypeId ns3::Radvd::GetTypeId ( void  )
static

Get the type ID.

Returns
type ID

Definition at line 47 of file radvd.cc.

References m_jitter, and ns3::TypeId::SetParent().

void ns3::Radvd::ScheduleTransmit ( Time  dt,
Ptr< RadvdInterface config,
EventId eventId,
Ipv6Address  dst = Ipv6Address::GetAllNodesMulticast (),
bool  reschedule = false 
)
private

Schedule sending a packet.

Parameters
dtinterval between packet
configinterface configuration
eventIdevent ID associated
dstIPv6 destination address
rescheduleif true another send will be reschedule (periodic)

Definition at line 137 of file radvd.cc.

References NS_LOG_FUNCTION, ns3::Simulator::Schedule(), and Send().

Referenced by HandleRead(), Send(), and StartApplication().

void ns3::Radvd::Send ( Ptr< RadvdInterface config,
Ipv6Address  dst = Ipv6Address::GetAllNodesMulticast (),
bool  reschedule = false 
)
private

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