npr::cfg namespace

Namespaces

namespace validators

Classes

struct NprConfigSectionDefinition
NPR section schema definition used by typed config facade.

Enums

enum class NprRole: uint8_t { Slave = 0u, Master }
Supported NPR runtime roles.

Typedefs

using NprConfigSection = prf::config::TypedConfigSection<NprConfigSectionDefinition>
Typed wrapper for NPR configuration section.

Functions

auto default_requested_ip_pool_size() -> uint64_t
Computes default requested IP pool size from build-time option.
auto default_role() -> std::string
Default role for current runtime.
auto effective_master_pool(const NprConfigSection& section) -> std::string
Returns pool section name used by NPR master for IP allocation.
auto effective_role(const NprConfigSection& section) -> NprRole
Parses effective NPR role from typed config.
auto effective_slave_ip_pool(const NprConfigSection& section) -> uint64_t
Returns slave requested pool size.
auto make_npr_section_schema(const std::string& section_name) -> prf::config::SectionSchema
Convenience helper that builds NPR section schema by section name.

Variables

uint64_t kMinRequestedIpPoolSize constexpr
Minimum IP pool size used by NPR client requests.

Enum documentation

enum class npr::cfg::NprRole: uint8_t

Supported NPR runtime roles.

Typedef documentation

using npr::cfg::NprConfigSection = prf::config::TypedConfigSection<NprConfigSectionDefinition>

Typed wrapper for NPR configuration section.

Function documentation

uint64_t npr::cfg::default_requested_ip_pool_size()

Computes default requested IP pool size from build-time option.

Keeps backward compatibility with older build configs that used smaller values.

std::string npr::cfg::default_role()

Default role for current runtime.

std::string npr::cfg::effective_master_pool(const NprConfigSection& section)

Returns pool section name used by NPR master for IP allocation.

NprRole npr::cfg::effective_role(const NprConfigSection& section)

Parses effective NPR role from typed config.

uint64_t npr::cfg::effective_slave_ip_pool(const NprConfigSection& section)

Returns slave requested pool size.

prf::config::SectionSchema npr::cfg::make_npr_section_schema(const std::string& section_name)

Convenience helper that builds NPR section schema by section name.

Variable documentation

uint64_t npr::cfg::kMinRequestedIpPoolSize constexpr

Minimum IP pool size used by NPR client requests.

Current runtime policy requires at least two addresses:

  • first address is consumed by USB service interface (us0) in DHCP mode
  • remaining addresses can be delegated to DHCP clients/dependent services