libptpmgmt  1.4
libptpmgmt library that provides the functionality of linuxptp pmc
Public Member Functions | List of all members
ConfigFile Class Reference

Hold configuration parameters. More...

#include <cfg.h>

Public Member Functions

bool read_cfg (const std::string &file)
 
uint8_t transportSpecific (const std::string &section="") const
 
uint8_t domainNumber (const std::string &section="") const
 
uint8_t udp6_scope (const std::string &section="") const
 
uint8_t udp_ttl (const std::string &section="") const
 
uint8_t socket_priority (const std::string &section="") const
 
uint8_t network_transport (const std::string &section="") const
 
uint32_t active_key_id (const std::string &section="") const
 
uint8_t spp (const std::string &section="") const
 
uint8_t allow_unauth (const std::string &section="") const
 
bool haveSpp (const std::string &section="") const
 
const std::string & uds_address (const std::string &section="") const
 
const std::string & sa_file (const std::string &section="") const
 
const Binaryptp_dst_mac (const std::string &section="") const
 
const Binaryp2p_dst_mac (const std::string &section="") const
 

Detailed Description

Hold configuration parameters.

Stores provides and parses parameters from a configuration file for all sections

Member Function Documentation

◆ active_key_id()

uint32_t ConfigFile::active_key_id ( const std::string &  section = "") const

Get the authentication key ID value

Parameters
[in]section(optional)
Returns
value
Note
calling without section will fetch value from "global" section

◆ allow_unauth()

uint8_t ConfigFile::allow_unauth ( const std::string &  section = "") const

Get accept unauthenticated response messages value

Parameters
[in]section(optional)
Returns
the allow unauthenticated messages value
Note
calling without section will fetch value from "global" section

◆ domainNumber()

uint8_t ConfigFile::domainNumber ( const std::string &  section = "") const

Get the domainNumber value

Parameters
[in]section(optional)
Returns
value
Note
calling without section will fetch value from "global" section

◆ haveSpp()

bool ConfigFile::haveSpp ( const std::string &  section = "") const

Query whether the authentication security parameter pointer is set

Parameters
[in]section(optional)
Returns
true if value is set
Note
calling without section will Query the "global" section

◆ network_transport()

uint8_t ConfigFile::network_transport ( const std::string &  section = "") const

Get the network_transport value

Parameters
[in]section(optional)
Returns
value
Note
calling without section will fetch value from "global" section

◆ p2p_dst_mac()

const Binary& ConfigFile::p2p_dst_mac ( const std::string &  section = "") const

Get the p2p_dst_mac value

Parameters
[in]section(optional)
Returns
Binary object with value
Note
calling without section will fetch value from "global" section

◆ ptp_dst_mac()

const Binary& ConfigFile::ptp_dst_mac ( const std::string &  section = "") const

Get the ptp_dst_mac value

Parameters
[in]section(optional)
Returns
Binary object with value
Note
calling without section will fetch value from "global" section

◆ read_cfg()

bool ConfigFile::read_cfg ( const std::string &  file)

Read a configuration file and parse it

Parameters
[in]filename with path
Returns
true if parse success

◆ sa_file()

const std::string& ConfigFile::sa_file ( const std::string &  section = "") const

Get the authentication security association file value

Parameters
[in]section(optional)
Returns
string object with value
Note
calling without section will fetch value from "global" section

◆ socket_priority()

uint8_t ConfigFile::socket_priority ( const std::string &  section = "") const

Get the socket_priority value

Parameters
[in]section(optional)
Returns
value
Note
calling without section will fetch value from "global" section

◆ spp()

uint8_t ConfigFile::spp ( const std::string &  section = "") const

Get the authentication security parameter pointer value

Parameters
[in]section(optional)
Returns
SPP ID
Note
calling without section will fetch value from "global" section

◆ transportSpecific()

uint8_t ConfigFile::transportSpecific ( const std::string &  section = "") const

Get the transportSpecific value

Parameters
[in]section(optional)
Returns
value
Note
calling without section will fetch value from "global" section

◆ udp6_scope()

uint8_t ConfigFile::udp6_scope ( const std::string &  section = "") const

Get the udp6_scope value

Parameters
[in]section(optional)
Returns
value
Note
calling without section will fetch value from "global" section

◆ udp_ttl()

uint8_t ConfigFile::udp_ttl ( const std::string &  section = "") const

Get the udp_ttl value

Parameters
[in]section(optional)
Returns
value
Note
calling without section will fetch value from "global" section

◆ uds_address()

const std::string& ConfigFile::uds_address ( const std::string &  section = "") const

Get the uds_address value

Parameters
[in]section(optional)
Returns
string object with value
Note
calling without section will fetch value from "global" section

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