32 #define NS_LOG_APPEND_CONTEXT \
33 if (GetObject<Node> ()) { std::clog << "[node " << GetObject<Node> ()->GetId () << "] "; }
41 #include "ns3/assert.h"
42 #include "ns3/fatal-error.h"
44 #include "ns3/uinteger.h"
45 #include "ns3/trace-source-accessor.h"
46 #include "ns3/udp-header.h"
47 #include "ns3/pointer.h"
48 #include "ns3/node-list.h"
49 #include "ns3/uinteger.h"
50 #include "ns3/object-vector.h"
51 #include "ns3/ipv4-l3-protocol.h"
52 #include "ns3/ipv4-interface.h"
53 #include "ns3/ipv4-header.h"
54 #include "ns3/ipv4-address.h"
55 #include "ns3/ipv4-route.h"
56 #include "ns3/icmpv4-l4-protocol.h"
57 #include "ns3/ip-l4-protocol.h"
75 .AddAttribute (
"OptionNumber",
"The Dsr option number.",
78 MakeUintegerChecker<uint8_t> ())
79 .AddTraceSource (
"Rx",
"Receive DSR packet.",
110 std::vector<Ipv4Address>::iterator it = find (nodeList.begin (), nodeList.end (), destAddress);
112 for (std::vector<Ipv4Address>::iterator i = it; i != nodeList.end (); ++i)
114 if ((ipv4Address == (*i)) && ((*i) != nodeList.back ()))
122 std::vector<Ipv4Address>
126 std::vector<Ipv4Address>::iterator it = find (nodeList.begin (), nodeList.end (), ipv4Address);
127 std::vector<Ipv4Address> cutRoute;
128 for (std::vector<Ipv4Address>::iterator i = it; i != nodeList.end (); ++i)
130 cutRoute.push_back (*i);
148 std::vector<Ipv4Address> vec2 (vec);
150 for (std::vector<Ipv4Address>::reverse_iterator ri = vec2.rbegin (); ri
151 != vec2.rend (); ++ri)
156 if ((vec.size () == vec2.size ()) && (vec.front () == vec2.back ()))
168 if (vec.size () == 2)
176 if (ipv4Address == vec.back ())
178 NS_LOG_DEBUG (
"We have reached to the final destination " << ipv4Address <<
" " << vec.back ());
181 for (std::vector<Ipv4Address>::const_iterator i = vec.begin (); i != vec.end (); ++i)
183 if (ipv4Address == (*i))
190 NS_LOG_DEBUG (
"next hop address not found, route corrupted");
199 if (vec.size () == 2)
207 for (std::vector<Ipv4Address>::reverse_iterator ri = vec.rbegin (); ri != vec.rend (); ++ri)
209 if (ipv4Address == (*ri))
216 NS_LOG_DEBUG (
"next hop address not found, route corrupted");
227 for (std::vector<Ipv4Address>::reverse_iterator ri = vec.rbegin (); ri != vec.rend (); ++ri)
229 if (ipv4Address == (*ri))
231 nextTwoHop = *(ri + 2);
253 for (std::vector<Ipv4Address>::const_iterator i = vec.begin (); i != vec.end (); ++i)
263 for (std::vector<Ipv4Address>::const_iterator i = vec.begin (); i != vec.end (); ++i)
265 for (std::vector<Ipv4Address>::const_iterator j = vec2.begin (); j != vec2.end (); ++j)
283 for (std::vector<Ipv4Address>::const_iterator i = vec.begin (); i != vec.end (); ++i)
285 if ((*i) == ipv4Address)
301 std::vector<Ipv4Address> vec2 (vec);
304 for (std::vector<Ipv4Address>::const_iterator i = vec2.begin (); i != vec2.end (); ++i)
313 for (std::vector<Ipv4Address>::iterator j = vec.begin (); j != vec.end (); ++j)
317 if ((j + 1) != vec.end ())
319 vec.erase (j + 1, vec.end ());
327 else if (j == (vec.end () - 1))
346 for (int32_t i = 0; i < nNodes; ++i)
350 if (ipv4->GetAddress (1, 0).GetLocal () ==
address)
362 for (int32_t i = 0; i < nNodes; ++i)
366 int32_t ifIndex = ipv4->GetInterfaceForAddress (ipv4Address);
382 .AddConstructor<DsrOptionPad1> ()
406 NS_LOG_FUNCTION (
this << packet << dsrP << ipv4Address << source << ipv4Header << (uint32_t)protocol << isPromisc);
423 .AddConstructor<DsrOptionPadn> ()
446 NS_LOG_FUNCTION (
this << packet << dsrP << ipv4Address << source << ipv4Header << (uint32_t)protocol << isPromisc);
464 .AddConstructor<DsrOptionRreq> ()
493 NS_LOG_FUNCTION (
this << packet << dsrP << ipv4Address << source << ipv4Header << (uint32_t)protocol << isPromisc);
500 if (srcAddress == ipv4Address)
519 uint8_t numberAddress = (buf[1] - 6) / 4;
520 NS_LOG_DEBUG (
"The number of Ip addresses " << (uint32_t)numberAddress);
521 if (numberAddress >= 255)
523 NS_LOG_DEBUG (
"Discard the packet, malformed header since two many ip addresses in route");
537 p->RemoveHeader (rreq);
547 uint16_t requestId = rreq.
GetId ();
552 std::vector<Ipv4Address> nodeList (mainVector);
570 uint8_t ttl = ipv4Header.
GetTtl ();
571 bool dupRequest =
false;
576 dupRequest = dsr->FindSourceEntry (sourceAddress, targetAddress, requestId);
599 NS_LOG_DEBUG (
"Our node address is already seen in the route, drop the request");
617 NS_LOG_DEBUG (
"The target address over here " << targetAddress <<
" and the ip address " << ipv4Address <<
" and the source address " << mainVector[0]);
618 if (targetAddress == ipv4Address)
621 if (nodeList.size () == 1)
627 nextHop = srcAddress;
631 std::vector<Ipv4Address> changeRoute (nodeList);
632 changeRoute.push_back (ipv4Address);
634 for (std::vector<Ipv4Address>::iterator i = changeRoute.begin (); i != changeRoute.end (); ++i)
662 dsr->ScheduleInitialReply (newPacket, ipv4Address, nextHop,
m_ipv4Route);
671 bool addRoute =
false;
672 if (numberAddress > 0)
676 if (dsr->IsLinkCache ())
678 addRoute = dsr->AddRoute_Link (
m_finalRoute, ipv4Address);
682 addRoute = dsr->AddRoute (toSource);
699 if (dsr->IsLinkCache ())
709 if (nextHop ==
"0.0.0.0")
711 dsr->PacketNewRoute (dsrP, ipv4Address, dst, protocol);
718 dsr->SendPacketFromBuffer (sourceRoute, nextHop, protocol);
720 dsr->CancelRreqTimer (dst,
true);
742 else if (dsr->LookupRoute (targetAddress, toPrev))
746 std::vector<Ipv4Address> saveRoute (nodeList);
756 for (std::vector<Ipv4Address>::iterator i = saveRoute.begin (); i != saveRoute.end (); ++i)
763 for (std::vector<Ipv4Address>::iterator j = ip.begin (); j != ip.end (); ++j)
770 bool addRoute =
false;
775 saveRoute.push_back (ipv4Address);
782 NS_ASSERT (saveRoute.front () == ipv4Address);
784 if (dsr->IsLinkCache ())
786 addRoute = dsr->AddRoute_Link (saveRoute, ipv4Address);
790 addRoute = dsr->AddRoute (toSource);
795 NS_LOG_LOGIC (
"We have added the route and search send buffer for packet with destination " << dst);
803 if (dsr->IsLinkCache ())
805 dsr->UseExtends (saveRoute);
813 if (nextHop ==
"0.0.0.0")
815 dsr->PacketNewRoute (dsrP, ipv4Address, dst, protocol);
822 dsr->SendPacketFromBuffer (sourceRoute, nextHop, protocol);
824 dsr->CancelRreqTimer (dst,
true);
862 dsrRoutingHeader.SetMessageType (1);
863 dsrRoutingHeader.SetSourceId (
GetIDfromIP (realSource));
864 dsrRoutingHeader.SetDestId (255);
867 dsrRoutingHeader.SetPayloadLength (length + 2);
868 dsrRoutingHeader.AddDsrOption (rrep);
871 dsr->ScheduleCachedReply (newPacket, ipv4Address, nextHop,
m_ipv4Route, hops);
876 NS_LOG_DEBUG (
"There is duplicate ip addresses in the two route parts");
885 mainVector.push_back (ipv4Address);
886 NS_ASSERT (mainVector.front () == source);
896 p->RemoveHeader (rerr);
901 if ((errorSrc == srcAddress) && (unreachNode == ipv4Address))
911 dsr->DeleteAllRoutesIncludeLink (errorSrc, unreachNode, ipv4Address);
920 NS_LOG_DEBUG (
"The RREQ and newUnreach header length " << length);
934 uint8_t ttl = ipv4Header.
GetTtl ();
947 dsr->ScheduleInterRequest (interP);
963 .AddConstructor<DsrOptionRrep> ()
992 NS_LOG_FUNCTION (
this << packet << dsrP << ipv4Address << source << ipv4Header << (uint32_t)protocol << isPromisc);
999 uint8_t numberAddress = (buf[1] - 2) / 4;
1008 NS_LOG_DEBUG (
"The next header value " << (uint32_t)protocol);
1016 if (targetAddress == ipv4Address)
1020 if (nodeList.size () == 0)
1035 NS_ASSERT (nodeList.front () == ipv4Address);
1036 bool addRoute =
false;
1037 if (dsr->IsLinkCache ())
1039 addRoute = dsr->AddRoute_Link (nodeList, ipv4Address);
1043 addRoute = dsr->AddRoute (toDestination);
1048 NS_LOG_DEBUG (
"We have added the route and search send buffer for packet with destination " << dst);
1053 NS_LOG_DEBUG (
"The route length " << nodeList.size ());
1059 if (nextHop ==
"0.0.0.0")
1061 dsr->PacketNewRoute (dsrP, ipv4Address, dst, protocol);
1067 dsr->CancelRreqTimer (dst,
true);
1071 dsr->SendPacketFromBuffer (sourceRoute, nextHop, protocol);
1082 NS_LOG_DEBUG (
"The length of rrep option " << (uint32_t)length);
1084 if (length % 2 != 0)
1094 std::vector<Ipv4Address> routeCopy = nodeList;
1095 std::vector<Ipv4Address> cutRoute =
CutRoute (ipv4Address, nodeList);
1097 if (cutRoute.size () >= 2)
1100 NS_LOG_DEBUG (
"The route destination after cut " << dst);
1102 NS_ASSERT (cutRoute.front () == ipv4Address);
1103 bool addRoute =
false;
1104 if (dsr->IsLinkCache ())
1106 addRoute = dsr->AddRoute_Link (nodeList, ipv4Address);
1110 addRoute = dsr->AddRoute (toDestination);
1114 dsr->CancelRreqTimer (dst,
true);
1129 NS_ASSERT (routeCopy.back () == source);
1131 NS_LOG_DEBUG (
"The nextHop address " << nextHop <<
" and the source in the route reply " << source);
1143 NS_LOG_DEBUG (
"The reply header length " << (uint32_t)length);
1150 newPacket->
AddHeader (dsrRoutingHeader);
1151 dsr->SendReply (newPacket, ipv4Address, nextHop,
m_ipv4Route);
1164 .AddConstructor<DsrOptionSR> ()
1192 NS_LOG_FUNCTION (
this << packet << dsrP << ipv4Address << source << ipv4Address << ipv4Header << (uint32_t)protocol << isPromisc);
1197 uint8_t numberAddress = (buf[1] - 2) / 4;
1226 NS_LOG_LOGIC (
"We process promiscuous receipt data packet");
1230 dsr->SendGratuitousReply (source, srcAddress, nodeList, protocol);
1236 if (destAddress != destination)
1238 NS_LOG_DEBUG (
"Process the promiscuously received packet");
1239 bool findPassive =
false;
1241 for (int32_t i = 0; i < nNodes; ++i)
1248 findPassive = dsrNode->PassiveEntryCheck (packet, source, destination, segsLeft, fragmentOffset, identification,
false);
1257 NS_LOG_DEBUG (
"We find one previously received passive entry");
1267 dsrSrc->CancelPassiveTimer (packet, source, destination, segsLeft);
1272 dsr->PassiveEntryCheck (packet, source, destination, segsLeft, fragmentOffset, identification,
true);
1283 uint8_t length = sourceRoute.
GetLength ();
1284 uint8_t nextAddressIndex;
1288 uint32_t size = p->
GetSize ();
1289 uint8_t *
data =
new uint8_t[size];
1291 uint8_t optionType = 0;
1292 optionType = *(
data);
1295 if (optionType == 160)
1297 NS_LOG_LOGIC (
"Remove the ack request header and add ack header to the packet");
1301 uint16_t ackId = ackReq.
GetAckId ();
1308 if (!nodeList.empty ())
1310 if (segsLeft > numberAddress)
1316 if (numberAddress - segsLeft - 2 < 0)
1322 ackAddress = nodeList[numberAddress - segsLeft - 2];
1325 NS_LOG_DEBUG (
"Send back ACK to the earlier hop " << ackAddress <<
" from us " << ipv4Address);
1326 dsr->SendAck (ackId, ackAddress, source, destination, protocol,
m_ipv4Route);
1339 if (length % 2 != 0)
1346 if (segsLeft > numberAddress)
1357 nextAddressIndex = numberAddress - segsLeft;
1359 NS_LOG_DEBUG (
"The next address of source route option " << nextAddress <<
" and the nextAddressIndex: " << (uint32_t)nextAddressIndex <<
" and the segments left : " << (uint32_t)segsLeft);
1371 if (nextHop ==
"0.0.0.0")
1374 dsr->PacketNewRoute (dsrP, realSource, targetAddress, protocol);
1378 if (ipv4Address == nextHop)
1391 SetRoute (nextAddress, ipv4Address);
1393 dsr->ForwardPacket (dsrP, newSourceRoute, ipv4Header, realSource, nextAddress, targetAddress, protocol,
m_ipv4Route);
1405 .AddConstructor<DsrOptionRerr> ()
1433 NS_LOG_FUNCTION (
this << packet << dsrP << ipv4Address << source << ipv4Header << (uint32_t)protocol << isPromisc);
1435 uint32_t size = p->
GetSize ();
1436 uint8_t *
data =
new uint8_t[size];
1438 uint8_t errorType = *(data + 2);
1448 NS_LOG_DEBUG (
"The error type value here " << (uint32_t)errorType);
1462 NS_LOG_DEBUG (
"The error source is " << rerrUnreach.
GetErrorDst () <<
"and the unreachable node is " << unreachAddress);
1471 dsr->DeleteAllRoutesIncludeLink (errorSource, unreachAddress, ipv4Address);
1474 uint32_t serialized =
DoSendError (newP, rerrUnreach, rerrSize, ipv4Address, protocol);
1493 uint32_t serialized = 0;
1503 uint8_t numberAddress = (buf[1] - 2) / 4;
1506 NS_LOG_DEBUG (
"The number of addresses " << (uint32_t)numberAddress);
1520 uint8_t length = sourceRoute.
GetLength ();
1521 uint8_t nextAddressIndex;
1533 if (length % 2 != 0)
1540 if (segmentsLeft > numberAddress)
1549 if (segmentsLeft == 0 && targetAddress == ipv4Address)
1551 NS_LOG_INFO (
"This is the destination of the error, send error request");
1552 dsr->SendErrorRequest (rerr, protocol);
1553 return serializedSize;
1559 nextAddressIndex = numberAddress - segmentsLeft;
1569 return serializedSize;
1573 SetRoute (nextAddress, ipv4Address);
1574 dsr->ForwardErrPacket (rerr, newSourceRoute, nextAddress, protocol,
m_ipv4Route);
1575 return serializedSize;
1583 static TypeId tid =
TypeId (
"ns3::dsr::DsrOptionAckReq")
1585 .AddConstructor<DsrOptionAckReq> ()
1613 NS_LOG_FUNCTION (
this << packet << dsrP << ipv4Address << source << ipv4Header << (uint32_t)protocol << isPromisc);
1629 NS_LOG_DEBUG (
"The next header value " << (uint32_t)protocol);
1641 .AddConstructor<DsrOptionAck> ()
1669 NS_LOG_FUNCTION (
this << packet << dsrP << ipv4Address << source << ipv4Header << (uint32_t)protocol << isPromisc);
1687 dsr->UpdateRouteEntry (realDst);
1691 dsr->CallCancelPacketTimer (ackId, ipv4Header, realSrc, realDst);
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
static const uint8_t OPT_NUMBER
Dsr Route Error option number.
virtual uint8_t Process(Ptr< Packet > packet, Ptr< Packet > dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const &ipv4Header, uint8_t protocol, bool &isPromisc, Ipv4Address promiscSource)
Process method.
virtual uint8_t GetOptionNumber() const
Get the option number.
static const uint8_t OPT_NUMBER
Rreq option number.
#define NS_LOG_FUNCTION(parameters)
static uint32_t GetNNodes(void)
static const uint8_t OPT_NUMBER
Dsr ack request option number.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
static TypeId GetTypeId()
static Ptr< Node > GetNode(uint32_t n)
Doxygen introspection did not find any typical Config paths.
static TypeId GetTypeId()
void AddPacketTag(const Tag &tag) const
Add a packet tag.
virtual uint8_t GetOptionNumber() const =0
Get the option number.
#define NS_ASSERT(condition)
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
virtual uint8_t Process(Ptr< Packet > packet, Ptr< Packet > dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const &ipv4Header, uint8_t protocol, bool &isPromisc, Ipv4Address promiscSource)
Process method.
uint32_t GetSize(void) const
bool IsMulticast(void) const
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
virtual uint8_t Process(Ptr< Packet > packet, Ptr< Packet > dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const &ipv4Header, uint8_t protocol, bool &isPromisc, Ipv4Address promiscSource)
Process method.
Doxygen introspection did not find any typical Config paths.
This class implements a tag that carries the socket-specific TTL of a packet to the IP layer...
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
void SetNode(Ptr< Node > node)
Set the node.
static const uint8_t OPT_NUMBER
Pad1 option number.
uint8_t DoSendError(Ptr< Packet > p, DsrOptionRerrUnreachHeader &rerr, uint32_t rerrSize, Ipv4Address ipv4Address, uint8_t protocol)
Do Send error message.
uint32_t GetIDfromIP(Ipv4Address address)
Get the node id with Ipv4Address.
#define NS_FATAL_ERROR(msg)
fatal error handling
void SetSource(Ipv4Address src)
virtual uint8_t GetOptionNumber() const
Get the option number.
void SetTtl(uint8_t ttl)
Set the tag's TTL.
Doxygen introspection did not find any typical Config paths.
static TypeId GetTypeId()
void SetGateway(Ipv4Address gw)
Hold an unsigned integer type.
DsrOptionRreq()
Constructor.
std::vector< Ipv4Address > IP_VECTOR
Define the vector to hold Ip address.
Ipv4Address ReverseSearchNextTwoHop(Ipv4Address ipv4Address, std::vector< Ipv4Address > &vec)
Reverse search for the next two hop in the route.
virtual uint8_t Process(Ptr< Packet > packet, Ptr< Packet > dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const &ipv4Header, uint8_t protocol, bool &isPromisc, Ipv4Address promiscSource)
Process method.
TracedCallback< Ptr< const Packet > > m_dropTrace
Drop trace callback.
static const uint8_t OPT_NUMBER
Router alert option number.
static TypeId GetTypeId()
NS_LOG_COMPONENT_DEFINE("DsrOptions")
virtual uint8_t Process(Ptr< Packet > packet, Ptr< Packet > dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const &ipv4Header, uint8_t protocol, bool &isPromisc, Ipv4Address promiscSource)
Process method.
static const uint8_t OPT_NUMBER
PadN option number.
#define NS_LOG_LOGIC(msg)
virtual ~DsrOptionRreq()
Destructor.
std::vector< Ipv4Address > m_finalRoute
The vector of final Ipv4 address.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
Access to the Ipv4 forwarding table, interfaces, and configuration.
Ptr< Packet > Copy(void) const
void RemoveDuplicates(std::vector< Ipv4Address > &vec)
Remove the duplicates from the route.
Time ActiveRouteTimeout
The active route timeout value.
void PrintVector(std::vector< Ipv4Address > &vec)
Print out the elements in the route vector.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
static const uint8_t OPT_NUMBER
The Dsr Ack option number.
Ipv4Address SearchNextHop(Ipv4Address ipv4Address, std::vector< Ipv4Address > &vec)
Search for the next hop in the route.
Doxygen introspection did not find any typical Config paths.
IP_VECTOR GetVector() const
TracedCallback< const DsrOptionSRHeader & > m_rxPacketTrace
The receive trace back, only triggered when final destination receive data packet.
static TypeId GetTypeId()
virtual ~DsrOptions()
Destructor.
Ipv4 addresses are stored in host order in this class.
virtual uint8_t Process(Ptr< Packet > packet, Ptr< Packet > dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const &ipv4Header, uint8_t protocol, bool &isPromisc, Ipv4Address promiscSource)
Process method.
static TypeId GetTypeId()
Doxygen introspection did not find any typical Config paths.
Doxygen introspection did not find any typical Config paths.
void AddDsrOption(DsrOptionHeader const &option)
Serialize the option, prepending pad1 or padn option as necessary.
bool CheckDuplicates(Ipv4Address ipv4Address, std::vector< Ipv4Address > &vec)
Check if the route already contains the node ip address.
bool ReverseRoutes(std::vector< Ipv4Address > &vec)
Reverse the routes.
virtual uint8_t Process(Ptr< Packet > packet, Ptr< Packet > dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const &ipv4Header, uint8_t protocol, bool &isPromisc, Ipv4Address promiscSource)
Process method.
#define NS_LOG_DEBUG(msg)
Ptr< Ipv4Route > m_ipv4Route
The ipv4 route.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
Ipv4Address ReverseSearchNextHop(Ipv4Address ipv4Address, std::vector< Ipv4Address > &vec)
Reverse search for the next hop in the route.
virtual ~DsrOptionAckReq()
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
static TypeId GetTypeId(void)
Get the type identificator.
bool ContainAddressAfter(Ipv4Address ipv4Address, Ipv4Address destAddress, std::vector< Ipv4Address > &nodeList)
Search for the ipv4 address in the node list.
virtual uint8_t GetOptionNumber() const
Get the option number.
virtual uint8_t GetOptionNumber() const
Get the option number.
virtual uint8_t GetOptionNumber() const
Get the option number.
Doxygen introspection did not find any typical Config paths.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
uint32_t CopyData(uint8_t *buffer, uint32_t size) const
Copy the packet contents to a byte buffer.
static const uint8_t OPT_NUMBER
Source Route option number.
Doxygen introspection did not find any typical Config paths.
virtual uint8_t GetOptionNumber() const
Get the option number.
a base class which provides memory management and object aggregation
Doxygen introspection did not find any typical Config paths.
Ptr< Node > GetNode() const
Get the node.
virtual Ptr< Ipv4Route > SetRoute(Ipv4Address nextHop, Ipv4Address srcAddress)
Set the route to use for data packets, used by the option headers when sending data/control packets...
bool IfDuplicates(std::vector< Ipv4Address > &vec, std::vector< Ipv4Address > &vec2)
Check if the two vectors contain duplicate or not.
Ptr< Node > GetNodeWithAddress(Ipv4Address ipv4Address)
Get the node object with Ipv4Address.
static TypeId GetTypeId()
virtual uint8_t Process(Ptr< Packet > packet, Ptr< Packet > dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const &ipv4Header, uint8_t protocol, bool &isPromisc, Ipv4Address promiscSource)
Process method.
Ptr< T > GetObject(void) const
Doxygen introspection did not find any typical Config paths.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
void AddHeader(const Header &header)
Add header to this packet.
void SetDestination(Ipv4Address dest)
std::vector< Ipv4Address > CutRoute(Ipv4Address ipv4Address, std::vector< Ipv4Address > &nodeList)
Cut the route from ipv4Address to the end of the route vector.
virtual uint8_t GetOptionNumber() const
Get the option number.
static TypeId GetTypeId()
virtual uint8_t GetOptionNumber() const
Get the option number.