26 #include "ns3/ipv6-address.h"
27 #include "ns3/ipv6-packet-info-tag.h"
29 #include "ns3/abort.h"
30 #include "ns3/attribute.h"
31 #include "ns3/simple-net-device.h"
32 #include "ns3/object-factory.h"
33 #include "ns3/socket-factory.h"
34 #include "ns3/udp-socket-factory.h"
35 #include "ns3/udp-socket.h"
36 #include "ns3/ipv6-l3-protocol.h"
37 #include "ns3/ipv6-raw-socket-factory.h"
38 #include "ns3/ipv6-interface.h"
39 #include "ns3/icmpv6-l4-protocol.h"
40 #include "ns3/ipv6-static-routing.h"
41 #include "ns3/ipv6-list-routing.h"
42 #include "ns3/inet6-socket-address.h"
43 #include "ns3/simulator.h"
44 #include "ns3/uinteger.h"
45 #include "ns3/boolean.h"
76 virtual void DoRun (
void);
78 void DoSendData (
Ptr<Socket> socket, std::string to);
89 uint32_t availableData;
93 m_receivedPacket = socket->
Recv (std::numeric_limits<uint32_t>::max (), 0);
106 if (DynamicCast<UdpSocket> (socket) != 0)
114 socket->
SendTo (Create<Packet> (123), 0, realTo);
140 node1->AddDevice (device2);
155 socket->SetAttribute (
"Protocol",
UintegerValue (Ipv6Header::IPV6_ICMPV6));
156 socket->Bind (local);
157 socket->SetRecvPktInfo (
true);
161 Simulator::ScheduleWithContext (socket->GetNode ()->GetId (),
Seconds (0),
167 std::stringstream dst;
169 Simulator::ScheduleWithContext (socket2->GetNode ()->GetId (),
Seconds (0),
174 #ifdef UDP6_SUPPORTED
179 socket->Bind (local);
180 socket->SetRecvPktInfo (
true);
184 Simulator::ScheduleWithContext (socket->GetNode ()->GetId (),
Seconds (0),
190 Simulator::ScheduleWithContext (socket2->GetNode ()->GetId (),
Seconds (0),
194 #endif // UDP6_SUPPORTED
196 Simulator::Destroy ();
208 :
TestSuite (
"ipv6-packet-info-tag", UNIT)