INET Framework for OMNeT++/OMNEST
inet::INetfilter::IHook Class Referenceabstract

This interface is used by the network protocol during processing datagrams. More...

#include <INetfilter.h>

Inheritance diagram for inet::INetfilter::IHook:
inet::AODVRouting inet::CloudDelayerBase inet::dymo::DYMO inet::GPSR inet::NetfilterInfoHook inet::sctp::SCTPNatHook inet::MatrixCloudDelayer

Public Types

enum  Type {
  PREROUTING, LOCALIN, FORWARD, POSTROUTING,
  LOCALOUT
}
 
enum  Result { ACCEPT, DROP, QUEUE, STOLEN }
 

Public Member Functions

virtual ~IHook ()
 
virtual Result datagramPreRoutingHook (INetworkDatagram *datagram, const InterfaceEntry *inputInterfaceEntry, const InterfaceEntry *&outputInterfaceEntry, L3Address &nextHopAddress)=0
 This is the first hook called by the network protocol before it routes a datagram that was received from the lower layer. More...
 
virtual Result datagramForwardHook (INetworkDatagram *datagram, const InterfaceEntry *inputInterfaceEntry, const InterfaceEntry *&outputInterfaceEntry, L3Address &nextHopAddress)=0
 This is the second hook called by the network protocol before it sends a datagram to the lower layer. More...
 
virtual Result datagramPostRoutingHook (INetworkDatagram *datagram, const InterfaceEntry *inputInterfaceEntry, const InterfaceEntry *&outputInterfaceEntry, L3Address &nextHopAddress)=0
 This is the last hook called by the network protocol before it sends a datagram to the lower layer. More...
 
virtual Result datagramLocalInHook (INetworkDatagram *datagram, const InterfaceEntry *inputInterfaceEntry)=0
 This is the last hook called by the network protocol before it sends a datagram to the upper layer. More...
 
virtual Result datagramLocalOutHook (INetworkDatagram *datagram, const InterfaceEntry *&outputInterfaceEntry, L3Address &nextHopAddress)=0
 This is the first hook called by the network protocol before it routes a datagram that was received from the upper layer. More...
 

Detailed Description

This interface is used by the network protocol during processing datagrams.

Member Enumeration Documentation

Enumerator
ACCEPT 

allows the datagram to pass to the next hook

DROP 

doesn't allow the datagram to pass to the next hook, will be deleted

QUEUE 

queues the datagram for later re-injection (e.g. when route discovery completes)

STOLEN 

doesn't allow datagram to pass to next hook, but won't be deleted

49  {
50  ACCEPT,
51  DROP,
52  QUEUE,
53  STOLEN
54  };
doesn&#39;t allow the datagram to pass to the next hook, will be deleted
Definition: INetfilter.h:51
allows the datagram to pass to the next hook
Definition: INetfilter.h:50
doesn&#39;t allow datagram to pass to next hook, but won&#39;t be deleted
Definition: INetfilter.h:53
queues the datagram for later re-injection (e.g. when route discovery completes)
Definition: INetfilter.h:52
Enumerator
PREROUTING 
LOCALIN 
FORWARD 
POSTROUTING 
LOCALOUT 
41  {
42  PREROUTING,
43  LOCALIN,
44  FORWARD,
46  LOCALOUT
47  };
Definition: INetfilter.h:42
Definition: INetfilter.h:43
Definition: INetfilter.h:45
Definition: INetfilter.h:46
Definition: INetfilter.h:44

Constructor & Destructor Documentation

virtual inet::INetfilter::IHook::~IHook ( )
inlinevirtual
56 {};

Member Function Documentation

virtual Result inet::INetfilter::IHook::datagramForwardHook ( INetworkDatagram datagram,
const InterfaceEntry inputInterfaceEntry,
const InterfaceEntry *&  outputInterfaceEntry,
L3Address nextHopAddress 
)
pure virtual

This is the second hook called by the network protocol before it sends a datagram to the lower layer.

This is done after the datagramPreRoutingHook or the datagramLocalInHook is called and the datagram is routed.

Implemented in inet::dymo::DYMO, inet::AODVRouting, inet::GPSR, inet::CloudDelayerBase, inet::NetfilterInfoHook, and inet::sctp::SCTPNatHook.

virtual Result inet::INetfilter::IHook::datagramLocalInHook ( INetworkDatagram datagram,
const InterfaceEntry inputInterfaceEntry 
)
pure virtual

This is the last hook called by the network protocol before it sends a datagram to the upper layer.

This is done after the datagramPreRoutingHook is called and the datagram is routed.

Implemented in inet::dymo::DYMO, inet::AODVRouting, inet::GPSR, inet::NetfilterInfoHook, inet::CloudDelayerBase, and inet::sctp::SCTPNatHook.

virtual Result inet::INetfilter::IHook::datagramLocalOutHook ( INetworkDatagram datagram,
const InterfaceEntry *&  outputInterfaceEntry,
L3Address nextHopAddress 
)
pure virtual

This is the first hook called by the network protocol before it routes a datagram that was received from the upper layer.

The nextHopAddress is ignored when the outputInterfaceEntry is a nullptr. After this is done

Implemented in inet::dymo::DYMO, inet::AODVRouting, inet::GPSR, inet::NetfilterInfoHook, inet::CloudDelayerBase, and inet::sctp::SCTPNatHook.

virtual Result inet::INetfilter::IHook::datagramPostRoutingHook ( INetworkDatagram datagram,
const InterfaceEntry inputInterfaceEntry,
const InterfaceEntry *&  outputInterfaceEntry,
L3Address nextHopAddress 
)
pure virtual

This is the last hook called by the network protocol before it sends a datagram to the lower layer.

Implemented in inet::dymo::DYMO, inet::AODVRouting, inet::GPSR, inet::NetfilterInfoHook, inet::CloudDelayerBase, and inet::sctp::SCTPNatHook.

virtual Result inet::INetfilter::IHook::datagramPreRoutingHook ( INetworkDatagram datagram,
const InterfaceEntry inputInterfaceEntry,
const InterfaceEntry *&  outputInterfaceEntry,
L3Address nextHopAddress 
)
pure virtual

This is the first hook called by the network protocol before it routes a datagram that was received from the lower layer.

The nextHopAddress is ignored when the outputInterfaceEntry is nullptr.

Implemented in inet::dymo::DYMO, inet::AODVRouting, inet::GPSR, inet::CloudDelayerBase, inet::NetfilterInfoHook, and inet::sctp::SCTPNatHook.


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