Kea  2.3.5-git
isc::dns::QidGenerator Class Reference

This class generates Qids for outgoing queries. More...

#include <qid_gen.h>

Public Member Functions

 QidGenerator ()
 Default constructor. More...
 
uint16_t generateQid ()
 Generate a Qid. More...
 

Static Public Member Functions

static QidGeneratorgetInstance ()
 Returns the singleton instance of the QidGenerator. More...
 

Detailed Description

This class generates Qids for outgoing queries.

It is implemented as a singleton; the public way to access it is to call getInstance()->generateQid().

It automatically seeds it with the current time when it is first used.

Definition at line 29 of file qid_gen.h.

Constructor & Destructor Documentation

◆ QidGenerator()

isc::dns::QidGenerator::QidGenerator ( )

Default constructor.

It is recommended that getInstance is used rather than creating separate instances of this class.

The constructor automatically seeds the generator with the current time.

Definition at line 29 of file qid_gen.cc.

Member Function Documentation

◆ generateQid()

uint16_t isc::dns::QidGenerator::generateQid ( )

Generate a Qid.

Returns
A random Qid

Definition at line 34 of file qid_gen.cc.

References isc::cryptolink::random().

+ Here is the call graph for this function:

◆ getInstance()

QidGenerator & isc::dns::QidGenerator::getInstance ( )
static

Returns the singleton instance of the QidGenerator.

Returns a reference to the singleton instance of the generator

Definition at line 25 of file qid_gen.cc.

Referenced by isc::d2::NameChangeTransaction::prepNewRequest().


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