21 #ifndef IPV6_EXTENSION_H
22 #define IPV6_EXTENSION_H
27 #include "ns3/object.h"
31 #include "ns3/ipv6-header.h"
32 #include "ns3/buffer.h"
33 #include "ns3/packet.h"
34 #include "ns3/random-variable-stream.h"
35 #include "ns3/ipv6-address.h"
36 #include "ns3/ipv6-l3-protocol.h"
37 #include "ns3/traced-callback.h"
104 bool& stopProcessing,
129 bool& stopProcessing,
196 bool& stopProcessing,
240 bool& stopProcessing,
284 bool& stopProcessing,
465 bool& stopProcessing,
580 bool& stopProcessing,
624 bool& stopProcessing,
668 bool& stopProcessing,
void GetFragments(Ptr< Packet > packet, uint32_t fragmentSize, std::list< Ptr< Packet > > &listFragments)
Fragment a packet.
Ptr< UniformRandomVariable > m_uvar
Provides uniform random variables.
Introspection did not find any typical Config paths.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
virtual uint8_t Process(Ptr< Packet > &packet, uint8_t offset, Ipv6Header const &ipv6Header, Ipv6Address dst, uint8_t *nextHeader, bool &stopProcessing, bool &isDropped, Ipv6L3Protocol::DropReason &dropReason)
Process method Called from Ipv6L3Protocol::Receive.
Ipv6ExtensionLooseRouting()
Constructor.
virtual void DoDispose()
Dispose this object.
Ptr< Packet > GetPartialPacket() const
Get the packet parts so far received.
void Insert(Ptr< Ipv6ExtensionRouting > extensionRouting)
Insert a new IPv6 Routing Extension.
static const uint8_t EXT_NUMBER
Fragmentation extension number.
void SetTimeoutEventId(EventId event)
Set the Timeout EventId.
void SetNode(Ptr< Node > node)
Set the node.
virtual void DoDispose()
Dispose this object.
virtual uint8_t GetExtensionNumber() const
Get the extension number.
static TypeId GetTypeId()
Get the type identificator.
virtual uint8_t GetExtensionNumber() const
Get the extension number.
static const uint8_t TYPE_ROUTING
Routing type.
virtual uint8_t Process(Ptr< Packet > &packet, uint8_t offset, Ipv6Header const &ipv6Header, Ipv6Address dst, uint8_t *nextHeader, bool &stopProcessing, bool &isDropped, Ipv6L3Protocol::DropReason &dropReason)
Process method Called from Ipv6L3Protocol::Receive.
static TypeId GetTypeId()
Get the type identificator.
virtual ~Ipv6ExtensionRoutingDemux()
Destructor.
Ipv6ExtensionRoutingDemux()
Constructor.
Introspection did not find any typical Config paths.
Ipv6ExtensionFragment()
Constructor.
~Ipv6ExtensionDestination()
Destructor.
virtual uint8_t GetExtensionNumber() const
Get the extension number.
Introspection did not find any typical Config paths.
void CancelTimeout()
Cancel the timeout event.
static TypeId GetTypeId()
Get the type identificator.
~Ipv6ExtensionHopByHop()
Destructor.
virtual uint8_t Process(Ptr< Packet > &packet, uint8_t offset, Ipv6Header const &ipv6Header, Ipv6Address dst, uint8_t *nextHeader, bool &stopProcessing, bool &isDropped, Ipv6L3Protocol::DropReason &dropReason)
Process method Called from Ipv6L3Protocol::Receive.
virtual uint8_t Process(Ptr< Packet > &packet, uint8_t offset, Ipv6Header const &ipv6Header, Ipv6Address dst, uint8_t *nextHeader, bool &stopProcessing, bool &isDropped, Ipv6L3Protocol::DropReason &dropReason)=0
Process method Called from Ipv6L3Protocol::Receive.
~Ipv6ExtensionLooseRouting()
Destructor.
void SetTimeoutEventId(EventId event)
Set the Timeout EventId.
Ipv6ExtensionHopByHop()
Constructor.
virtual uint8_t Process(Ptr< Packet > &packet, uint8_t offset, Ipv6Header const &ipv6Header, Ipv6Address dst, uint8_t *nextHeader, bool &stopProcessing, bool &isDropped, Ipv6L3Protocol::DropReason &dropReason)
Process method Called from Ipv6L3Protocol::Receive.
virtual uint8_t Process(Ptr< Packet > &packet, uint8_t offset, Ipv6Header const &ipv6Header, Ipv6Address dst, uint8_t *nextHeader, bool &stopProcessing, bool &isDropped, Ipv6L3Protocol::DropReason &dropReason)
Process method Called from Ipv6L3Protocol::Receive.
std::list< Ptr< Ipv6ExtensionRouting > > Ipv6ExtensionRoutingList_t
Container for the extension routing.
Ptr< Packet > GetPacket() const
Get the entire packet.
Ptr< Packet > m_unfragmentable
The unfragmentable part.
Introspection did not find any typical Config paths.
bool m_moreFragment
If other fragments will be sent.
~Ipv6ExtensionFragment()
Destructor.
void CancelTimeout()
Cancel the timeout event.
virtual uint8_t Process(Ptr< Packet > &packet, uint8_t offset, Ipv6Header const &ipv6Header, Ipv6Address dst, uint8_t *nextHeader, bool &stopProcessing, bool &isDropped, Ipv6L3Protocol::DropReason &dropReason)
Process method Called from Ipv6L3Protocol::Receive.
~Ipv6ExtensionRouting()
Destructor.
Ptr< Node > m_node
The node.
static TypeId GetTypeId()
Get the type identificator.
virtual uint8_t Process(Ptr< Packet > &packet, uint8_t offset, Ipv6Header const &ipv6Header, Ipv6Address dst, uint8_t *nextHeader, bool &stopProcessing, bool &isDropped, Ipv6L3Protocol::DropReason &dropReason)
Process method Called from Ipv6L3Protocol::Receive.
Ipv6ExtensionDestination()
Constructor.
Introspection did not find any typical Config paths.
void SetUnfragmentablePart(Ptr< Packet > unfragmentablePart)
Set the unfragmentable part of the packet.
bool IsEntire() const
If all fragments have been added.
Introspection did not find any typical Config paths.
Ptr< Node > GetNode() const
Get the node.
void Remove(Ptr< Ipv6ExtensionRouting > extensionRouting)
Remove a routing extension from this demux.
void AddFragment(Ptr< Packet > fragment, uint16_t fragmentOffset, bool moreFragment)
Add a fragment.
void SetNode(Ptr< Node > node)
Set the node.
virtual uint8_t GetExtensionNumber() const
Get the extension number.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static TypeId GetTypeId()
Get the type identificator.
MapFragments_t m_fragments
The hash of fragmented packets.
static TypeId GetTypeId()
The interface ID.
static TypeId GetTypeId()
Get the type identificator.
Ptr< Ipv6ExtensionRouting > GetExtensionRouting(uint8_t typeRouting)
Get the routing extension corresponding to typeRouting.
~Ipv6ExtensionESP()
Destructor.
Ipv6ExtensionAH()
Constructor.
static TypeId GetTypeId()
Get the type identificator.
Introspection did not find any typical Config paths.
virtual uint8_t GetExtensionNumber() const =0
Get the extension number.
std::map< std::pair< Ipv6Address, uint32_t >, Ptr< Fragments > > MapFragments_t
Container for the packet fragments.
static const uint8_t EXT_NUMBER
Hop-by-hop extension number.
Ipv6Extension()
Constructor.
Introspection did not find any typical Config paths.
EventId m_timeoutEventId
Timeout handler event.
Describes an IPv6 address.
virtual uint8_t GetTypeRouting() const
Get the type of routing.
An identifier for simulation events.
Ipv6ExtensionRouting()
Constructor.
virtual uint8_t GetExtensionNumber() const
Get the extension number.
virtual uint8_t GetExtensionNumber() const
Get the extension number.
virtual uint8_t ProcessOptions(Ptr< Packet > &packet, uint8_t offset, uint8_t length, Ipv6Header const &ipv6Header, Ipv6Address dst, uint8_t *nextHeader, bool &stopProcessing, bool &isDropped, Ipv6L3Protocol::DropReason &dropReason)
Process options Called by implementing classes to process the options.
virtual uint8_t GetTypeRouting() const
Get the type of routing.
static const uint8_t EXT_NUMBER
ESP extension number.
Ipv6ExtensionRoutingList_t m_extensionsRouting
List of IPv6 Routing Extensions supported.
std::list< std::pair< Ptr< Packet >, uint16_t > > m_packetFragments
The current fragments.
Ipv6ExtensionESP()
Constructor.
void HandleFragmentsTimeout(std::pair< Ipv6Address, uint32_t > key, Ipv6Header ipHeader)
Process the timeout for packet fragments.
A base class which provides memory management and object aggregation.
static const uint8_t EXT_NUMBER
Destination extension number.
Ptr< Node > m_node
The node.
static const uint8_t EXT_NUMBER
Routing extension number.
A template-based reference counting class.
a unique identifier for an interface.
static TypeId GetTypeId()
Get the type identificator.
static const uint8_t EXT_NUMBER
AH extension number.
~Ipv6ExtensionAH()
Destructor.
Ptr< Packet > GetPartialPacket() const
Get the packet parts so far received.
DropReason
Reason why a packet has been dropped.
virtual ~Ipv6Extension()
Destructor.
Introspection did not find any typical Config paths.