#include <introspected-doxygen.h>
Public Member Functions | |
Ping6 () | |
Constructor. | |
virtual | ~Ping6 () |
Destructor. | |
void | SetIfIndex (uint32_t ifIndex) |
Set the out interface index. This is to send to link-local (unicast or multicast) address when a node has multiple interfaces. More... | |
void | SetLocal (Ipv6Address ipv6) |
Set the local address. More... | |
void | SetRemote (Ipv6Address ipv6) |
Set the remote peer. More... | |
void | SetRouters (std::vector< Ipv6Address > routers) |
Set routers for routing type 0 (loose routing). More... | |
Public Member Functions inherited from ns3::Application | |
Ptr< Node > | GetNode () 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 |
SimpleRefCount & | operator= (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 () |
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) |
Protected Member Functions | |
virtual void | DoDispose () |
Dispose this object;. | |
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 Member Functions | |
void | HandleRead (Ptr< Socket > socket) |
Receive method. More... | |
void | ScheduleTransmit (Time dt) |
Schedule sending a packet. More... | |
void | Send () |
Send a packet. | |
virtual void | StartApplication () |
Start the application. | |
virtual void | StopApplication () |
Stop the application. | |
Private Attributes | |
Ipv6Address | m_address |
Peer IPv6 address. | |
uint32_t | m_count |
Number of "Echo request" packets that will be sent. | |
uint32_t | m_ifIndex |
Out interface (i.e. for link-local communication). | |
Time | m_interval |
Intervall between packets sent. | |
Ipv6Address | m_localAddress |
Local address. | |
Ipv6Address | m_peerAddress |
Peer address. | |
std::vector< Ipv6Address > | m_routers |
Routers addresses for routing type 0. | |
EventId | m_sendEvent |
Event ID. | |
uint32_t | m_sent |
Number of packets sent. | |
uint16_t | m_seq |
Sequence number. | |
uint32_t | m_size |
Size of the packet. | |
Ptr< Socket > | m_socket |
Local socket. | |
Additional Inherited Members | |
Protected Attributes inherited from ns3::Application | |
Ptr< Node > | m_node |
EventId | m_startEvent |
Time | m_startTime |
EventId | m_stopEvent |
Time | m_stopTime |
A ping6 application.
ns3::Ping6 is accessible through the following paths with Config::Set and Config::Connect:
No TraceSources are defined for this type.
|
static |
Get the type ID.
Definition at line 45 of file ping6.cc.
References m_count, m_interval, m_localAddress, m_peerAddress, m_size, ns3::Seconds(), and ns3::TypeId::SetParent().
Referenced by ns3::Ping6Helper::Ping6Helper().
Receive method.
socket | socket that receive a packet |
Definition at line 228 of file ping6.cc.
References ns3::Inet6SocketAddress::ConvertFrom(), ns3::Packet::CopyData(), ns3::Icmpv6Echo::GetId(), ns3::Inet6SocketAddress::GetIpv6(), ns3::Icmpv6Echo::GetSeq(), ns3::Packet::GetSize(), ns3::Inet6SocketAddress::IsMatchingType(), NS_LOG_FUNCTION, NS_LOG_INFO, ns3::Socket::RecvFrom(), and ns3::Packet::RemoveHeader().
Referenced by StartApplication().
|
private |
Schedule sending a packet.
dt | interval between packet |
Definition at line 149 of file ping6.cc.
References m_sendEvent, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), and Send().
Referenced by Send(), and StartApplication().
void ns3::Ping6::SetIfIndex | ( | uint32_t | ifIndex | ) |
void ns3::Ping6::SetLocal | ( | Ipv6Address | ipv6 | ) |
Set the local address.
ipv6 | the local IPv6 address |
Definition at line 120 of file ping6.cc.
References m_localAddress, and NS_LOG_FUNCTION.
void ns3::Ping6::SetRemote | ( | Ipv6Address | ipv6 | ) |
Set the remote peer.
ipv6 | IPv6 address of the peer |
Definition at line 126 of file ping6.cc.
References m_peerAddress, and NS_LOG_FUNCTION.
void ns3::Ping6::SetRouters | ( | std::vector< Ipv6Address > | routers | ) |