A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::Ipv4L3ClickProtocol Class Reference

Implement the Ipv4 layer specifically for Click nodes to allow a clean integration of Click. More...

#include "ipv4-l3-click-protocol.h"

+ Inheritance diagram for ns3::Ipv4L3ClickProtocol:
+ Collaboration diagram for ns3::Ipv4L3ClickProtocol:

Public Member Functions

 Ipv4L3ClickProtocol ()
 
 ~Ipv4L3ClickProtocol () override
 
bool AddAddress (uint32_t i, Ipv4InterfaceAddress address) override
 
uint32_t AddInterface (Ptr< NetDevice > device) override
 
uint32_t AddIpv4Interface (Ptr< Ipv4Interface > interface)
 Adds an Ipv4Interface to the interfaces list.
 
Ptr< SocketCreateRawSocket () override
 Creates a raw-socket.
 
void DeleteRawSocket (Ptr< Socket > socket) override
 Deletes a particular raw socket.
 
Ipv4InterfaceAddress GetAddress (uint32_t interfaceIndex, uint32_t addressIndex) const override
 Because addresses can be removed, the addressIndex is not guaranteed to be static across calls to this method.
 
Ptr< Icmpv4L4ProtocolGetIcmp () const
 Returns the Icmpv4L4Protocol for the node.
 
Ptr< Ipv4InterfaceGetInterface (uint32_t i) const
 Get a pointer to the i'th Ipv4Interface.
 
int32_t GetInterfaceForAddress (Ipv4Address addr) const override
 Return the interface number of the interface that has been assigned the specified IP address.
 
int32_t GetInterfaceForDevice (Ptr< const NetDevice > device) const override
 
int32_t GetInterfaceForPrefix (Ipv4Address addr, Ipv4Mask mask) const override
 Return the interface number of first interface found that has an Ipv4 address within the prefix specified by the input address and mask parameters.
 
uint16_t GetMetric (uint32_t i) const override
 
uint16_t GetMtu (uint32_t i) const override
 
uint32_t GetNAddresses (uint32_t interface) const override
 
Ptr< NetDeviceGetNetDevice (uint32_t i) override
 
uint32_t GetNInterfaces () const override
 
Ptr< IpL4ProtocolGetProtocol (int protocolNumber) const override
 
Ptr< IpL4ProtocolGetProtocol (int protocolNumber, int32_t interfaceIndex) const override
 Get L4 protocol by protocol number for the specified interface.
 
Ptr< Ipv4RoutingProtocolGetRoutingProtocol () const override
 Get the routing protocol to be used by this Ipv4 stack.
 
void Insert (Ptr< IpL4Protocol > protocol) override
 
void Insert (Ptr< IpL4Protocol > protocol, uint32_t interfaceIndex) override
 Add a L4 protocol to a specific interface.
 
bool IsDestinationAddress (Ipv4Address address, uint32_t iif) const override
 Determine whether address and interface corresponding to received packet can be accepted for local delivery.
 
bool IsForwarding (uint32_t i) const override
 
bool IsUp (uint32_t i) const override
 
void LocalDeliver (Ptr< const Packet > p, const Ipv4Header &ip, uint32_t iif)
 Ipv4ClickRouting calls this to locally deliver a packet.
 
void Receive (Ptr< NetDevice > device, Ptr< const Packet > p, uint16_t protocol, const Address &from, const Address &to, NetDevice::PacketType packetType)
 Lower layer calls this method to send a packet to Click.
 
void Remove (Ptr< IpL4Protocol > protocol) override
 
void Remove (Ptr< IpL4Protocol > protocol, uint32_t interfaceIndex) override
 Remove a L4 protocol from a specific interface.
 
bool RemoveAddress (uint32_t interfaceIndex, Ipv4Address address) override
 Remove the given address on named Ipv4 interface.
 
bool RemoveAddress (uint32_t interfaceIndex, uint32_t addressIndex) override
 Remove the address at addressIndex on named interface.
 
Ipv4Address SelectSourceAddress (Ptr< const NetDevice > device, Ipv4Address dst, Ipv4InterfaceAddress::InterfaceAddressScope_e scope) override
 Return the first primary source address with scope less than or equal to the requested scope, to use in sending a packet to destination dst out of the specified device.
 
void Send (Ptr< Packet > packet, Ipv4Address source, Ipv4Address destination, uint8_t protocol, Ptr< Ipv4Route > route) override
 
void SendDown (Ptr< Packet > packet, int ifid)
 
void SendWithHeader (Ptr< Packet > packet, Ipv4Header ipHeader, Ptr< Ipv4Route > route) override
 
void SetDefaultTtl (uint8_t ttl)
 
void SetDown (uint32_t i) override
 
void SetForwarding (uint32_t i, bool val) override
 
void SetMetric (uint32_t i, uint16_t metric) override
 
void SetNode (Ptr< Node > node)
 Calls m_node = node and sets up Loopback if needed.
 
void SetPromisc (uint32_t i)
 Sets an interface to run on promiscuous mode.
 
void SetRoutingProtocol (Ptr< Ipv4RoutingProtocol > routingProtocol) override
 Register a new routing protocol to be used by this Ipv4 stack.
 
void SetUp (uint32_t i) override
 
void SetupLoopback ()
 Sets up a Loopback device.
 
Ipv4Address SourceAddressSelection (uint32_t interface, Ipv4Address dest) override
 Choose the source address to use with destination address.
 
- Public Member Functions inherited from ns3::Ipv4
 Ipv4 ()
 
 ~Ipv4 () override
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
void UnidirectionalAggregateObject (Ptr< Object > other)
 Aggregate an Object to another Object.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get Type ID.
 
- Static Public Member Functions inherited from ns3::Ipv4
static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Static Public Attributes

static const uint16_t PROT_NUMBER = 0x0800
 Protocol number for Ipv4 L3 (0x0800).
 
- Static Public Attributes inherited from ns3::Ipv4
static const uint32_t IF_ANY = 0xffffffff
 interface wildcard, meaning any interface
 

