Kea  1.9.9-git
isc::dhcp::PgSqlLease6Exchange::Uiaid Union Reference

Union for marshalling IAID into and out of the database IAID is defined in the RFC as 4 octets, which Kea code handles as a uint32_t. More...

Public Member Functions

 Uiaid (uint32_t val)
 Constructor. More...
 
 Uiaid (int32_t val)
 Constructor. More...
 
std::string dbInputString ()
 Return a string representing the signed 32-bit value. More...
 

Public Attributes

int32_t ival_
 
uint32_t uval_
 

Detailed Description

Union for marshalling IAID into and out of the database IAID is defined in the RFC as 4 octets, which Kea code handles as a uint32_t.

Postgresql however, offers only signed integer types of sizes 2, 4, and 8 bytes (SMALLINT, INT, and BIGINT respectively). IAID is used in several indexes so rather than use the BIGINT, we use this union to safely move the value into and out of an INT column.

Definition at line 666 of file pgsql_lease_mgr.cc.

Constructor & Destructor Documentation

isc::dhcp::PgSqlLease6Exchange::Uiaid::Uiaid ( uint32_t  val)
inline

Constructor.

Parameters
valunsigned 32 bit value for the IAID.

Definition at line 669 of file pgsql_lease_mgr.cc.

isc::dhcp::PgSqlLease6Exchange::Uiaid::Uiaid ( int32_t  val)
inline

Constructor.

Parameters
valsigned 32 bit value for the IAID.

Definition at line 673 of file pgsql_lease_mgr.cc.

Member Function Documentation

std::string isc::dhcp::PgSqlLease6Exchange::Uiaid::dbInputString ( )
inline

Return a string representing the signed 32-bit value.

Definition at line 676 of file pgsql_lease_mgr.cc.

Referenced by isc::dhcp::PgSqlLeaseMgr::getLeases6().

Member Data Documentation

int32_t isc::dhcp::PgSqlLease6Exchange::Uiaid::ival_

Definition at line 681 of file pgsql_lease_mgr.cc.

uint32_t isc::dhcp::PgSqlLease6Exchange::Uiaid::uval_

Definition at line 678 of file pgsql_lease_mgr.cc.


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