Kea: isc::perfdhcp::CommandOptions Class Reference

| Kea 2.2.0

Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
isc::perfdhcp::CommandOptions Class Reference

Command Options. More...

`#include <command_options.h>`

Inheritance diagram for isc::perfdhcp::CommandOptions:
[legend]

## Classes
class | LeaseType
| A class encapsulating the type of lease being requested from the server. More...

## Public Types
enum | ExchangeMode { DO_SA , DORA_SARR }
| 2-way (cmd line param -i) or 4-way exchanges More...
typedef std::vector< std::vector< uint8_t > > | MacAddrsVector
| A vector holding MAC addresses. More...

## Public Member Functions
| CommandOptions ()
| Default Constructor. More...
bool | checkMultiSubnet ()
| Check if multi subnet mode is enabled. More...
bool | getAddrUnique () const
| Returns address uniqueness value. More...
std::vector< std::string > | getBase () const
| Returns base values. More...
int | getCleanReport () const
| Returns clean report mode. More...
std::string | getCleanReportSeparator () const
| Returns clean report separator. More...
uint32_t | getClientsNum () const
| Returns number of simulated clients. More...
std::string | getDiags () const
| Returns diagnostic selectors. More...
std::vector< double > | getDropTime () const
| Returns drop time. More...
std::vector< uint8_t > | getDuidTemplate () const
| Returns DUID template. More...
int | getElapsedTimeOffset () const
| Returns template offset for elapsed time. More...
ExchangeMode | getExchangeMode () const
| Returns packet exchange mode. More...
int | getExitWaitTime () const
| Returns the time in microseconds to delay the program by. More...
const isc::dhcp::OptionCollection & | getExtraOpts () const
| Returns extra options to be inserted. More...
int | getIncreaseElapsedTime () const
| Returns increased elapsed time. More...
uint8_t | getIpVersion () const
| Returns IP version. More...
LeaseType | getLeaseType () const
| \ brief Returns the type of lease being requested. More...
std::string | getLocalName () const
| Returns local address or interface name. More...
int | getLocalPort () const
| Returns local port number. More...
std::string | getMacListFile () const
| Returns location of the file containing list of MAC addresses. More...
const MacAddrsVector & | getMacsFromFile () const
| Returns reference to a vector of MAC addresses read from a file. More...
std::vector< uint8_t > | getMacTemplate () const
| Returns MAC address template. More...
std::vector< int > | getMaxDrop () const
| Returns maximum drops number. More...
std::vector< double > | getMaxDropPercentage () const
| Returns maximal percentage of drops. More...
std::vector< int > | getNumRequests () const
| Returns maximum number of exchanges. More...
int | getPeriod () const
| Returns test period. More...
int | getPreload () const
| Returns number of preload exchanges. More...
std::vector< int > | getRandomOffset () const
| Returns template offsets for rnd. More...
std::string | getRandRelayAddr ()
| Returns random relay address. More...
int | getRate () const
| Returns exchange rate. More...
std::vector< std::string > | getRelayAddrList () const
| Returns list of relay addresses. More...
std::string | getRelayAddrListFile () const
| Returns file location with set of relay addresses. More...
int | getReleaseRate () const
| Returns a rate at which DHCPv6 Release messages are sent. More...
int | getRemotePort () const
| Returns remote port number. More...
int | getRenewRate () const
| Returns a rate at which DHCPv6 Renew messages are sent. More...
int | getReportDelay () const
| Returns delay between two performance reports. More...
int | getRequestedIpOffset () const
| Returns template offset for requested IP. More...
Scenario | getScenario () const
| Returns selected scenario. More...
uint32_t | getSeed () const
| Returns random seed. More...
int | getServerIdOffset () const
| Returns template offset for server-ID. More...
std::string | getServerName () const
| Returns server name. More...
std::vector< std::string > | getTemplateFiles () const
| Returns template file names. More...
std::vector< int > | getTransactionIdOffset () const
| brief Returns template offsets for xid. More...
int | getWaitForElapsedTime () const
| Returns time to wait for elapsed time increase. More...
std::string | getWrapped () const
| Returns wrapped command. More...
bool | isBroadcast () const
| Checks if broadcast address is to be used. More...
bool | isInterface () const
| Checks if interface name was used. More...
bool | isRapidCommit () const
| Check if rapid commit option used. More...
bool | isSeeded () const
| Checks if seed provided. More...
bool | isSingleThreaded () const
| Check if single-threaded mode is enabled. More...
bool | isUseFirst () const
| Check if server-ID to be taken from first package. More...
bool | isUseRelayedV6 () const
| Check if generated DHCPv6 messages should appear as relayed. More...
bool | parse (int argc, char **const argv, bool print_cmd_line=false)
| Parse command line. More...
void | printCommandLine () const
| Print command line arguments. More...
void | reset ()
| Reset to defaults. More...
bool | testDiags (const char diag)
| Find if diagnostic flag has been set. More...
void | version () const
| Print program version. More...