Protected Member Functions

void DoDispose () override
 Destructor implementation.
 
void NotifyNewAggregate () override
 This function will notify other components connected to the node that a new stack member is now connected This will be used to notify Layer 3 protocol of layer 4 protocol stack to connect them together.
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void DoInitialize ()
 Initialize() implementation.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

Private Types

typedef std::vector< Ptr< Ipv4Interface > > Ipv4InterfaceList
 List of IPv4 interfaces.
 
typedef std::map< Ptr< const NetDevice >, uint32_tIpv4InterfaceReverseContainer
 Container of NetDevices registered to IPv4 and their interface indexes.
 
typedef std::map< L4ListKey_t, Ptr< IpL4Protocol > > L4List_t
 Container of the IPv4 L4 instances.
 
typedef std::pair< int, int32_tL4ListKey_t
 Container of the IPv4 L4 keys: protocol number, interface index.
 
typedef std::list< Ptr< Ipv4RawSocketImpl > > SocketList
 List of sockets.
 

Private Member Functions

Ipv4Header BuildHeader (Ipv4Address source, Ipv4Address destination, uint8_t protocol, uint16_t payloadSize, uint8_t ttl, bool mayFragment)
 Build IPv4 header.
 
bool GetIpForward () const override
 Get the IP forwarding state.
 
bool GetStrongEndSystemModel () const override
 Get the Strong End System Model status.
 
bool GetWeakEsModel () const override
 Get the Weak Es Model status.
 
void SetIpForward (bool forward) override
 Set or unset the IP forwarding state.
 
void SetStrongEndSystemModel (bool model) override
 Set or unset the Strong End System Model.
 
void SetWeakEsModel (bool model) override
 Set or unset the Weak Es Model.
 

Private Attributes

uint8_t m_defaultTtl
 Default TTL.
 
uint16_t m_identification
 Identification.
 
Ipv4InterfaceList m_interfaces
 List of interfaces.
 
bool m_ipForward
 Whether IP forwarding is enabled.
 
TracedCallback< const Ipv4Header &, Ptr< const Packet >, uint32_tm_localDeliverTrace
 
Ptr< Nodem_node
 Node.
 
std::vector< bool > m_promiscDeviceList
 List of promiscuous devices.
 
L4List_t m_protocols
 List of IPv4 L4 protocols.
 
Ipv4InterfaceReverseContainer m_reverseInterfacesContainer
 Container of NetDevice / Interface index associations.
 
Ptr< Ipv4RoutingProtocolm_routingProtocol
 IPv4 routing protocol.
 
TracedCallback< const Ipv4Header &, Ptr< const Packet >, uint32_tm_sendOutgoingTrace
 
SocketList m_sockets
 List of sockets.
 
bool m_strongEndSystemModel
 Whether to use Strong End System Model.
 
TracedCallback< const Ipv4Header &, Ptr< const Packet >, uint32_tm_unicastForwardTrace
 

Additional Inherited Members

Detailed Description

Implement the Ipv4 layer specifically for Click nodes to allow a clean integration of Click.

This is code is mostly repeated from the Ipv4L3Protocol implementation. Changes include:

Definition at line 51 of file ipv4-l3-click-protocol.h.

Member Typedef Documentation

◆ Ipv4InterfaceList

List of IPv4 interfaces.

Definition at line 273 of file ipv4-l3-click-protocol.h.

◆ Ipv4InterfaceReverseContainer

Container of NetDevices registered to IPv4 and their interface indexes.

Definition at line 278 of file ipv4-l3-click-protocol.h.

◆ L4List_t

Container of the IPv4 L4 instances.

Definition at line 293 of file ipv4-l3-click-protocol.h.

◆ L4ListKey_t

typedef std::pair<int, int32_t> ns3::Ipv4L3ClickProtocol::L4ListKey_t
private

Container of the IPv4 L4 keys: protocol number, interface index.

Definition at line 288 of file ipv4-l3-click-protocol.h.

◆ SocketList

List of sockets.

Definition at line 283 of file ipv4-l3-click-protocol.h.

Constructor & Destructor Documentation

◆ Ipv4L3ClickProtocol()

ns3::Ipv4L3ClickProtocol::Ipv4L3ClickProtocol ( )

Definition at line 58 of file ipv4-l3-click-protocol.cc.

◆ ~Ipv4L3ClickProtocol()

ns3::Ipv4L3ClickProtocol::~Ipv4L3ClickProtocol ( )
override

Definition at line 63 of file ipv4-l3-click-protocol.cc.

Member Function Documentation

◆ AddAddress()

bool ns3::Ipv4L3ClickProtocol::AddAddress ( uint32_t interface,
Ipv4InterfaceAddress address )
overridevirtual
Parameters
interfaceInterface number of an Ipv4 interface
addressIpv4InterfaceAddress address to associate with the underlying Ipv4 interface
Returns
true if the operation succeeded

Implements ns3::Ipv4.

Definition at line 384 of file ipv4-l3-click-protocol.cc.

References NS_LOG_FUNCTION.

◆ AddInterface()

uint32_t ns3::Ipv4L3ClickProtocol::AddInterface ( Ptr< NetDevice > device)
overridevirtual
Parameters
devicedevice to add to the list of Ipv4 interfaces which can be used as output interfaces during packet forwarding.
Returns
the index of the Ipv4 interface added.

Once a device has been added, it can never be removed: if you want to disable it, you can invoke Ipv4::SetDown which will make sure that it is never used during packet forwarding.

Implements ns3::Ipv4.

Definition at line 631 of file ipv4-l3-click-protocol.cc.

References AddIpv4Interface(), ns3::CreateObject(), ns3::Object::GetObject(), m_ipForward, m_node, ns3::MakeCallback(), NS_LOG_FUNCTION, ns3::ArpL3Protocol::PROT_NUMBER, PROT_NUMBER, Receive(), and ns3::Ipv4Interface::SetNode().

