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

A representation of DHCP client on an interface. More...

+ Inheritance diagram for VOM::dhcp_client:
+ Collaboration diagram for VOM::dhcp_client:

Data Structures

class  event_listener
 A class that listens to DHCP Events. More...
 
struct  lease_t
 A DHCP lease data. More...
 
struct  state_t
 

Public Types

typedef interface::key_t key_t
 typedef for the DHCP client key type More...
 

Public Member Functions

 dhcp_client (const interface &itf, const std::string &hostname, bool set_broadcast_flag=true, const ip_dscp_t &dscp=ip_dscp_t::DSCP_CS0, event_listener *ev=nullptr)
 Construct a new object matching the desried state. More...
 
 dhcp_client (const interface &itf, const std::string &hostname, const l2_address_t &client_id, bool set_broadcast_flag=true, const ip_dscp_t &dscp=ip_dscp_t::DSCP_CS0, event_listener *ev=nullptr)
 Construct a new object matching the desried state. More...
 
 dhcp_client (const dhcp_client &o)
 Copy Constructor. More...
 
 ~dhcp_client ()
 Destructor. More...
 
bool operator== (const dhcp_client &d) const
 Comparison operator - for UT. More...
 
const key_tkey () const
 Return the object's key. More...
 
std::shared_ptr< dhcp_clientsingular () const
 Return the 'singular' of the DHCP client that matches this object. More...
 
std::string to_string () const
 convert to string format for debug purposes More...
 
const std::shared_ptr< lease_tlease () const
 return the current lease data More...
 

Static Public Member Functions

static void dump (std::ostream &os)
 Dump all DHCP clients into the stream provided. More...
 
static std::shared_ptr< dhcp_clientfind (const key_t &k)
 Find a DHCP client from its key. More...
 

Friends

class OM
 
class singular_db< key_t, dhcp_client >
 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 representation of DHCP client on an interface.

Definition at line 34 of file dhcp_client.hpp.

Member Typedef Documentation

◆ key_t

typedef for the DHCP client key type

Definition at line 40 of file dhcp_client.hpp.

Constructor & Destructor Documentation

◆ dhcp_client() [1/3]

VOM::dhcp_client::dhcp_client ( const interface itf,
const std::string hostname,
bool  set_broadcast_flag = true,
const ip_dscp_t dscp = ip_dscp_t::DSCP_CS0,
event_listener ev = nullptr 
)

Construct a new object matching the desried state.

Definition at line 48 of file dhcp_client.cpp.

◆ dhcp_client() [2/3]

VOM::dhcp_client::dhcp_client ( const interface itf,
const std::string hostname,
const l2_address_t client_id,
bool  set_broadcast_flag = true,
const ip_dscp_t dscp = ip_dscp_t::DSCP_CS0,
event_listener ev = nullptr 
)

Construct a new object matching the desried state.

Definition at line 64 of file dhcp_client.cpp.

◆ dhcp_client() [3/3]

VOM::dhcp_client::dhcp_client ( const dhcp_client o)

Copy Constructor.

Definition at line 81 of file dhcp_client.cpp.

◆ ~dhcp_client()

VOM::dhcp_client::~dhcp_client ( )

Destructor.

Definition at line 93 of file dhcp_client.cpp.

Member Function Documentation

◆ dump()

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

Dump all DHCP clients into the stream provided.

Definition at line 125 of file dhcp_client.cpp.

+ Here is the call graph for this function:

◆ find()

std::shared_ptr< dhcp_client > VOM::dhcp_client::find ( const key_t k)
static

Find a DHCP client from its key.

Definition at line 191 of file dhcp_client.cpp.

◆ key()

const dhcp_client::key_t & VOM::dhcp_client::key ( ) const

Return the object's key.

Definition at line 109 of file dhcp_client.cpp.

+ Here is the caller graph for this function:

◆ lease()

const std::shared_ptr< dhcp_client::lease_t > VOM::dhcp_client::lease ( ) const

return the current lease data

Definition at line 173 of file dhcp_client.cpp.

◆ operator==()

bool VOM::dhcp_client::operator== ( const dhcp_client d) const

Comparison operator - for UT.

Definition at line 102 of file dhcp_client.cpp.

+ Here is the call graph for this function:

◆ singular()

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

Return the 'singular' of the DHCP client that matches this object.

Definition at line 197 of file dhcp_client.cpp.

◆ to_string()

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

convert to string format for debug purposes

Implements VOM::object_base.

Definition at line 140 of file dhcp_client.cpp.

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ OM

friend class OM
friend

Definition at line 222 of file dhcp_client.hpp.

◆ singular_db< key_t, dhcp_client >

friend class singular_db< key_t, dhcp_client >
friend

It's the singular_db class that calls replay()

Definition at line 227 of file dhcp_client.hpp.


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