NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::nfd::CommandOptions Class Reference

contains options for ControlCommand execution More...

#include <command-options.hpp>

Collaboration diagram for ndn::nfd::CommandOptions:

Public Types

enum  SigningParamsKind { SIGNING_PARAMS_DEFAULT, SIGNING_PARAMS_IDENTITY, SIGNING_PARAMS_CERTIFICATE }
 indicates the selection of signing parameters More...
 

Public Member Functions

 CommandOptions ()
 constructs CommandOptions More...
 
const time::milliseconds & getTimeout () const
 
CommandOptionssetTimeout (const time::milliseconds &timeout)
 sets command timeout More...
 
const NamegetPrefix () const
 
CommandOptionssetPrefix (const Name &prefix)
 sets command prefix More...
 
const security::SigningInfogetSigningInfo () const
 
CommandOptionssetSigningInfo (const security::SigningInfo &signingInfo)
 sets signing parameters More...
 
 DEPRECATED (SigningParamsKind getSigningParamsKind() const)
 
 DEPRECATED (const Name &getSigningIdentity() const)
 
 DEPRECATED (const Name &getSigningCertificate() const)
 
 DEPRECATED (CommandOptions &setSigningDefault())
 chooses to use default identity and certificate More...
 
 DEPRECATED (CommandOptions &setSigningIdentity(const Name &identityName))
 chooses to use a specific identity and its default certificate More...
 
 DEPRECATED (CommandOptions &setSigningCertificate(const Name &certificateName))
 chooses to use a specific identity certificate More...
 
 DEPRECATED (CommandOptions &setSigningCertificate(const security::v1::IdentityCertificate &certificate))
 chooses to use a specific identity certificate More...
 

Static Public Attributes

static const time::milliseconds DEFAULT_TIMEOUT
 gives the default command timeout: 10000ms More...
 
static const Name DEFAULT_PREFIX
 gives the default command prefix: ndn:/localhost/nfd More...
 

Detailed Description

contains options for ControlCommand execution

Note
This type is intentionally copyable

Definition at line 43 of file command-options.hpp.

Member Enumeration Documentation

◆ SigningParamsKind

indicates the selection of signing parameters

Deprecated:
use getSigningInfo and setSigningInfo
Enumerator
SIGNING_PARAMS_DEFAULT 

picks the default signing identity and certificate

SIGNING_PARAMS_IDENTITY 

picks the default certificate of a specific identity Name

SIGNING_PARAMS_CERTIFICATE 

picks a specific identity certificate

Definition at line 102 of file command-options.hpp.

Constructor & Destructor Documentation

◆ CommandOptions()

ndn::nfd::CommandOptions::CommandOptions ( )

constructs CommandOptions

Postcondition
getTimeout() == DEFAULT_TIMEOUT
getPrefix() == DEFAULT_PREFIX
getSigningInfo().getSignerType() == SIGNER_TYPE_NULL

Definition at line 35 of file command-options.cpp.

Member Function Documentation

◆ getTimeout()

const time::milliseconds& ndn::nfd::CommandOptions::getTimeout ( ) const
inline
Returns
command timeout

Definition at line 56 of file command-options.hpp.

Referenced by ndn::nfd::Controller::Controller().

◆ setTimeout()

CommandOptions & ndn::nfd::CommandOptions::setTimeout ( const time::milliseconds &  timeout)

sets command timeout

Parameters
timeoutthe new command timeout, must be positive
Exceptions
std::out_of_rangeif timeout is non-positive
Returns
self

Definition at line 42 of file command-options.cpp.

Referenced by nfd::rib::AutoPrefixPropagator::loadConfig().

◆ getPrefix()

const Name& ndn::nfd::CommandOptions::getPrefix ( ) const
inline
Returns
command prefix

Definition at line 72 of file command-options.hpp.

Referenced by ndn::nfd::Controller::Controller().

◆ setPrefix()

CommandOptions & ndn::nfd::CommandOptions::setPrefix ( const Name prefix)

sets command prefix

Returns
self

Definition at line 53 of file command-options.cpp.

Referenced by nfd::rib::AutoPrefixPropagator::loadConfig().

◆ getSigningInfo()

const security::SigningInfo& ndn::nfd::CommandOptions::getSigningInfo ( ) const
inline
Returns
signing parameters

Definition at line 86 of file command-options.hpp.

Referenced by ndn::nfd::Controller::Controller(), and nfd::rib::AutoPrefixPropagator::disable().

◆ setSigningInfo()

◆ DEPRECATED() [1/7]

ndn::nfd::CommandOptions::DEPRECATED ( SigningParamsKind getSigningParamsKind()  const)
Deprecated:
use getSigningInfo and setSigningInfo
Returns
selection of signing parameters

◆ DEPRECATED() [2/7]

ndn::nfd::CommandOptions::DEPRECATED ( const Name &getSigningIdentity()  const)
Deprecated:
use getSigningInfo and setSigningInfo
Returns
identity Name
Precondition
getSigningParamsKind() == SIGNING_PARAMS_IDENTITY

◆ DEPRECATED() [3/7]

ndn::nfd::CommandOptions::DEPRECATED ( const Name &getSigningCertificate()  const)
Deprecated:
use getSigningInfo and setSigningInfo
Returns
certificate Name
Precondition
getSigningParamsKind() == SIGNING_PARAMS_CERTIFICATE

◆ DEPRECATED() [4/7]

ndn::nfd::CommandOptions::DEPRECATED ( CommandOptions setSigningDefault())

chooses to use default identity and certificate

Deprecated:
use getSigningInfo and setSigningInfo
Postcondition
getSigningParamsKind() == SIGNING_PARAMS_DEFAULT
Returns
self

◆ DEPRECATED() [5/7]

ndn::nfd::CommandOptions::DEPRECATED ( CommandOptions setSigningIdentityconst Name &identityName)

chooses to use a specific identity and its default certificate

Deprecated:
use getSigningInfo and setSigningInfo
Postcondition
getSigningParamsKind() == SIGNING_PARAMS_IDENTITY
getIdentityName() == identityName
Returns
self

◆ DEPRECATED() [6/7]

ndn::nfd::CommandOptions::DEPRECATED ( CommandOptions setSigningCertificateconst Name &certificateName)

chooses to use a specific identity certificate

Deprecated:
use getSigningInfo and setSigningInfo
Parameters
certificateNameidentity certificate Name
Exceptions
std::invalid_argumentif certificateName is invalid
Postcondition
getSigningParamsKind() == SIGNING_PARAMS_CERTIFICATE
getSigningCertificate() == certificateName
Returns
self

◆ DEPRECATED() [7/7]

ndn::nfd::CommandOptions::DEPRECATED ( CommandOptions setSigningCertificateconst security::v1::IdentityCertificate &certificate)

chooses to use a specific identity certificate

Deprecated:
use getSigningInfo and setSigningInfo

This is equivalent to .setIdentityCertificate(certificate.getName())

Member Data Documentation

◆ DEFAULT_TIMEOUT

const time::milliseconds ndn::nfd::CommandOptions::DEFAULT_TIMEOUT
static

gives the default command timeout: 10000ms

Definition at line 181 of file command-options.hpp.

◆ DEFAULT_PREFIX

const Name ndn::nfd::CommandOptions::DEFAULT_PREFIX
static

gives the default command prefix: ndn:/localhost/nfd

Definition at line 185 of file command-options.hpp.


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