## Static Public Member Functions
static void | usage ()
| Print usage. More...

## Detailed Description

Command Options.

This class is responsible for parsing the command-line and storing the specified options.

Definition at line 30 of file command_options.h.

## Member Typedef Documentation

## ◆ MacAddrsVector

typedef std::vector<std::vector<uint8_t> > isc::perfdhcp::CommandOptions::MacAddrsVector

A vector holding MAC addresses.

Definition at line 42 of file command_options.h.

## Member Enumeration Documentation

## ◆ ExchangeMode

enum isc::perfdhcp::CommandOptions::ExchangeMode

2-way (cmd line param -i) or 4-way exchanges

Enumerator
DO_SA |
DORA_SARR |

Definition at line 117 of file command_options.h.

## Constructor & Destructor Documentation

## ◆ CommandOptions()

isc::perfdhcp::CommandOptions::CommandOptions | ( |  | ) |
| inline

Default Constructor.

Private constructor as this is a singleton class. Use CommandOptions::instance() to get instance of it.

Definition at line 37 of file command_options.h.

References reset().

Here is the call graph for this function:

## Member Function Documentation

## ◆ checkMultiSubnet()

bool isc::perfdhcp::CommandOptions::checkMultiSubnet | ( |  | ) |
| inline

Check if multi subnet mode is enabled.

Returns
  true if multi subnet mode is enabled.

Definition at line 413 of file command_options.h.

## ◆ getAddrUnique()

bool isc::perfdhcp::CommandOptions::getAddrUnique | ( |  | ) | const
| inline

Returns address uniqueness value.

Returns
  address uniqueness specified value.

Definition at line 209 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::address4Uniqueness(), and isc::perfdhcp::TestControl::address6Uniqueness().

## ◆ getBase()

std::vector< std::string > isc::perfdhcp::CommandOptions::getBase | ( |  | ) | const
| inline

Returns base values.

Returns
  all base values specified.

Definition at line 204 of file command_options.h.

## ◆ getCleanReport()

int isc::perfdhcp::CommandOptions::getCleanReport | ( |  | ) | const
| inline

Returns clean report mode.

Returns
  true if cleaner report is enabled.

Definition at line 179 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::printIntermediateStats().

## ◆ getCleanReportSeparator()

std::string isc::perfdhcp::CommandOptions::getCleanReportSeparator | ( |  | ) | const
| inline

Returns clean report separator.

Returns
  returns string which is used as separator for report..

Definition at line 184 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::printIntermediateStats().

## ◆ getClientsNum()

uint32_t isc::perfdhcp::CommandOptions::getClientsNum | ( |  | ) | const
| inline

Returns number of simulated clients.

Returns
  number of simulated clients.

Definition at line 189 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::TestControl(), isc::perfdhcp::TestControl::generateDuid(), isc::perfdhcp::TestControl::generateMacAddress(), and isc::perfdhcp::AvalancheScen::run().

## ◆ getDiags()

std::string isc::perfdhcp::CommandOptions::getDiags | ( |  | ) | const
| inline

Returns diagnostic selectors.

Returns
  diagnostics selector.

Definition at line 368 of file command_options.h.

Referenced by main(), and testDiags().

## ◆ getDropTime()

std::vector< double > isc::perfdhcp::CommandOptions::getDropTime | ( |  | ) | const
| inline

Returns drop time.

The method returns maximum time elapsed from sending the packet before it is assumed dropped.

Returns
  return time before request is assumed dropped.

Definition at line 239 of file command_options.h.

Referenced by isc::perfdhcp::StatsMgr::StatsMgr().

## ◆ getDuidTemplate()

std::vector< uint8_t > isc::perfdhcp::CommandOptions::getDuidTemplate | ( |  | ) | const
| inline

Returns DUID template.

Returns
  DUID template to simulate different clients.

Definition at line 199 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::generateDuid(), and isc::perfdhcp::TestControl::printDiagnostics().