+ Here is the call graph for this function:

◆ AddIpv4Interface()

uint32_t ns3::Ipv4L3ClickProtocol::AddIpv4Interface ( Ptr< Ipv4Interface > interface)

Adds an Ipv4Interface to the interfaces list.

Parameters
interfacePointer to the Ipv4Interface to be added
Returns
Index of the device which was added

Definition at line 650 of file ipv4-l3-click-protocol.cc.

References m_interfaces, m_reverseInterfacesContainer, and NS_LOG_FUNCTION.

Referenced by AddInterface(), and SetupLoopback().

+ Here is the caller graph for this function:

◆ BuildHeader()

Ipv4Header ns3::Ipv4L3ClickProtocol::BuildHeader ( Ipv4Address source,
Ipv4Address destination,
uint8_t protocol,
uint16_t payloadSize,
uint8_t ttl,
bool mayFragment )
private

Build IPv4 header.

Parameters
sourceIPv4 source address.
destinationIPv4 destination address.
protocolProtocol.
payloadSizePayload size.
ttlTime To Live (TTL).
mayFragmentWhether the packet can be fragmented or not.
Returns
The IPv4 header.
Todo
when should we set ip_id? check whether we are incrementing m_identification on packets that may later be dropped in this stack and whether that deviates from Linux

Definition at line 663 of file ipv4-l3-click-protocol.cc.

References ns3::Node::ChecksumEnabled(), ns3::Ipv4Header::EnableChecksum(), m_identification, NS_LOG_FUNCTION_NOARGS, ns3::Ipv4Header::SetDestination(), ns3::Ipv4Header::SetDontFragment(), ns3::Ipv4Header::SetIdentification(), ns3::Ipv4Header::SetMayFragment(), ns3::Ipv4Header::SetPayloadSize(), ns3::Ipv4Header::SetProtocol(), ns3::Ipv4Header::SetSource(), and ns3::Ipv4Header::SetTtl().

Referenced by Send().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateRawSocket()

Ptr< Socket > ns3::Ipv4L3ClickProtocol::CreateRawSocket ( )
overridevirtual

Creates a raw-socket.

Returns
Pointer to the created socket

Implements ns3::Ipv4.

Definition at line 352 of file ipv4-l3-click-protocol.cc.

References ns3::CreateObject(), m_node, m_sockets, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ DeleteRawSocket()

void ns3::Ipv4L3ClickProtocol::DeleteRawSocket ( Ptr< Socket > socket)
overridevirtual

Deletes a particular raw socket.

Parameters
socketPointer of socket to be deleted

Implements ns3::Ipv4.

Definition at line 362 of file ipv4-l3-click-protocol.cc.

References m_sockets, and NS_LOG_FUNCTION.

◆ DoDispose()

void ns3::Ipv4L3ClickProtocol::DoDispose ( )
overrideprotectedvirtual

Destructor implementation.

This method is called by Dispose() or by the Object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.

It is safe to call GetObject() from within this method.

Reimplemented from ns3::Object.

Definition at line 68 of file ipv4-l3-click-protocol.cc.

References ns3::Object::DoDispose(), m_interfaces, m_node, m_protocols, m_reverseInterfacesContainer, m_routingProtocol, m_sockets, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ GetAddress()

Ipv4InterfaceAddress ns3::Ipv4L3ClickProtocol::GetAddress ( uint32_t interface,
uint32_t addressIndex ) const
overridevirtual

Because addresses can be removed, the addressIndex is not guaranteed to be static across calls to this method.

Parameters
interfaceInterface number of an Ipv4 interface
addressIndexindex of Ipv4InterfaceAddress
Returns
the Ipv4InterfaceAddress associated to the interface and addressIndex

Implements ns3::Ipv4.

Definition at line 397 of file ipv4-l3-click-protocol.cc.

References NS_LOG_FUNCTION.

Referenced by IsDestinationAddress(), LocalDeliver(), SelectSourceAddress(), and SourceAddressSelection().

+ Here is the caller graph for this function:

◆ GetIcmp()

Ptr< Icmpv4L4Protocol > ns3::Ipv4L3ClickProtocol::GetIcmp ( ) const

Returns the Icmpv4L4Protocol for the node.

Returns
Icmpv4L4Protocol instance of the node

Definition at line 879 of file ipv4-l3-click-protocol.cc.

References GetProtocol(), and ns3::Icmpv4L4Protocol::GetStaticProtocolNumber().

Referenced by LocalDeliver().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetInterface()

Ptr< Ipv4Interface > ns3::Ipv4L3ClickProtocol::GetInterface ( uint32_t i) const

Get a pointer to the i'th Ipv4Interface.

Parameters
iindex of interface, pointer to which is to be returned
Returns
Pointer to the i'th Ipv4Interface if any.

Definition at line 121 of file ipv4-l3-click-protocol.cc.

References m_interfaces, and NS_LOG_FUNCTION.

Referenced by GetNAddresses(), GetNetDevice(), and LocalDeliver().

+ Here is the caller graph for this function:

◆ GetInterfaceForAddress()

int32_t ns3::Ipv4L3ClickProtocol::GetInterfaceForAddress ( Ipv4Address address) const
overridevirtual

Return the interface number of the interface that has been assigned the specified IP address.

Parameters
addressThe IP address being searched for
Returns
The interface number of the Ipv4 interface with the given address or -1 if not found.

Each IP interface has one or more IP addresses associated with it. This method searches the list of interfaces for one that holds a particular address. This call takes an IP address as a parameter and returns the interface number of the first interface that has been assigned that address, or -1 if not found. There must be an exact match; this method will not match broadcast or multicast addresses.

Implements ns3::Ipv4.

Definition at line 139 of file ipv4-l3-click-protocol.cc.

References m_interfaces, and NS_LOG_FUNCTION.

◆ GetInterfaceForDevice()

