FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
VOM::nat_binding Class Reference

A Class representing the binding of an L2 interface to a bridge-domain and the properties of that binding. More...

+ Inheritance diagram for VOM::nat_binding:
+ Collaboration diagram for VOM::nat_binding:

Data Structures

struct  zone_t
 NAT Zoness. More...
 

Public Types

typedef std::tuple< interface::key_t, direction_t, l3_proto_tkey_t
 The key for a NAT Binding. More...
 

Public Member Functions

 nat_binding (const interface &itf, const direction_t &dir, const l3_proto_t &proto, const zone_t &zone)
 Construct a new object matching the desried state. More...
 
 nat_binding (const nat_binding &o)
 Copy Constructor. More...
 
 ~nat_binding ()
 Destructor. More...
 
bool operator== (const nat_binding &n) const
 Comparison operator - for UT. More...
 
const key_t key () const
 Return the binding's key. More...
 
std::shared_ptr< nat_bindingsingular () const
 Return the 'singular instance' of the L2 config that matches this object. More...
 
std::string to_string () const
 convert to string format for debug purposes More...
 

Static Public Member Functions

static std::shared_ptr< nat_bindingfind (const key_t &key)
 Static function to find the bridge_domain in the model. More...
 
static void dump (std::ostream &os)
 Dump all nat_bindings into the stream provided. More...
 

Friends

class OM
 
class singular_db< const key_t, nat_binding >
 It's the singular_db class that calls replay() More...
 

Additional Inherited Members

- Protected Member Functions inherited from VOM::object_base
 object_base ()=default
 Constructable by derived classes only. More...
 
virtual ~object_base ()=default
 Destructor. More...
 

Detailed Description

A Class representing the binding of an L2 interface to a bridge-domain and the properties of that binding.

Definition at line 30 of file nat_binding.hpp.

Member Typedef Documentation

◆ key_t

The key for a NAT Binding.

The zoe is not included, since the same interface is never inside and outside.

Definition at line 66 of file nat_binding.hpp.

Constructor & Destructor Documentation

◆ nat_binding() [1/2]

VOM::nat_binding::nat_binding ( const interface itf,
const direction_t dir,
const l3_proto_t proto,
const zone_t zone 
)

Construct a new object matching the desried state.

Parameters
itfThe interface onto which we bind/apply the feature
dirThe direction (input/output)
protoThe L3 proto used inside.
zoneThe NAT zone for the link

Definition at line 44 of file nat_binding.cpp.

◆ nat_binding() [2/2]

VOM::nat_binding::nat_binding ( const nat_binding o)

Copy Constructor.

Definition at line 56 of file nat_binding.cpp.

◆ ~nat_binding()

VOM::nat_binding::~nat_binding ( )

Destructor.

Definition at line 65 of file nat_binding.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ dump()

void VOM::nat_binding::dump ( std::ostream &  os)
static

Dump all nat_bindings into the stream provided.

Definition at line 186 of file nat_binding.cpp.

+ Here is the call graph for this function:

◆ find()

std::shared_ptr< nat_binding > VOM::nat_binding::find ( const key_t key)
static

Static function to find the bridge_domain in the model.

Definition at line 174 of file nat_binding.cpp.

+ Here is the call graph for this function:

◆ key()

const nat_binding::key_t VOM::nat_binding::key ( ) const

Return the binding's key.

Definition at line 72 of file nat_binding.cpp.

+ Here is the caller graph for this function:

◆ operator==()

bool VOM::nat_binding::operator== ( const nat_binding n) const

Comparison operator - for UT.

Definition at line 78 of file nat_binding.cpp.

+ Here is the call graph for this function:

◆ singular()

std::shared_ptr< nat_binding > VOM::nat_binding::singular ( ) const

Return the 'singular instance' of the L2 config that matches this object.

Definition at line 180 of file nat_binding.cpp.

◆ to_string()

std::string VOM::nat_binding::to_string ( ) const
virtual

convert to string format for debug purposes

Implements VOM::object_base.

Definition at line 157 of file nat_binding.cpp.

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ OM

friend class OM
friend

Definition at line 170 of file nat_binding.hpp.

◆ singular_db< const key_t, nat_binding >

friend class singular_db< const key_t, nat_binding >
friend

It's the singular_db class that calls replay()

Definition at line 175 of file nat_binding.hpp.


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