|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
22 #include "ns3/data-rate.h"
23 #include "ns3/simple-net-device.h"
24 #include "ns3/simple-net-device-helper.h"
25 #include "ns3/internet-stack-helper.h"
26 #include "ns3/ipv6-address-helper.h"
27 #include "ns3/ipv6-routing-protocol.h"
28 #include "ns3/ipv6-routing-helper.h"
29 #include "ns3/ipv6-route.h"
30 #include "ns3/radvd-helper.h"
54 virtual void DoRun (
void);
216 Simulator::Stop (
Seconds (10.0));
222 m_addresses[0] <<
" instead of " <<
"2001:1::200:ff:fe00:1");
225 m_addresses[1] <<
" instead of " <<
"2001:1::200:ff:fe00:2");
228 m_addresses[2] <<
" instead of " <<
"2001:2::200:ff:fe00:3");
231 m_addresses[3] <<
" instead of " <<
"2001:2::200:ff:fe00:4");
238 m_routes[0]->GetGateway () <<
" instead of " <<
"fe80::200:ff:fe00:2");
247 m_routes[2]->GetGateway () <<
" instead of " <<
"::");
253 m_routes[3]->GetGateway () <<
" instead of " <<
"::");
256 Simulator::Destroy ();
holds a vector of ns3::NetDevice pointers
AttributeValue implementation for DataRate.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
SocketErrno
Enumeration of the possible errors returned by a socket.
Ptr< Ipv6RoutingProtocol > GetRoutingProtocol() const
Get current routing protocol used.
Ipv6InterfaceContainer AssignWithoutOnLink(const NetDeviceContainer &c)
Allocate an Ipv6InterfaceContainer with auto-assigned addresses, but do not set the on-link property ...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void Stop(Time stop)
Arrange for all of the Applications in this container to Stop() at the Time given as a parameter.
void SetForwarding(uint32_t i, bool state)
Set the state of the stack (act as a router or as an host) for the specified index.
Ipv6Address GetAddress() const
Get the IPv6 address.
std::vector< Ptr< Ipv6Route > > m_routes
Routing call results.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Ipv6InterfaceContainer AssignWithoutAddress(const NetDeviceContainer &c)
Allocate an Ipv6InterfaceContainer but do not assign any IPv6 addresses.
IPv6 layer implementation.
Describes an IPv6 address.
void SetBase(Ipv6Address network, Ipv6Prefix prefix, Ipv6Address base=Ipv6Address("::1"))
Set the base network number, network prefix, and base interface ID.
Helper class to auto-assign global IPv6 unicast addresses.
std::vector< Ipv6Address > m_addresses
Addresses on the nodes.
Ipv6InterfaceAddress GetAddress(uint32_t interfaceIndex, uint32_t addressIndex) const
Get an address.
void AddAnnouncedPrefix(uint32_t interface, Ipv6Address prefix, uint32_t prefixLength)
Add a new prefix to be announced through an interface.
void SetChannelAttribute(std::string n1, const AttributeValue &v1)
Ipv6InterfaceContainer Assign(const NetDeviceContainer &c)
Allocate an Ipv6InterfaceContainer with auto-assigned addresses.
Class for representing data rates.
void SetDeviceAttribute(std::string n1, const AttributeValue &v1)
static RadvdTestSuite radvdTestSuite
Static variable for test initialization.
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
virtual Ptr< Node > GetNode(void) const =0
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
std::vector< Socket::SocketErrno > m_routingResults
Routing call return values.
Keep track of a set of IPv6 interfaces.
build a set of SimpleNetDevice objects
void Add(Ptr< Ipv6 > ipv6, uint32_t interface)
Add a couple IPv6/interface.
NetDeviceContainer Install(Ptr< Node > node) const
This method creates an ns3::SimpleChannel with the attributes configured by SimpleNetDeviceHelper::Se...
Radvd application helper.
Ptr< RadvdInterface > GetRadvdInterface(uint32_t interface)
Get the low-level RadvdInterface specification for an interface.
RadvdPrefixList GetPrefixes() const
Get list of prefixes advertised for this interface.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
void Start(Time start)
Arrange for all of the Applications in this container to Start() at the Time given as a parameter.
Time Seconds(double value)
Construct a Time in the indicated unit.
holds a vector of ns3::Application pointers.
AttributeValue implementation for Time.
ApplicationContainer Install(Ptr< Node > node)
Install the application in a Node.
keep track of a set of node pointers.
int32_t GetInterfaceForDevice(Ptr< const NetDevice > device) const
Get interface index which is on a specified net device.
void CheckRouting(Ptr< NetDevice > n0Dev, Ptr< NetDevice > r0Dev, Ptr< NetDevice > r1Dev, Ptr< NetDevice > n1Dev)
Checks the routing between the selected NetDevices.
void CheckAddresses(Ptr< NetDevice > n0Dev, Ptr< NetDevice > r0Dev, Ptr< NetDevice > r1Dev, Ptr< NetDevice > n1Dev)
Checks the addresses on the selected NetDevices.
uint32_t GetInterfaceIndex(uint32_t i) const
Get the interface index for the specified node index.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Describes an IPv6 prefix.
aggregate IP/TCP/UDP functionality to existing Nodes.
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
void SetOnLinkFlag(bool onLinkFlag)
Set on-link flag.