int32_t ns3::Ipv4L3ClickProtocol::GetInterfaceForDevice ( Ptr< const NetDevice > device) const
overridevirtual
Parameters
deviceThe NetDevice for an Ipv4Interface
Returns
The interface number of an Ipv4 interface or -1 if not found.

Implements ns3::Ipv4.

Definition at line 179 of file ipv4-l3-click-protocol.cc.

References m_reverseInterfacesContainer, and NS_LOG_FUNCTION.

Referenced by SelectSourceAddress().

+ Here is the caller graph for this function:

◆ GetInterfaceForPrefix()

int32_t ns3::Ipv4L3ClickProtocol::GetInterfaceForPrefix ( Ipv4Address address,
Ipv4Mask mask ) const
overridevirtual

Return the interface number of first interface found that has an Ipv4 address within the prefix specified by the input address and mask parameters.

Parameters
addressThe IP address assigned to the interface of interest.
maskThe IP prefix to use in the mask
Returns
The interface number of the Ipv4 interface with the given address or -1 if not found.

Each IP interface has one or more IP addresses associated with it. This method searches the list of interfaces for the first one found that holds an address that is included within the prefix formed by the input address and mask parameters. The value -1 is returned if no match is found.

Implements ns3::Ipv4.

Definition at line 159 of file ipv4-l3-click-protocol.cc.

References m_interfaces, and NS_LOG_FUNCTION.

◆ GetIpForward()

bool ns3::Ipv4L3ClickProtocol::GetIpForward ( ) const
overrideprivatevirtual

Get the IP forwarding state.

Returns
true if IP is in forwarding state

Implements ns3::Ipv4.

Definition at line 271 of file ipv4-l3-click-protocol.cc.

References m_ipForward.

◆ GetMetric()

uint16_t ns3::Ipv4L3ClickProtocol::GetMetric ( uint32_t interface) const
overridevirtual
Parameters
interfaceThe interface number of an Ipv4 interface
Returns
routing metric (cost) associated to the underlying Ipv4 interface

Implements ns3::Ipv4.

Definition at line 550 of file ipv4-l3-click-protocol.cc.

References NS_LOG_FUNCTION.

◆ GetMtu()

uint16_t ns3::Ipv4L3ClickProtocol::GetMtu ( uint32_t interface) const
overridevirtual
Parameters
interfaceInterface number of Ipv4 interface
Returns
the Maximum Transmission Unit (in bytes) associated to the underlying Ipv4 interface

Implements ns3::Ipv4.

Definition at line 558 of file ipv4-l3-click-protocol.cc.

References NS_LOG_FUNCTION.

◆ GetNAddresses()

uint32_t ns3::Ipv4L3ClickProtocol::GetNAddresses ( uint32_t interface) const
overridevirtual
Parameters
interfaceInterface number of an Ipv4 interface
Returns
the number of Ipv4InterfaceAddress entries for the interface.

Implements ns3::Ipv4.

Definition at line 405 of file ipv4-l3-click-protocol.cc.

References GetInterface(), and NS_LOG_FUNCTION.

Referenced by IsDestinationAddress(), LocalDeliver(), SelectSourceAddress(), and SourceAddressSelection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetNetDevice()

Ptr< NetDevice > ns3::Ipv4L3ClickProtocol::GetNetDevice ( uint32_t interface)
overridevirtual
Parameters
interfaceThe interface number of an Ipv4 interface.
Returns
The NetDevice associated with the Ipv4 interface number.

Implements ns3::Ipv4.

Definition at line 301 of file ipv4-l3-click-protocol.cc.

References ns3::Ipv4Interface::GetDevice(), GetInterface(), and NS_LOG_FUNCTION.

Referenced by SendDown(), and SetPromisc().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetNInterfaces()

uint32_t ns3::Ipv4L3ClickProtocol::GetNInterfaces ( ) const
overridevirtual
Returns
the number of interfaces added by the user.

Implements ns3::Ipv4.

Definition at line 132 of file ipv4-l3-click-protocol.cc.

References m_interfaces, and NS_LOG_FUNCTION_NOARGS.

Referenced by IsDestinationAddress(), and SelectSourceAddress().

+ Here is the caller graph for this function:

◆ GetProtocol() [1/2]

Ptr< IpL4Protocol > ns3::Ipv4L3ClickProtocol::GetProtocol ( int protocolNumber) const
overridevirtual
Parameters
protocolNumbernumber of protocol to lookup in this L4 Demux
Returns
a matching L4 Protocol

This method is typically called by lower layers to forward packets up the stack to the right protocol.

Implements ns3::Ipv4.

Definition at line 956 of file ipv4-l3-click-protocol.cc.

References GetProtocol(), and NS_LOG_FUNCTION.

Referenced by GetIcmp(), GetProtocol(), and LocalDeliver().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetProtocol() [2/2]

Ptr< IpL4Protocol > ns3::Ipv4L3ClickProtocol::GetProtocol ( int protocolNumber,
int32_t interfaceIndex ) const
overridevirtual

Get L4 protocol by protocol number for the specified interface.

Parameters
protocolNumberprotocol number
interfaceIndexinterface index, -1 means "any" interface.
Returns
corresponding IpL4Protocol or 0 if not found

Implements ns3::Ipv4.

Definition at line 964 of file ipv4-l3-click-protocol.cc.

References m_protocols, and NS_LOG_FUNCTION.

◆ GetRoutingProtocol()

Ptr< Ipv4RoutingProtocol > ns3::Ipv4L3ClickProtocol::GetRoutingProtocol ( ) const
overridevirtual

Get the routing protocol to be used by this Ipv4 stack.

Returns
smart pointer to Ipv4RoutingProtocol object, or null pointer if none

Implements ns3::Ipv4.

Definition at line 115 of file ipv4-l3-click-protocol.cc.

References m_routingProtocol.

Referenced by Receive().

+ Here is the caller graph for this function:

◆ GetStrongEndSystemModel()

bool ns3::Ipv4L3ClickProtocol::GetStrongEndSystemModel ( ) const
overrideprivatevirtual

