|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
19 #include "ns3/ipv6-address-helper.h"
20 #include "ns3/ipv6-address-generator.h"
21 #include "ns3/ipv4-address-helper.h"
22 #include "ns3/simple-net-device.h"
23 #include "ns3/net-device-container.h"
24 #include "ns3/node-container.h"
25 #include "ns3/internet-stack-helper.h"
44 virtual void DoRun (
void);
45 virtual void DoTeardown (
void);
49 :
TestCase (
"IpAddressHelper Ipv6 test case")
125 n.Get (0)->AddDevice (s1);
129 n.Get (1)->AddDevice (s2);
142 d1addr =
n.Get (0)->GetObject <
Ipv6> ()->GetAddress (1, 1);
146 d2addr =
n.Get (1)->GetObject <
Ipv6> ()->GetAddress (1, 1);
157 Simulator::Destroy ();
174 :
TestSuite (
"ipv6-address-helper", UNIT)
holds a vector of ns3::NetDevice pointers
IPv6 address associated with an interface.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ipv6Address GetAddress() const
Get the IPv6 address.
Ipv6AddressHelperTestSuite()
virtual ~IpAddressHelperTestCasev6()
Describes an IPv6 address.
void Reset(void)
Reset the initial value of every attribute as well as the value of every global to what they were bef...
void SetBase(Ipv6Address network, Ipv6Prefix prefix, Ipv6Address base=Ipv6Address("::1"))
Set the base network number, network prefix, and base interface ID.
static Ipv6AddressHelperTestSuite ipv6AddressHelperTestSuite
Static variable for test initialization.
Helper class to auto-assign global IPv6 unicast addresses.
virtual void SetAddress(Address address)
Set the address of this interface.
Ipv6InterfaceContainer Assign(const NetDeviceContainer &c)
Allocate an Ipv6InterfaceContainer with auto-assigned addresses.
Smart pointer class similar to boost::intrusive_ptr.
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
virtual void DoRun(void)
Implementation to actually run this TestCase.
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase.
Ipv6Address GetAddress(uint32_t i, uint32_t j) const
Get the address for the specified index.
void NewNetwork(void)
Allocate a new network.
Keep track of a set of IPv6 interfaces.
IpAddressHelperTestCasev6()
#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.
Ipv6Address NewAddress(Address addr)
Allocate a new Ipv6Address.
keep track of a set of node pointers.
Access to the IPv6 forwarding table, interfaces, and configuration.
void SetIpv4StackInstall(bool enable)
Enable/disable IPv4 stack install.
Describes an IPv6 prefix.
aggregate IP/TCP/UDP functionality to existing Nodes.
IPv6 AddressHelper TestSuite.
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.