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::Application pointers.
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
Smart pointer class similar to boost::intrusive_ptr.
Ptr< RadvdInterface > GetRadvdInterface(uint32_t interface)
Get the low-level RadvdInterface specification for an interface.
Ptr< Ipv6RoutingProtocol > GetRoutingProtocol() const
Get current routing protocol used.
Keep track of a set of IPv6 interfaces.
IPv6 layer implementation.
std::vector< Socket::SocketErrno > m_routingResults
Routing call return values.
void Add(Ptr< Ipv6 > ipv6, uint32_t interface)
Add a couple IPv6/interface.
void SetChannelAttribute(std::string n1, const AttributeValue &v1)
virtual Ptr< Node > GetNode(void) const =0
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
aggregate IP/TCP/UDP functionality to existing Nodes.
void SetBase(Ipv6Address network, Ipv6Prefix prefix, Ipv6Address base=Ipv6Address("::1"))
Set the base network number, network prefix, and base interface ID.
ApplicationContainer Install(Ptr< Node > node)
Install the application in a Node.
SocketErrno
Enumeration of the possible errors returned by a socket.
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.
Ipv6InterfaceContainer Assign(const NetDeviceContainer &c)
Allocate an Ipv6InterfaceContainer with auto-assigned addresses.
Class for representing data rates.
void CheckRouting(Ptr< NetDevice > n0Dev, Ptr< NetDevice > r0Dev, Ptr< NetDevice > r1Dev, Ptr< NetDevice > n1Dev)
Checks the routing between the selected NetDevices.
AttributeValue implementation for Time.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
void SetOnLinkFlag(bool onLinkFlag)
Set on-link flag.
Ipv6InterfaceAddress GetAddress(uint32_t interfaceIndex, uint32_t addressIndex) const
Get an address.
#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.
holds a vector of ns3::NetDevice pointers
void SetDeviceAttribute(std::string n1, const AttributeValue &v1)
uint32_t GetInterfaceIndex(uint32_t i) const
Get the interface index for the specified node index.
void CheckAddresses(Ptr< NetDevice > n0Dev, Ptr< NetDevice > r0Dev, Ptr< NetDevice > r1Dev, Ptr< NetDevice > n1Dev)
Checks the addresses on the selected NetDevices.
void Start(Time start)
Arrange for all of the Applications in this container to Start() at the Time given as a parameter...
virtual void DoRun(void)
Implementation to actually run this TestCase.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
void AddAnnouncedPrefix(uint32_t interface, Ipv6Address prefix, uint32_t prefixLength)
Add a new prefix to be announced through an interface.
Helper class to auto-assign global IPv6 unicast addresses.
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
Radvd application helper.
Describes an IPv6 address.
void Stop(Time stop)
Arrange for all of the Applications in this container to Stop() at the Time given as a parameter...
AttributeValue implementation for DataRate.
Ipv6InterfaceContainer AssignWithoutOnLink(const NetDeviceContainer &c)
Allocate an Ipv6InterfaceContainer with auto-assigned addresses, but do not set the on-link property ...
Time Seconds(double value)
Construct a Time in the indicated unit.
std::vector< Ptr< Ipv6Route > > m_routes
Routing call results.
int32_t GetInterfaceForDevice(Ptr< const NetDevice > device) const
Get interface index which is on a specified net device.
Describes an IPv6 prefix.
build a set of SimpleNetDevice objects
Ipv6InterfaceContainer AssignWithoutAddress(const NetDeviceContainer &c)
Allocate an Ipv6InterfaceContainer but do not assign any IPv6 addresses.
NetDeviceContainer Install(Ptr< Node > node) const
This method creates an ns3::SimpleChannel with the attributes configured by SimpleNetDeviceHelper::Se...
static RadvdTestSuite radvdTestSuite
Static variable for test initialization.
std::vector< Ipv6Address > m_addresses
Addresses on the nodes.