Get the Strong End System Model status.

RFC1122 term for whether host rejects datagram with a dest. address on another interface

Returns
true for Strong End System Model activated

Implements ns3::Ipv4.

Definition at line 295 of file ipv4-l3-click-protocol.cc.

References m_strongEndSystemModel.

Referenced by IsDestinationAddress().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::Ipv4L3ClickProtocol::GetTypeId ( )
static

Get Type ID.

Returns
The type ID.

Definition at line 37 of file ipv4-l3-click-protocol.cc.

References m_defaultTtl, m_interfaces, ns3::MakeObjectVectorAccessor(), ns3::MakeObjectVectorChecker(), ns3::MakeUintegerAccessor(), ns3::MakeUintegerChecker(), and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ GetWeakEsModel()

bool ns3::Ipv4L3ClickProtocol::GetWeakEsModel ( ) const
overrideprivatevirtual

Get the Weak Es Model status.

RFC1122 term for whether host accepts datagram with a dest. address on another interface

Returns
true for Weak Es Model activated
Deprecated
"Deprecated in ns-3.41: " "Use GetStrongEndSystemModel instead"
Deprecated
"Deprecated in ns-3.41: " "Use GetStrongEndSystemModel instead"

Implements ns3::Ipv4.

Definition at line 283 of file ipv4-l3-click-protocol.cc.

References m_strongEndSystemModel.

◆ Insert() [1/2]

void ns3::Ipv4L3ClickProtocol::Insert ( Ptr< IpL4Protocol > protocol)
overridevirtual
Parameters
protocola template for the protocol to add to this L4 Demux.

Invoke Copy on the input template to get a copy of the input protocol which can be used on the Node on which this L4 Demux is running. The new L4Protocol is registered internally as a working L4 Protocol and returned from this method. The caller does not get ownership of the returned pointer.

Implements ns3::Ipv4.

Definition at line 893 of file ipv4-l3-click-protocol.cc.

References m_protocols, NS_LOG_FUNCTION, and NS_LOG_WARN.

◆ Insert() [2/2]

void ns3::Ipv4L3ClickProtocol::Insert ( Ptr< IpL4Protocol > protocol,
uint32_t interfaceIndex )
overridevirtual

Add a L4 protocol to a specific interface.

This may be called multiple times for multiple interfaces for the same protocol. To insert for all interfaces, use the separate Insert (Ptr<IpL4Protocol> protocol) method.

Setting a protocol on a specific interface will overwrite the previously bound protocol.

Parameters
protocolL4 protocol.
interfaceIndexinterface index.

Implements ns3::Ipv4.

Definition at line 905 of file ipv4-l3-click-protocol.cc.

References m_protocols, NS_LOG_FUNCTION, and NS_LOG_WARN.

◆ IsDestinationAddress()

bool ns3::Ipv4L3ClickProtocol::IsDestinationAddress ( Ipv4Address address,
uint32_t iif ) const
overridevirtual

Determine whether address and interface corresponding to received packet can be accepted for local delivery.

Parameters
addressThe IP address being considered
iifThe incoming Ipv4 interface index
Returns
true if the address is associated with the interface index

This method can be used to determine whether a received packet has an acceptable address for local delivery on the host. The address may be a unicast, multicast, or broadcast address. This method will return true if address is an exact match of a unicast address on one of the host's interfaces (see below), if address corresponds to a multicast group that the host has joined (and the incoming device is acceptable), or if address corresponds to a broadcast address.

If the Ipv4 attribute StrongEndSystemModel is true, the address must match one assigned to the incoming device. If the attribute is false, the unicast address may match any of the Ipv4 addresses on any interface.

Implements ns3::Ipv4.

Definition at line 193 of file ipv4-l3-click-protocol.cc.

