9#include "ns3/boolean.h"
10#include "ns3/icmpv6-l4-protocol.h"
11#include "ns3/inet6-socket-address.h"
12#include "ns3/internet-stack-helper.h"
13#include "ns3/ipv6-address-helper.h"
14#include "ns3/ipv6-l3-protocol.h"
15#include "ns3/ipv6-routing-helper.h"
16#include "ns3/ipv6-static-routing.h"
19#include "ns3/simple-channel.h"
20#include "ns3/simple-net-device-helper.h"
21#include "ns3/simple-net-device.h"
22#include "ns3/simulator.h"
23#include "ns3/socket-factory.h"
24#include "ns3/socket.h"
26#include "ns3/udp-l4-protocol.h"
27#include "ns3/udp-socket-factory.h"
57 void DoRun()
override;
79 "Received packet size is not equal to Rx buffer size");
143 device =
net1.Get(0);
144 ifIndex = ipv6->GetInterfaceForDevice(device);
146 ipv6->AddAddress(ifIndex,
ipv6Addr);
149 device =
net1.Get(1);
150 ifIndex = ipv6->GetInterfaceForDevice(device);
152 ipv6->AddAddress(ifIndex,
ipv6Addr);
154 device =
net2.Get(0);
155 ifIndex = ipv6->GetInterfaceForDevice(device);
157 ipv6->AddAddress(ifIndex,
ipv6Addr);
160 device =
net2.Get(1);
161 ifIndex = ipv6->GetInterfaceForDevice(device);
163 ipv6->AddAddress(ifIndex,
ipv6Addr);
Ptr< Packet > m_receivedPacket
Received packet.
void DoSendData(Ptr< Socket > socket, std::string to)
Send data.
void SendData(Ptr< Socket > socket, std::string to)
Send data.
void DoRun() override
Implementation to actually run this TestCase.
void ReceivePkt(Ptr< Socket > socket)
Receive data.
IPv6 Forwarding TestSuite.
Ipv6ForwardingTestSuite()
a polymophic address class
AttributeValue implementation for Boolean.
An implementation of the ICMPv6 protocol.
aggregate IP/TCP/UDP functionality to existing Nodes.
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
Helper class to auto-assign global IPv6 unicast addresses.
Describes an IPv6 address.
Access to the IPv6 forwarding table, interfaces, and configuration.
virtual Ptr< Ipv6RoutingProtocol > GetRoutingProtocol() const =0
Get the routing protocol to be used by this IPv6 stack.
IPv6 address associated with an interface.
Keep track of a set of IPv6 interfaces.
Describes an IPv6 prefix.
virtual Ptr< Ipv6RoutingProtocol > Create(Ptr< Node > node) const =0
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
Smart pointer class similar to boost::intrusive_ptr.
build a set of SimpleNetDevice objects
void SetNetDevicePointToPointMode(bool pointToPointMode)
SimpleNetDevice is Broadcast capable and ARP needing.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static void ScheduleWithContext(uint32_t context, const Time &delay, FUNC f, Ts &&... args)
Schedule an event with the given context.
static void Run()
Run the simulation.
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
static constexpr auto UNIT
API to create UDP socket instances.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
#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.
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
Time Seconds(double value)
Construct a Time in the indicated unit.
static Ipv6ForwardingTestSuite g_ipv6forwardingTestSuite
Static variable for test initialization.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...