Kea  1.9.9-git
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 
11 #include <perfdhcp/test_control.h>
12 
13 
14 namespace isc {
15 namespace perfdhcp {
16 
17 
21 class AbstractScen : public boost::noncopyable {
22 public:
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 
50 protected:
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
DHCPv6 SOLICIT-ADVERTISE.
ExchangeType
DHCP packet exchange types.
virtual ~AbstractScen()
Trivial virtual destructor.
Definition: abstract_scen.h:48
virtual int run()=0
Run performance test.
AbstractScen(CommandOptions &options, BasePerfSocket &socket)
Default and the only constructor of AbstractScen.
Definition: abstract_scen.h:27
uint8_t getIpVersion() const
Returns IP version.
Defines the logger used by the top-level component of kea-dhcp-ddns.
DHCPv4 DISCOVER-OFFER.
DHCPv6 REQUEST-REPLY.
Test Control class.
Definition: test_control.h:117
Abstract Scenario class.
Definition: abstract_scen.h:21
Socket wrapper structure.
Definition: perf_socket.h:26
TestControl tc_
Object for controlling sending and receiving packets.
Definition: abstract_scen.h:52
CommandOptions & options_
Reference to commandline options.
Definition: abstract_scen.h:48