References GetAddress(), ns3::Ipv4InterfaceAddress::GetBroadcast(), ns3::Ipv4InterfaceAddress::GetLocal(), GetNAddresses(), GetNInterfaces(), GetStrongEndSystemModel(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.

+ Here is the call graph for this function:

◆ IsForwarding()

bool ns3::Ipv4L3ClickProtocol::IsForwarding ( uint32_t interface) const
overridevirtual
Parameters
interfaceInterface number of Ipv4 interface
Returns
true if IP forwarding enabled for input datagrams on this device

Implements ns3::Ipv4.

Definition at line 600 of file ipv4-l3-click-protocol.cc.

References NS_LOG_FUNCTION, and NS_LOG_LOGIC.

◆ IsUp()

bool ns3::Ipv4L3ClickProtocol::IsUp ( uint32_t interface) const
overridevirtual
Parameters
interfaceInterface number of Ipv4 interface
Returns
true if the underlying interface is in the "up" state, false otherwise.

Implements ns3::Ipv4.

Definition at line 566 of file ipv4-l3-click-protocol.cc.

References NS_LOG_FUNCTION.

◆ LocalDeliver()

void ns3::Ipv4L3ClickProtocol::LocalDeliver ( Ptr< const Packet > p,
const Ipv4Header & ip,
uint32_t iif )

◆ NotifyNewAggregate()

void ns3::Ipv4L3ClickProtocol::NotifyNewAggregate ( )
overrideprotectedvirtual

This function will notify other components connected to the node that a new stack member is now connected This will be used to notify Layer 3 protocol of layer 4 protocol stack to connect them together.

Reimplemented from ns3::Object.

Definition at line 91 of file ipv4-l3-click-protocol.cc.

References ns3::Object::GetObject(), m_node, ns3::Object::NotifyNewAggregate(), and SetNode().

+ Here is the call graph for this function:

◆ Receive()

void ns3::Ipv4L3ClickProtocol::Receive ( Ptr< NetDevice > device,
Ptr< const Packet > p,
uint16_t protocol,
const Address & from,
const Address & to,
NetDevice::PacketType packetType )

Lower layer calls this method to send a packet to Click.

Parameters
devicenetwork device
pthe packet
protocolprotocol value
fromaddress of the correspondent
toaddress of the destination
packetTypetype of the packet

Definition at line 774 of file ipv4-l3-click-protocol.cc.

References ns3::Mac48Address::ConvertFrom(), ns3::DynamicCast(), ns3::Ipv4Header::EnableChecksum(), ns3::Node::GetId(), GetRoutingProtocol(), m_node, m_sockets, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_LOGIC, PROT_NUMBER, ns3::EthernetHeader::SetDestination(), ns3::EthernetHeader::SetLengthType(), and ns3::EthernetHeader::SetSource().

Referenced by AddInterface(), SetPromisc(), and SetupLoopback().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Remove() [1/2]

void ns3::Ipv4L3ClickProtocol::Remove ( Ptr< IpL4Protocol > protocol)
overridevirtual
Parameters
protocolprotocol to remove from this demux.

The input value to this method should be the value returned from the Ipv4L4Protocol::Insert method.

Implements ns3::Ipv4.

Definition at line 919 of file ipv4-l3-click-protocol.cc.

References m_protocols, NS_LOG_FUNCTION, and NS_LOG_WARN.

◆ Remove() [2/2]

void ns3::Ipv4L3ClickProtocol::Remove ( Ptr< IpL4Protocol > protocol,
uint32_t interfaceIndex )
overridevirtual

Remove a L4 protocol from a specific interface.

Parameters
protocolL4 protocol to remove.
interfaceIndexinterface index.

Implements ns3::Ipv4.

Definition at line 937 of file ipv4-l3-click-protocol.cc.

References m_protocols, NS_LOG_FUNCTION, and NS_LOG_WARN.

◆ RemoveAddress() [1/2]

bool ns3::Ipv4L3ClickProtocol::RemoveAddress ( uint32_t interface,
Ipv4Address address )
overridevirtual

Remove the given address on named Ipv4 interface.

Parameters
interfaceInterface number of an Ipv4 interface
addressThe address to remove
Returns
true if the operation succeeded

Implements ns3::Ipv4.

Definition at line 430 of file ipv4-l3-click-protocol.cc.

References ns3::Ipv4Address::GetLoopback(), NS_LOG_FUNCTION, and NS_LOG_WARN.

+ Here is the call graph for this function:

◆ RemoveAddress() [2/2]

bool ns3::Ipv4L3ClickProtocol::RemoveAddress ( uint32_t interface,
uint32_t addressIndex )
overridevirtual

Remove the address at addressIndex on named interface.

The addressIndex for all higher indices will decrement by one after this method is called; so, for example, to remove 5 addresses from an interface i, one could call RemoveAddress (i, 0); 5 times.

Parameters
interfaceInterface number of an Ipv4 interface
addressIndexindex of Ipv4InterfaceAddress to remove
Returns
true if the operation succeeded

Implements ns3::Ipv4.

Definition at line 413 of file ipv4-l3-click-protocol.cc.

References NS_LOG_FUNCTION.

◆ SelectSourceAddress()

Ipv4Address ns3::Ipv4L3ClickProtocol::SelectSourceAddress ( Ptr< const NetDevice > device,
Ipv4Address dst,
Ipv4InterfaceAddress::InterfaceAddressScope_e scope )
overridevirtual

Return the first primary source address with scope less than or equal to the requested scope, to use in sending a packet to destination dst out of the specified device.

This method mirrors the behavior of Linux inet_select_addr() and is provided because interfaces may have multiple IP addresses configured on them with different scopes, and with a primary and secondary status. Secondary addresses are never returned.

See also
Ipv4InterfaceAddress

If a non-zero device pointer is provided, the method first tries to return a primary address that is configured on that device, and whose subnet matches that of dst and whose scope is less than or equal to the requested scope. If a primary address does not match the subnet of dst but otherwise matches the scope, it is returned. If no such address on the device is found, the other devices are searched in order of their interface index, but not considering dst as a factor in the search. Because a loopback interface is typically the first one configured on a node, it will be the first alternate device to be tried. Addresses scoped at LINK scope are not returned in this phase.

If no device pointer is provided, the same logic as above applies, only that there is no preferred device that is consulted first. This means that if the device pointer is null, input parameter dst will be ignored.

If there are no possible addresses to return, a warning log message is issued and the all-zeroes address is returned.

Parameters
deviceoutput NetDevice (optionally provided, only to constrain the search)
dstDestination address to match, if device is provided
scopeScope of returned address must be less than or equal to this
Returns
the first primary Ipv4Address that meets the search criteria

Implements ns3::Ipv4.

Definition at line 480 of file ipv4-l3-click-protocol.cc.

References ns3::Ipv4Address::CombineMask(), GetAddress(), GetInterfaceForDevice(), ns3::Ipv4InterfaceAddress::GetLocal(), ns3::Ipv4InterfaceAddress::GetMask(), GetNAddresses(), GetNInterfaces(), ns3::Ipv4InterfaceAddress::GetScope(), ns3::Ipv4InterfaceAddress::IsSecondary(), ns3::Ipv4InterfaceAddress::LINK, NS_ASSERT_MSG, NS_LOG_FUNCTION, and NS_LOG_WARN.

+ Here is the call graph for this function:

◆ Send()

void ns3::Ipv4L3ClickProtocol::Send ( Ptr< Packet > packet,
Ipv4Address source,
Ipv4Address destination,
uint8_t protocol,
Ptr< Ipv4Route > route )
overridevirtual
Parameters
packetpacket to send
sourcesource address of packet
destinationaddress of packet
protocolnumber of packet
routeroute entry

Higher-level layers call this method to send a packet to Click

Implements ns3::Ipv4.

Definition at line 698 of file ipv4-l3-click-protocol.cc.

References BuildHeader(), ns3::Node::ChecksumEnabled(), ns3::DynamicCast(), ns3::Ipv4Header::EnableChecksum(), ns3::SocketIpTtlTag::GetTtl(), m_defaultTtl, m_routingProtocol, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ SendDown()

void ns3::Ipv4L3ClickProtocol::SendDown ( Ptr< Packet > packet,
int ifid )
Parameters
packetpacket to send down the stack
ifidinterface to be used for sending down packet

Ipv4ClickRouting calls this method to send a packet further down the stack

Definition at line 741 of file ipv4-l3-click-protocol.cc.

References ns3::EthernetHeader::GetDestination(), ns3::EthernetHeader::GetLengthType(), GetNetDevice(), and ns3::LlcSnapHeader::GetType().

+ Here is the call graph for this function:

◆ SendWithHeader()

void ns3::Ipv4L3ClickProtocol::SendWithHeader ( Ptr< Packet > packet,
Ipv4Header ipHeader,
Ptr< Ipv4Route > route )
overridevirtual
Parameters
packetpacket to send
ipHeaderIP Header
routeroute entry

Higher-level layers call this method to send a packet with IPv4 Header (Intend to be used with IpHeaderInclude attribute.)

Implements ns3::Ipv4.

Definition at line 727 of file ipv4-l3-click-protocol.cc.

References ns3::Node::ChecksumEnabled(), ns3::DynamicCast(), ns3::Ipv4Header::EnableChecksum(), ns3::Ipv4Header::GetDestination(), ns3::Ipv4Header::GetSource(), m_routingProtocol, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ SetDefaultTtl()

void ns3::Ipv4L3ClickProtocol::SetDefaultTtl ( uint8_t ttl)
Parameters
ttldefault ttl to use

When we need to send an ipv4 packet, we use this default ttl value.

Definition at line 308 of file ipv4-l3-click-protocol.cc.

References m_defaultTtl, and NS_LOG_FUNCTION_NOARGS.

◆ SetDown()

void ns3::Ipv4L3ClickProtocol::SetDown ( uint32_t interface)
overridevirtual
Parameters
interfaceInterface number of Ipv4 interface

Set the interface into the "down" state. In this state, it is ignored during Ipv4 forwarding.

Implements ns3::Ipv4.

Definition at line 587 of file ipv4-l3-click-protocol.cc.

References NS_LOG_FUNCTION.

◆ SetForwarding()

void ns3::Ipv4L3ClickProtocol::SetForwarding ( uint32_t interface,
bool val )
overridevirtual
Parameters
interfaceInterface number of Ipv4 interface
valValue to set the forwarding flag

If set to true, IP forwarding is enabled for input datagrams on this device

Implements ns3::Ipv4.

Definition at line 609 of file ipv4-l3-click-protocol.cc.

References NS_LOG_FUNCTION.

◆ SetIpForward()

void ns3::Ipv4L3ClickProtocol::SetIpForward ( bool forward)
overrideprivatevirtual

Set or unset the IP forwarding state.

Parameters
forwardthe forwarding state

Implements ns3::Ipv4.

Definition at line 260 of file ipv4-l3-click-protocol.cc.

References m_interfaces, m_ipForward, and NS_LOG_FUNCTION.

◆ SetMetric()

void ns3::Ipv4L3ClickProtocol::SetMetric ( uint32_t interface,
uint16_t metric )
overridevirtual
Parameters
interfaceThe interface number of an Ipv4 interface
metricrouting metric (cost) associated to the underlying Ipv4 interface

Implements ns3::Ipv4.

Definition at line 542 of file ipv4-l3-click-protocol.cc.

References NS_LOG_FUNCTION.

◆ SetNode()

void ns3::Ipv4L3ClickProtocol::SetNode ( Ptr< Node > node)

Calls m_node = node and sets up Loopback if needed.

Parameters
nodePointer to the node

Definition at line 376 of file ipv4-l3-click-protocol.cc.

References m_node, and SetupLoopback().

Referenced by NotifyNewAggregate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetPromisc()

void ns3::Ipv4L3ClickProtocol::SetPromisc ( uint32_t i)

Sets an interface to run on promiscuous mode.

Parameters
iInterface ID.

Definition at line 617 of file ipv4-l3-click-protocol.cc.

References GetNetDevice(), ns3::Object::GetObject(), ns3::MakeCallback(), NS_ASSERT, and Receive().

+ Here is the call graph for this function:

◆ SetRoutingProtocol()

void ns3::Ipv4L3ClickProtocol::SetRoutingProtocol ( Ptr< Ipv4RoutingProtocol > routingProtocol)
overridevirtual

Register a new routing protocol to be used by this Ipv4 stack.

This call will replace any routing protocol that has been previously registered. If you want to add multiple routing protocols, you must add them to a Ipv4ListRoutingProtocol directly.

Parameters
routingProtocolsmart pointer to Ipv4RoutingProtocol object

Implements ns3::Ipv4.

Definition at line 107 of file ipv4-l3-click-protocol.cc.

References m_routingProtocol, and NS_LOG_FUNCTION.

◆ SetStrongEndSystemModel()

void ns3::Ipv4L3ClickProtocol::SetStrongEndSystemModel ( bool model)
overrideprivatevirtual

Set or unset the Strong End System Model.

RFC1122 term for whether host rejects datagram with a dest. address on another interface

Parameters
modeltrue for Strong End System Model

Implements ns3::Ipv4.

Definition at line 289 of file ipv4-l3-click-protocol.cc.

References m_strongEndSystemModel.

◆ SetUp()

void ns3::Ipv4L3ClickProtocol::SetUp ( uint32_t interface)
overridevirtual
Parameters
interfaceInterface number of Ipv4 interface

Set the interface into the "up" state. In this state, it is considered valid during Ipv4 forwarding.

Implements ns3::Ipv4.

Definition at line 574 of file ipv4-l3-click-protocol.cc.

References NS_LOG_FUNCTION.

◆ SetupLoopback()

void ns3::Ipv4L3ClickProtocol::SetupLoopback ( )

Sets up a Loopback device.

Definition at line 315 of file ipv4-l3-click-protocol.cc.

References ns3::Node::AddDevice(), AddIpv4Interface(), ns3::CreateObject(), ns3::DynamicCast(), ns3::Node::GetDevice(), ns3::Ipv4Address::GetLoopback(), ns3::Ipv4Mask::GetLoopback(), ns3::Node::GetNDevices(), ns3::Object::GetObject(), m_node, m_routingProtocol, ns3::MakeCallback(), NS_LOG_FUNCTION_NOARGS, PROT_NUMBER, and Receive().

Referenced by SetNode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetWeakEsModel()

void ns3::Ipv4L3ClickProtocol::SetWeakEsModel ( bool model)
overrideprivatevirtual

Set or unset the Weak Es Model.

RFC1122 term for whether host accepts datagram with a dest. address on another interface

Parameters
modeltrue for Weak Es Model
Deprecated
"Deprecated in ns-3.41: " "Use SetStrongEndSystemModel instead"
Deprecated
"Deprecated in ns-3.41: " "Use SetStrongEndSystemModel instead"

Implements ns3::Ipv4.

Definition at line 277 of file ipv4-l3-click-protocol.cc.

References m_strongEndSystemModel.

◆ SourceAddressSelection()

Ipv4Address ns3::Ipv4L3ClickProtocol::SourceAddressSelection ( uint32_t interface,
Ipv4Address dest )
overridevirtual

Choose the source address to use with destination address.

Parameters
interfaceinterface index
destIPv4 destination address
Returns
IPv4 source address to use

Implements ns3::Ipv4.

Definition at line 453 of file ipv4-l3-click-protocol.cc.

References ns3::Ipv4Address::CombineMask(), GetAddress(), ns3::Ipv4InterfaceAddress::GetLocal(), GetNAddresses(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_defaultTtl

uint8_t ns3::Ipv4L3ClickProtocol::m_defaultTtl
private

Default TTL.

Definition at line 302 of file ipv4-l3-click-protocol.h.

Referenced by GetTypeId(), Send(), and SetDefaultTtl().

◆ m_identification

uint16_t ns3::Ipv4L3ClickProtocol::m_identification
private

Identification.

Definition at line 303 of file ipv4-l3-click-protocol.h.

Referenced by BuildHeader().

◆ m_interfaces

Ipv4InterfaceList ns3::Ipv4L3ClickProtocol::m_interfaces
private

◆ m_ipForward

bool ns3::Ipv4L3ClickProtocol::m_ipForward
private

Whether IP forwarding is enabled.

Definition at line 296 of file ipv4-l3-click-protocol.h.

Referenced by AddInterface(), GetIpForward(), and SetIpForward().

◆ m_localDeliverTrace

TracedCallback<const Ipv4Header&, Ptr<const Packet>, uint32_t> ns3::Ipv4L3ClickProtocol::m_localDeliverTrace
private
Todo
This TracedCallback is invoked but not accessible.

Definition at line 312 of file ipv4-l3-click-protocol.h.

Referenced by LocalDeliver().

◆ m_node

Ptr<Node> ns3::Ipv4L3ClickProtocol::m_node
private

◆ m_promiscDeviceList

std::vector<bool> ns3::Ipv4L3ClickProtocol::m_promiscDeviceList
private

List of promiscuous devices.

Definition at line 316 of file ipv4-l3-click-protocol.h.

◆ m_protocols

L4List_t ns3::Ipv4L3ClickProtocol::m_protocols
private

List of IPv4 L4 protocols.

Definition at line 298 of file ipv4-l3-click-protocol.h.

Referenced by DoDispose(), GetProtocol(), Insert(), Insert(), Remove(), and Remove().

◆ m_reverseInterfacesContainer

Ipv4InterfaceReverseContainer ns3::Ipv4L3ClickProtocol::m_reverseInterfacesContainer
private

Container of NetDevice / Interface index associations.

Definition at line 301 of file ipv4-l3-click-protocol.h.

Referenced by AddIpv4Interface(), DoDispose(), and GetInterfaceForDevice().

◆ m_routingProtocol

Ptr<Ipv4RoutingProtocol> ns3::Ipv4L3ClickProtocol::m_routingProtocol
private

IPv4 routing protocol.

Definition at line 295 of file ipv4-l3-click-protocol.h.

Referenced by DoDispose(), GetRoutingProtocol(), Send(), SendWithHeader(), SetRoutingProtocol(), and SetupLoopback().

◆ m_sendOutgoingTrace

TracedCallback<const Ipv4Header&, Ptr<const Packet>, uint32_t> ns3::Ipv4L3ClickProtocol::m_sendOutgoingTrace
private
Todo
Remove; this TracedCallback is never invoked.

Definition at line 308 of file ipv4-l3-click-protocol.h.

◆ m_sockets

SocketList ns3::Ipv4L3ClickProtocol::m_sockets
private

List of sockets.

Definition at line 314 of file ipv4-l3-click-protocol.h.

Referenced by CreateRawSocket(), DeleteRawSocket(), DoDispose(), and Receive().

◆ m_strongEndSystemModel

bool ns3::Ipv4L3ClickProtocol::m_strongEndSystemModel
private

Whether to use Strong End System Model.

Definition at line 297 of file ipv4-l3-click-protocol.h.

Referenced by GetStrongEndSystemModel(), GetWeakEsModel(), SetStrongEndSystemModel(), and SetWeakEsModel().

◆ m_unicastForwardTrace

TracedCallback<const Ipv4Header&, Ptr<const Packet>, uint32_t> ns3::Ipv4L3ClickProtocol::m_unicastForwardTrace
private
Todo
Remove: this TracedCallback is never invoked.

Definition at line 310 of file ipv4-l3-click-protocol.h.

◆ PROT_NUMBER

const uint16_t ns3::Ipv4L3ClickProtocol::PROT_NUMBER = 0x0800
static

Protocol number for Ipv4 L3 (0x0800).

Definition at line 64 of file ipv4-l3-click-protocol.h.

Referenced by AddInterface(), Receive(), and SetupLoopback().


The documentation for this class was generated from the following files: