FD.io VPP  v18.07.1-19-g511ce25
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, 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, 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

typedef for the DHCP client key type

Definition at line 40 of file dhcp_client.hpp.

Constructor & Destructor Documentation

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

Construct a new object matching the desried state.

Definition at line 47 of file dhcp_client.cpp.

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

Construct a new object matching the desried state.

Definition at line 61 of file dhcp_client.cpp.

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

Copy Constructor.

Definition at line 76 of file dhcp_client.cpp.

VOM::dhcp_client::~dhcp_client ( )

Destructor.

Definition at line 87 of file dhcp_client.cpp.

Member Function Documentation

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

Dump all DHCP clients into the stream provided.

Definition at line 119 of file dhcp_client.cpp.

+ Here is the call graph for this function:

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

Find a DHCP client from its key.

Definition at line 184 of file dhcp_client.cpp.

+ Here is the caller graph for this function:

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

Return the object's key.

Definition at line 103 of file dhcp_client.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

return the current lease data

Definition at line 166 of file dhcp_client.cpp.

+ Here is the caller graph for this function:

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

Comparison operator - for UT.

Definition at line 96 of file dhcp_client.cpp.

+ Here is the call graph for this function:

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

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

Definition at line 190 of file dhcp_client.cpp.

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

convert to string format for debug purposes

Implements VOM::object_base.

Definition at line 134 of file dhcp_client.cpp.

+ Here is the call graph for this function:

Friends And Related Function Documentation

friend class OM
friend

Definition at line 220 of file dhcp_client.hpp.

friend class singular_db< key_t, dhcp_client >
friend

It's the singular_db class that calls replay()

Definition at line 225 of file dhcp_client.hpp.


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