## ◆ getElapsedTimeOffset()

int isc::perfdhcp::CommandOptions::getElapsedTimeOffset | ( |  | ) | const
| inline

Returns template offset for elapsed time.

Returns
  template offset for elapsed time.

Definition at line 353 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::getElapsedTimeOffset().

## ◆ getExchangeMode()

ExchangeMode isc::perfdhcp::CommandOptions::getExchangeMode | ( |  | ) | const
| inline

Returns packet exchange mode.

Returns
  packet exchange mode.

Definition at line 149 of file command_options.h.

Referenced by isc::perfdhcp::StatsMgr::StatsMgr(), isc::perfdhcp::TestControl::printRate(), isc::perfdhcp::TestControl::processReceivedPacket4(), isc::perfdhcp::TestControl::processReceivedPacket6(), and isc::perfdhcp::AvalancheScen::run().

## ◆ getExitWaitTime()

int isc::perfdhcp::CommandOptions::getExitWaitTime | ( |  | ) | const
| inline

Returns the time in microseconds to delay the program by.

Returns
  the time in microseconds to delay the program by.

Definition at line 288 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::waitToExit().

## ◆ getExtraOpts()

const isc::dhcp::OptionCollection & isc::perfdhcp::CommandOptions::getExtraOpts | ( |  | ) | const
| inline

Returns extra options to be inserted.

Returns
  container with options.

Definition at line 378 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::addExtraOpts().

## ◆ getIncreaseElapsedTime()

int isc::perfdhcp::CommandOptions::getIncreaseElapsedTime | ( |  | ) | const
| inline

Returns increased elapsed time.

Returns
  how long perfdhcp will send messages with increased elapsed time.

Definition at line 231 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::sendDiscover4(), and isc::perfdhcp::TestControl::sendSolicit6().

## ◆ getIpVersion()

uint8_t isc::perfdhcp::CommandOptions::getIpVersion | ( |  | ) | const
| inline

Returns IP version.

Returns
  IP version to be used.

Definition at line 144 of file command_options.h.

Referenced by isc::perfdhcp::AbstractScen::AbstractScen(), isc::perfdhcp::StatsMgr::StatsMgr(), isc::perfdhcp::TestControl::TestControl(), isc::perfdhcp::TestControl::consumeReceivedPackets(), isc::perfdhcp::TestControl::getElapsedTimeOffset(), isc::perfdhcp::TestControl::getRandomOffset(), isc::perfdhcp::TestControl::getRequestedIpOffset(), isc::perfdhcp::TestControl::getServerIdOffset(), isc::perfdhcp::TestControl::getTransactionIdOffset(), isc::perfdhcp::TestControl::haveAllPacketsBeenReceived(), isc::perfdhcp::PerfSocket::openSocket(), isc::perfdhcp::TestControl::printRate(), isc::perfdhcp::TestControl::printTemplate(), isc::perfdhcp::TestControl::printTemplates(), isc::perfdhcp::TestControl::registerOptionFactories(), isc::perfdhcp::AvalancheScen::resendPackets(), isc::perfdhcp::BasicScen::run(), and isc::perfdhcp::TestControl::sendPackets().

## ◆ getLeaseType()

LeaseType isc::perfdhcp::CommandOptions::getLeaseType | ( |  | ) | const
| inline

\ brief Returns the type of lease being requested.

Returns
  type of lease being requested by perfdhcp.

Definition at line 154 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::copyIaOptions(), printCommandLine(), isc::perfdhcp::TestControl::sendSolicit6(), and isc::perfdhcp::TestControl::validateIA().

## ◆ getLocalName()

std::string isc::perfdhcp::CommandOptions::getLocalName | ( |  | ) | const
| inline

Returns local address or interface name.

Returns
  local address or interface name.

Definition at line 260 of file command_options.h.

Referenced by isc::perfdhcp::PerfSocket::openSocket().

## ◆ getLocalPort()

int isc::perfdhcp::CommandOptions::getLocalPort | ( |  | ) | const
| inline

Returns local port number.

Returns
  local port number.

Definition at line 278 of file command_options.h.

Referenced by isc::perfdhcp::PerfSocket::openSocket().

## ◆ getMacListFile()

std::string isc::perfdhcp::CommandOptions::getMacListFile | ( |  | ) | const
| inline

Returns location of the file containing list of MAC addresses.

MAC addresses read from the file are used by the perfdhcp in message exchanges with the DHCP server.

