Kea 2.5.5
qid_gen.h
Go to the documentation of this file.
1// Copyright (C) 2011-2021 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7// qid_gen defines a generator for query id's
8//
9// We probably want to merge this with the weighted random in the nsas
10// (and other parts where we need randomness, perhaps another thing
11// for a general libutil?)
12
13#ifndef QID_GEN_H
14#define QID_GEN_H
15
17#include <stdint.h>
18
19namespace isc {
20namespace dns {
21
30public:
34 static QidGenerator& getInstance();
35
44
48 uint16_t generateQid();
49};
50
51} // namespace dns
52} // namespace isc
53
54#endif // QID_GEN_H
This class generates Qids for outgoing queries.
Definition: qid_gen.h:29
QidGenerator()
Default constructor.
Definition: qid_gen.cc:29
uint16_t generateQid()
Generate a Qid.
Definition: qid_gen.cc:34
static QidGenerator & getInstance()
Returns the singleton instance of the QidGenerator.
Definition: qid_gen.cc:25
Defines the logger used by the top-level component of kea-lfc.