Kea 2.7.5
abstract_scen.h
Go to the documentation of this file.
1// Copyright (C) 2019,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#ifndef ABSTRACT_SCEN_H
8#define ABSTRACT_SCEN_H
9
10
12
13
14namespace isc {
15namespace perfdhcp {
16
17
21class AbstractScen : public boost::noncopyable {
22public:
28 options_(options),
29 tc_(options, socket)
30 {
31 if (options_.getIpVersion() == 4) {
34 } else {
37 }
38 };
39
45 virtual int run() = 0;
46
48 virtual ~AbstractScen() {};
49
50protected:
53
54 // Helper fields to avoid checking IP version each time an exchange type
55 // is needed.
58};
59
60
61}
62}
63
64#endif // ABSTRACT_SCEN_H
Abstract Scenario class.
TestControl tc_
Object for controlling sending and receiving packets.
virtual int run()=0
Run performance test.
CommandOptions & options_
Reference to commandline options.
AbstractScen(CommandOptions &options, BasePerfSocket &socket)
Default and the only constructor of AbstractScen.
virtual ~AbstractScen()
Trivial virtual destructor.
Socket wrapper structure.
Definition perf_socket.h:26
uint8_t getIpVersion() const
Returns IP version.
Test Control class.
ExchangeType
DHCP packet exchange types.
@ RA
DHCPv4 REQUEST-ACK.
@ SA
DHCPv6 SOLICIT-ADVERTISE.
@ DO
DHCPv4 DISCOVER-OFFER.
@ RR
DHCPv6 REQUEST-REPLY.
Defines the logger used by the top-level component of kea-lfc.