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 (
"Drop",
82 "ns3::Packet::TracedCallback")
83 .AddTraceSource (
"Rx",
84 "Receive DSR packet.",
86 "ns3::Packet::TracedCallback")
116 std::vector<Ipv4Address>::iterator it = find (nodeList.begin (), nodeList.end (), destAddress);
118 for (std::vector<Ipv4Address>::iterator i = it; i != nodeList.end (); ++i)
120 if ((ipv4Address == (*i)) && ((*i) != nodeList.back ()))
128 std::vector<Ipv4Address>
132 std::vector<Ipv4Address>::iterator it = find (nodeList.begin (), nodeList.end (), ipv4Address);
133 std::vector<Ipv4Address> cutRoute;
134 for (std::vector<Ipv4Address>::iterator i = it; i != nodeList.end (); ++i)
136 cutRoute.push_back (*i);
154 std::vector<Ipv4Address> vec2 (vec);
156 for (std::vector<Ipv4Address>::reverse_iterator ri = vec2.rbegin (); ri
157 != vec2.rend (); ++ri)
162 if ((vec.size () == vec2.size ()) && (vec.front () == vec2.back ()))
174 if (vec.size () == 2)
182 if (ipv4Address == vec.back ())
184 NS_LOG_DEBUG (
"We have reached to the final destination " << ipv4Address <<
" " << vec.back ());
187 for (std::vector<Ipv4Address>::const_iterator i = vec.begin (); i != vec.end (); ++i)
189 if (ipv4Address == (*i))
196 NS_LOG_DEBUG (
"next hop address not found, route corrupted");
205 if (vec.size () == 2)
213 for (std::vector<Ipv4Address>::reverse_iterator ri = vec.rbegin (); ri != vec.rend (); ++ri)
215 if (ipv4Address == (*ri))
222 NS_LOG_DEBUG (
"next hop address not found, route corrupted");
233 for (std::vector<Ipv4Address>::reverse_iterator ri = vec.rbegin (); ri != vec.rend (); ++ri)
235 if (ipv4Address == (*ri))
237 nextTwoHop = *(ri + 2);
259 for (std::vector<Ipv4Address>::const_iterator i = vec.begin (); i != vec.end (); ++i)
269 for (std::vector<Ipv4Address>::const_iterator i = vec.begin (); i != vec.end (); ++i)
271 for (std::vector<Ipv4Address>::const_iterator j = vec2.begin (); j != vec2.end (); ++j)
289 for (std::vector<Ipv4Address>::const_iterator i = vec.begin (); i != vec.end (); ++i)
291 if ((*i) == ipv4Address)
307 std::vector<Ipv4Address> vec2 (vec);
310 for (std::vector<Ipv4Address>::const_iterator i = vec2.begin (); i != vec2.end (); ++i)
319 for (std::vector<Ipv4Address>::iterator j = vec.begin (); j != vec.end (); ++j)
323 if ((j + 1) != vec.end ())
325 vec.erase (j + 1, vec.end ());
333 else if (j == (vec.end () - 1))
352 for (int32_t i = 0; i < nNodes; ++i)
356 if (ipv4->GetAddress (1, 0).GetLocal () ==
address)
368 for (int32_t i = 0; i < nNodes; ++i)
372 int32_t ifIndex = ipv4->GetInterfaceForAddress (ipv4Address);
387 .AddConstructor<DsrOptionPad1> ()
411 NS_LOG_FUNCTION (
this << packet << dsrP << ipv4Address << source << ipv4Header << (uint32_t)protocol << isPromisc);
427 .AddConstructor<DsrOptionPadn> ()
450 NS_LOG_FUNCTION (
this << packet << dsrP << ipv4Address << source << ipv4Header << (uint32_t)protocol << isPromisc);
467 .AddConstructor<DsrOptionRreq> ()
496 NS_LOG_FUNCTION (
this << packet << dsrP << ipv4Address << source << ipv4Header << (uint32_t)protocol << isPromisc);
503 if (source == ipv4Address)
505 NS_LOG_DEBUG (
"Discard the packet since it was originated from same source address");
522 uint8_t numberAddress = (buf[1] - 6) / 4;
523 NS_LOG_DEBUG (
"The number of Ip addresses " << (uint32_t)numberAddress);
524 if (numberAddress >= 255)
526 NS_LOG_DEBUG (
"Discard the packet, malformed header since two many ip addresses in route");
540 p->RemoveHeader (rreq);
550 uint16_t requestId = rreq.
GetId ();
555 std::vector<Ipv4Address> nodeList (mainVector);
573 uint8_t ttl = ipv4Header.
GetTtl ();
574 bool dupRequest =
false;
579 dupRequest = dsr->FindSourceEntry (sourceAddress, targetAddress, requestId);
602 NS_LOG_DEBUG (
"Our node address is already seen in the route, drop the request");
609 bool isRouteInCache = dsr->LookupRoute (targetAddress,
613 std::vector<Ipv4Address> saveRoute (nodeList);
628 NS_LOG_DEBUG (
"The target address over here " << targetAddress <<
" and the ip address " << ipv4Address <<
" and the source address " << mainVector[0]);
629 if (targetAddress == ipv4Address)
632 if (nodeList.size () == 1)
639 nextHop = srcAddress;
643 std::vector<Ipv4Address> changeRoute (nodeList);
644 changeRoute.push_back (ipv4Address);
646 for (std::vector<Ipv4Address>::iterator i = changeRoute.begin (); i != changeRoute.end (); ++i)
674 dsr->ScheduleInitialReply (newPacket, ipv4Address, nextHop,
m_ipv4Route);
683 bool addRoute =
false;
684 if (numberAddress > 0)
688 if (dsr->IsLinkCache ())
690 addRoute = dsr->AddRoute_Link (
m_finalRoute, ipv4Address);
694 addRoute = dsr->AddRoute (toSource);
725 if (nextHop ==
"0.0.0.0")
727 dsr->PacketNewRoute (dsrP, ipv4Address, dst, protocol);
734 dsr->SendPacketFromBuffer (sourceRoute, nextHop, protocol);
736 dsr->CancelRreqTimer (dst,
true);
760 else if (isRouteInCache && !areThereDuplicates)
766 for (std::vector<Ipv4Address>::iterator i = saveRoute.begin (); i != saveRoute.end (); ++i)
773 for (std::vector<Ipv4Address>::iterator j = ip.begin (); j != ip.end (); ++j)
780 bool addRoute =
false;
785 saveRoute.push_back (ipv4Address);
792 NS_ASSERT (saveRoute.front () == ipv4Address);
794 if (dsr->IsLinkCache ())
796 addRoute = dsr->AddRoute_Link (saveRoute, ipv4Address);
800 addRoute = dsr->AddRoute (toSource);
805 NS_LOG_LOGIC (
"We have added the route and search send buffer for packet with destination " << dst);
823 if (nextHop ==
"0.0.0.0")
825 dsr->PacketNewRoute (dsrP, ipv4Address, dst, protocol);
832 dsr->SendPacketFromBuffer (sourceRoute, nextHop, protocol);
834 dsr->CancelRreqTimer (dst,
true);
871 dsrRoutingHeader.SetMessageType (1);
872 dsrRoutingHeader.SetSourceId (
GetIDfromIP (realSource));
873 dsrRoutingHeader.SetDestId (255);
876 dsrRoutingHeader.SetPayloadLength (length + 2);
877 dsrRoutingHeader.AddDsrOption (rrep);
880 dsr->ScheduleCachedReply (newPacket, ipv4Address, nextHop,
m_ipv4Route, hops);
889 mainVector.push_back (ipv4Address);
890 NS_ASSERT (mainVector.front () == source);
900 p->RemoveHeader (rerr);
905 if ((errorSrc == srcAddress) && (unreachNode == ipv4Address))
915 dsr->DeleteAllRoutesIncludeLink (errorSrc, unreachNode, ipv4Address);
924 NS_LOG_DEBUG (
"The RREQ and newUnreach header length " << length);
938 uint8_t ttl = ipv4Header.
GetTtl ();
951 dsr->ScheduleInterRequest (interP);
966 .AddConstructor<DsrOptionRrep> ()
995 NS_LOG_FUNCTION (
this << packet << dsrP << ipv4Address << source << ipv4Header << (uint32_t)protocol << isPromisc);
1002 uint8_t numberAddress = (buf[1] - 2) / 4;
1011 NS_LOG_DEBUG (
"The next header value " << (uint32_t)protocol);
1019 if (targetAddress == ipv4Address)
1023 if (nodeList.size () == 0)
1038 NS_ASSERT (nodeList.front () == ipv4Address);
1039 bool addRoute =
false;
1040 if (dsr->IsLinkCache ())
1042 addRoute = dsr->AddRoute_Link (nodeList, ipv4Address);
1046 addRoute = dsr->AddRoute (toDestination);
1051 NS_LOG_DEBUG (
"We have added the route and search send buffer for packet with destination " << dst);
1056 NS_LOG_DEBUG (
"The route length " << nodeList.size ());
1062 if (nextHop ==
"0.0.0.0")
1064 dsr->PacketNewRoute (dsrP, ipv4Address, dst, protocol);
1070 dsr->CancelRreqTimer (dst,
true);
1074 dsr->SendPacketFromBuffer (sourceRoute, nextHop, protocol);
1085 NS_LOG_DEBUG (
"The length of rrep option " << (uint32_t)length);
1087 if (length % 2 != 0)
1097 std::vector<Ipv4Address> routeCopy = nodeList;
1098 std::vector<Ipv4Address> cutRoute =
CutRoute (ipv4Address, nodeList);
1100 if (cutRoute.size () >= 2)
1103 NS_LOG_DEBUG (
"The route destination after cut " << dst);
1105 NS_ASSERT (cutRoute.front () == ipv4Address);
1106 bool addRoute =
false;
1107 if (dsr->IsLinkCache ())
1109 addRoute = dsr->AddRoute_Link (nodeList, ipv4Address);
1113 addRoute = dsr->AddRoute (toDestination);
1117 dsr->CancelRreqTimer (dst,
true);
1132 NS_ASSERT (routeCopy.back () == source);
1134 NS_LOG_DEBUG (
"The nextHop address " << nextHop <<
" and the source in the route reply " << source);
1146 NS_LOG_DEBUG (
"The reply header length " << (uint32_t)length);
1153 newPacket->
AddHeader (dsrRoutingHeader);
1154 dsr->SendReply (newPacket, ipv4Address, nextHop,
m_ipv4Route);
1166 .AddConstructor<DsrOptionSR> ()
1194 NS_LOG_FUNCTION (
this << packet << dsrP << ipv4Address << source << ipv4Address << ipv4Header << (uint32_t)protocol << isPromisc);
1199 uint8_t numberAddress = (buf[1] - 2) / 4;
1228 NS_LOG_LOGIC (
"We process promiscuous receipt data packet");
1232 dsr->SendGratuitousReply (source, srcAddress, nodeList, protocol);
1238 if (destAddress != destination)
1240 NS_LOG_DEBUG (
"Process the promiscuously received packet");
1241 bool findPassive =
false;
1243 for (int32_t i = 0; i < nNodes; ++i)
1250 findPassive = dsrNode->PassiveEntryCheck (packet, source, destination, segsLeft, fragmentOffset, identification,
false);
1259 NS_LOG_DEBUG (
"We find one previously received passive entry");
1269 dsrSrc->CancelPassiveTimer (packet, source, destination, segsLeft);
1274 dsr->PassiveEntryCheck (packet, source, destination, segsLeft, fragmentOffset, identification,
true);
1285 uint8_t length = sourceRoute.
GetLength ();
1286 uint8_t nextAddressIndex;
1290 uint32_t size = p->
GetSize ();
1291 uint8_t *
data =
new uint8_t[size];
1293 uint8_t optionType = 0;
1294 optionType = *(
data);
1297 if (optionType == 160)
1299 NS_LOG_LOGIC (
"Remove the ack request header and add ack header to the packet");
1303 uint16_t ackId = ackReq.
GetAckId ();
1310 if (!nodeList.empty ())
1312 if (segsLeft > numberAddress)
1319 if (numberAddress - segsLeft < 2)
1325 ackAddress = nodeList[numberAddress - segsLeft - 2];
1328 NS_LOG_DEBUG (
"Send back ACK to the earlier hop " << ackAddress <<
" from us " << ipv4Address);
1329 dsr->SendAck (ackId, ackAddress, source, destination, protocol,
m_ipv4Route);
1342 if (length % 2 != 0)
1349 if (segsLeft > numberAddress)
1360 nextAddressIndex = numberAddress - segsLeft;
1362 NS_LOG_DEBUG (
"The next address of source route option " << nextAddress <<
" and the nextAddressIndex: " << (uint32_t)nextAddressIndex <<
" and the segments left : " << (uint32_t)segsLeft);
1374 if (nextHop ==
"0.0.0.0")
1377 dsr->PacketNewRoute (dsrP, realSource, targetAddress, protocol);
1381 if (ipv4Address == nextHop)
1394 SetRoute (nextAddress, ipv4Address);
1396 dsr->ForwardPacket (dsrP, newSourceRoute, ipv4Header, realSource, nextAddress, targetAddress, protocol,
m_ipv4Route);
1407 .AddConstructor<DsrOptionRerr> ()
1435 NS_LOG_FUNCTION (
this << packet << dsrP << ipv4Address << source << ipv4Header << (uint32_t)protocol << isPromisc);
1437 uint32_t size = p->
GetSize ();
1438 uint8_t *
data =
new uint8_t[size];
1440 uint8_t errorType = *(data + 2);
1450 NS_LOG_DEBUG (
"The error type value here " << (uint32_t)errorType);
1464 NS_LOG_DEBUG (
"The error source is " << rerrUnreach.
GetErrorDst () <<
"and the unreachable node is " << unreachAddress);
1473 dsr->DeleteAllRoutesIncludeLink (errorSource, unreachAddress, ipv4Address);
1476 uint32_t serialized =
DoSendError (newP, rerrUnreach, rerrSize, ipv4Address, protocol);
1495 uint32_t serialized = 0;
1505 uint8_t numberAddress = (buf[1] - 2) / 4;
1508 NS_LOG_DEBUG (
"The number of addresses " << (uint32_t)numberAddress);
1522 uint8_t length = sourceRoute.
GetLength ();
1523 uint8_t nextAddressIndex;
1535 if (length % 2 != 0)
1542 if (segmentsLeft > numberAddress)
1551 if (segmentsLeft == 0 && targetAddress == ipv4Address)
1553 NS_LOG_INFO (
"This is the destination of the error, send error request");
1554 dsr->SendErrorRequest (rerr, protocol);
1555 return serializedSize;
1561 nextAddressIndex = numberAddress - segmentsLeft;
1571 return serializedSize;
1575 SetRoute (nextAddress, ipv4Address);
1576 dsr->ForwardErrPacket (rerr, newSourceRoute, nextAddress, protocol,
m_ipv4Route);
1577 return serializedSize;
1584 static TypeId tid =
TypeId (
"ns3::dsr::DsrOptionAckReq")
1586 .AddConstructor<DsrOptionAckReq> ()
1614 NS_LOG_FUNCTION (
this << packet << dsrP << ipv4Address << source << ipv4Header << (uint32_t)protocol << isPromisc);
1630 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)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
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()
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
static Ptr< Node > GetNode(uint32_t n)
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)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
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
Returns the the size in bytes of the packet (including the zero-filled initial payload).
bool IsMulticast(void) const
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
#define NS_FATAL_ERROR(msg)
Fatal error handling.
#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.
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.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
void SetSource(Ipv4Address src)
virtual uint8_t GetOptionNumber() const
Get the option number.
void SetTtl(uint8_t ttl)
Set the tag's TTL.
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()
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)
Use NS_LOG to output a message of level LOG_LOGIC.
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
performs a COW copy of the packet.
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.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
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.
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()
Introspection did not find any typical Config paths.
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)
Use NS_LOG to output a message of level LOG_DEBUG.
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.
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.
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.
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
Get a pointer to the requested aggregated Object.
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
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.