Returns
  Location of the file containing list of MAC addresses.

Definition at line 331 of file command_options.h.

## ◆ getMacsFromFile()

const MacAddrsVector & isc::perfdhcp::CommandOptions::getMacsFromFile | ( |  | ) | const
| inline

Returns reference to a vector of MAC addresses read from a file.

Every MAC address is represented as a vector.

Returns
  Reference to a vector of vectors.

Definition at line 338 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::generateDuid(), and isc::perfdhcp::TestControl::generateMacAddress().

## ◆ getMacTemplate()

std::vector< uint8_t > isc::perfdhcp::CommandOptions::getMacTemplate | ( |  | ) | const
| inline

Returns MAC address template.

Returns
  MAC address template to simulate different clients.

Definition at line 194 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::generateMacAddress(), and isc::perfdhcp::TestControl::printDiagnostics().

## ◆ getMaxDrop()

std::vector< int > isc::perfdhcp::CommandOptions::getMaxDrop | ( |  | ) | const
| inline

Returns maximum drops number.

Returns maximum number of packet drops before aborting a test.

Returns
  maximum number of dropped requests.

Definition at line 247 of file command_options.h.

Referenced by isc::perfdhcp::BasicScen::checkExitConditions().

## ◆ getMaxDropPercentage()

std::vector< double > isc::perfdhcp::CommandOptions::getMaxDropPercentage | ( |  | ) | const
| inline

Returns maximal percentage of drops.

Returns maximal percentage of packet drops before aborting a test.

Returns
  maximum percentage of lost requests.

Definition at line 255 of file command_options.h.

Referenced by isc::perfdhcp::BasicScen::checkExitConditions().

## ◆ getNumRequests()

std::vector< int > isc::perfdhcp::CommandOptions::getNumRequests | ( |  | ) | const
| inline

Returns maximum number of exchanges.

Returns
  number of exchange requests before test is aborted.

Definition at line 214 of file command_options.h.

Referenced by isc::perfdhcp::BasicScen::checkExitConditions(), and isc::perfdhcp::TestControl::haveAllPacketsBeenReceived().

## ◆ getPeriod()

int isc::perfdhcp::CommandOptions::getPeriod | ( |  | ) | const
| inline

Returns test period.

Returns
  test period before it is aborted.

Definition at line 219 of file command_options.h.

Referenced by isc::perfdhcp::BasicScen::checkExitConditions().

## ◆ getPreload()

int isc::perfdhcp::CommandOptions::getPreload | ( |  | ) | const
| inline

Returns number of preload exchanges.

Returns
  number of preload exchanges.

Definition at line 273 of file command_options.h.

Referenced by isc::perfdhcp::BasicScen::run().

## ◆ getRandomOffset()

std::vector< int > isc::perfdhcp::CommandOptions::getRandomOffset | ( |  | ) | const
| inline

Returns template offsets for rnd.

Returns
  template offsets for rnd.

Definition at line 348 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::getRandomOffset().

## ◆ getRandRelayAddr()

std::string isc::perfdhcp::CommandOptions::getRandRelayAddr | ( |  | ) |
| inline

Returns random relay address.

Returns
  single string containing relay address.

Definition at line 408 of file command_options.h.

## ◆ getRate()

int isc::perfdhcp::CommandOptions::getRate | ( |  | ) | const
| inline

Returns exchange rate.

Returns
  exchange rate per second.

Definition at line 159 of file command_options.h.

Referenced by isc::perfdhcp::BasicScen::BasicScen(), isc::perfdhcp::TestControl::printRate(), and isc::perfdhcp::BasicScen::run().

## ◆ getRelayAddrList()

std::vector< std::string > isc::perfdhcp::CommandOptions::getRelayAddrList | ( |  | ) | const
| inline

Returns list of relay addresses.

Returns
  list of relay addresses.

Definition at line 403 of file command_options.h.

## ◆ getRelayAddrListFile()

std::string isc::perfdhcp::CommandOptions::getRelayAddrListFile | ( |  | ) | const
| inline

Returns file location with set of relay addresses.

Returns
  relay addresses list file location.

Definition at line 398 of file command_options.h.

## ◆ getReleaseRate()

int isc::perfdhcp::CommandOptions::getReleaseRate | ( |  | ) | const
| inline

Returns a rate at which DHCPv6 Release messages are sent.

Returns
  A rate at which DHCPv6 Release messages are sent.

Definition at line 169 of file command_options.h.

Referenced by isc::perfdhcp::BasicScen::BasicScen(), isc::perfdhcp::StatsMgr::StatsMgr(), printCommandLine(), and isc::perfdhcp::BasicScen::run().

## ◆ getRemotePort()

int isc::perfdhcp::CommandOptions::getRemotePort | ( |  | ) | const
| inline

Returns remote port number.

Returns
  remote port number.

Definition at line 283 of file command_options.h.

## ◆ getRenewRate()

int isc::perfdhcp::CommandOptions::getRenewRate | ( |  | ) | const
| inline

Returns a rate at which DHCPv6 Renew messages are sent.

Returns
  A rate at which IPv6 Renew messages are sent.

Definition at line 164 of file command_options.h.

Referenced by isc::perfdhcp::BasicScen::BasicScen(), isc::perfdhcp::StatsMgr::StatsMgr(), isc::perfdhcp::TestControl::cleanCachedPackets(), printCommandLine(), and isc::perfdhcp::BasicScen::run().

## ◆ getReportDelay()

int isc::perfdhcp::CommandOptions::getReportDelay | ( |  | ) | const
| inline

Returns delay between two performance reports.

Returns
  delay between two consecutive performance reports.

Definition at line 174 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::printIntermediateStats(), and isc::perfdhcp::BasicScen::run().

## ◆ getRequestedIpOffset()

int isc::perfdhcp::CommandOptions::getRequestedIpOffset | ( |  | ) | const
| inline

Returns template offset for requested IP.

Returns
  template offset for requested IP.

Definition at line 363 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::getRequestedIpOffset().

## ◆ getScenario()

Scenario isc::perfdhcp::CommandOptions::getScenario | ( |  | ) | const
| inline

Returns selected scenario.

Returns
  enum Scenario.

Definition at line 388 of file command_options.h.

Referenced by main().

## ◆ getSeed()

uint32_t isc::perfdhcp::CommandOptions::getSeed | ( |  | ) | const
| inline

Returns random seed.

Returns
  random seed.

Definition at line 298 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::TestControl().

## ◆ getServerIdOffset()

int isc::perfdhcp::CommandOptions::getServerIdOffset | ( |  | ) | const
| inline

Returns template offset for server-ID.

Returns
  template offset for server-ID.

Definition at line 358 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::getServerIdOffset().

## ◆ getServerName()

std::string isc::perfdhcp::CommandOptions::getServerName | ( |  | ) | const
| inline

Returns server name.

Returns
  server name.

Definition at line 393 of file command_options.h.

Referenced by isc::perfdhcp::PerfSocket::openSocket().

## ◆ getTemplateFiles()

std::vector< std::string > isc::perfdhcp::CommandOptions::getTemplateFiles | ( |  | ) | const
| inline

Returns template file names.

Returns
  template file names.

Definition at line 323 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::initPacketTemplates().

## ◆ getTransactionIdOffset()

std::vector< int > isc::perfdhcp::CommandOptions::getTransactionIdOffset | ( |  | ) | const
| inline

brief Returns template offsets for xid.

Returns
  template offsets for xid.

Definition at line 343 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::getTransactionIdOffset().

## ◆ getWaitForElapsedTime()

int isc::perfdhcp::CommandOptions::getWaitForElapsedTime | ( |  | ) | const
| inline

Returns time to wait for elapsed time increase.

Returns
  how long perfdhcp will wait before start sending messages with increased elapsed time.

Definition at line 225 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::sendDiscover4(), and isc::perfdhcp::TestControl::sendSolicit6().

## ◆ getWrapped()

std::string isc::perfdhcp::CommandOptions::getWrapped | ( |  | ) | const
| inline

Returns wrapped command.

Returns
  wrapped command (start/stop).

Definition at line 373 of file command_options.h.

Referenced by isc::perfdhcp::BasicScen::run(), and isc::perfdhcp::TestControl::runWrapped().

## ◆ isBroadcast()

bool isc::perfdhcp::CommandOptions::isBroadcast | ( |  | ) | const
| inline

Checks if broadcast address is to be used.

Returns
  true if broadcast address is to be used.

Definition at line 303 of file command_options.h.

## ◆ isInterface()

bool isc::perfdhcp::CommandOptions::isInterface | ( |  | ) | const
| inline

Checks if interface name was used.

The method checks if interface name was used rather than address.

Returns
  true if interface name was used.

Definition at line 268 of file command_options.h.

## ◆ isRapidCommit()

bool isc::perfdhcp::CommandOptions::isRapidCommit | ( |  | ) | const
| inline

Check if rapid commit option used.

Returns
  true if rapid commit option is used.

Definition at line 308 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::printRate(), and isc::perfdhcp::TestControl::sendSolicit6().

## ◆ isSeeded()

bool isc::perfdhcp::CommandOptions::isSeeded | ( |  | ) | const
| inline

Checks if seed provided.

Returns
  true if seed was provided.

Definition at line 293 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::TestControl().

## ◆ isSingleThreaded()

bool isc::perfdhcp::CommandOptions::isSingleThreaded | ( |  | ) | const
| inline

Check if single-threaded mode is enabled.

Returns
  true if single-threaded mode is enabled.

Definition at line 383 of file command_options.h.

## ◆ isUseFirst()

bool isc::perfdhcp::CommandOptions::isUseFirst | ( |  | ) | const
| inline

Check if server-ID to be taken from first package.

Returns
  true if server-iD to be taken from first package.

Definition at line 313 of file command_options.h.

Referenced by isc::perfdhcp::TestControl::createMessageFromAck(), isc::perfdhcp::TestControl::sendRequest4(), and isc::perfdhcp::TestControl::sendRequest6().

## ◆ isUseRelayedV6()

bool isc::perfdhcp::CommandOptions::isUseRelayedV6 | ( |  | ) | const
| inline

Check if generated DHCPv6 messages should appear as relayed.

Returns
  true if generated traffic should appear as relayed.

Definition at line 318 of file command_options.h.

## ◆ parse()

bool isc::perfdhcp::CommandOptions::parse | ( | int | argc,
|  | char **const | argv,
|  | bool | print_cmd_line = `false`
| ) |  |

Parse command line.

Parses the command line and stores the selected options in class data members.

Parameters

  argc | Argument count passed to main().
  argv | Argument value array passed to main().
  print_cmd_line | Print the command line being run to the console.

Exceptions

  isc::InvalidParameter | if parse fails.

Returns
  true if program has been run in help or version mode ('h' or 'v' flag).

Definition at line 172 of file command_options.cc.

References reset().

Referenced by main().

Here is the call graph for this function:

## ◆ printCommandLine()

void isc::perfdhcp::CommandOptions::printCommandLine | ( |  | ) | const

Print command line arguments.

Definition at line 1058 of file command_options.cc.

References DO_SA, getLeaseType(), getReleaseRate(), getRenewRate(), and isc::perfdhcp::CommandOptions::LeaseType::toText().

Referenced by isc::perfdhcp::TestControl::printDiagnostics().

Here is the call graph for this function:

## ◆ reset()

void isc::perfdhcp::CommandOptions::reset | ( |  | ) |

Reset to defaults.

Reset data members to default values. This is specifically useful when unit tests are performed using different command line options.

Definition at line 102 of file command_options.cc.

References isc::perfdhcp::CommandOptions::LeaseType::ADDRESS, isc::perfdhcp::BASIC, DORA_SARR, and isc::perfdhcp::CommandOptions::LeaseType::set().

Referenced by CommandOptions(), and parse().

Here is the call graph for this function:

## ◆ testDiags()

bool isc::perfdhcp::CommandOptions::testDiags | ( | const char | diag | ) |
| inline

Find if diagnostic flag has been set.

Parameters

  diag | diagnostic flag (a,e,i,s,r,t,T).

Returns
  true if diagnostics flag has been set.

Definition at line 419 of file command_options.h.

References getDiags().

Referenced by isc::perfdhcp::StatsMgr::StatsMgr(), isc::perfdhcp::BasicScen::checkExitConditions(), isc::perfdhcp::TestControl::printDiagnostics(), isc::perfdhcp::TestControl::printStats(), isc::perfdhcp::AvalancheScen::run(), isc::perfdhcp::BasicScen::run(), isc::perfdhcp::TestControl::saveFirstPacket(), and isc::perfdhcp::TestControl::sendRequest6().

Here is the call graph for this function:

## ◆ usage()

void isc::perfdhcp::CommandOptions::usage | ( |  | ) |
| static

Print usage.

Prints perfdhcp usage.

Definition at line 1167 of file command_options.cc.

## ◆ version()

void isc::perfdhcp::CommandOptions::version | ( |  | ) | const

Print program version.

Prints perfdhcp version.

Definition at line 1173 of file command_options.cc.

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

- command_options.h
- command_options.cc