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

authentication security association file More...

#include <cfg.h>

Public Member Functions

bool read_sa (const std::string &file)
 
bool read_sa (const ConfigFile &cfg, const std::string &section="")
 
bool have (uint8_t spp) const
 
bool have (uint8_t spp, uint32_t key) const
 
const Sppspp (uint8_t spp) const
 

Detailed Description

authentication security association file

Read the security association file with keys And fill the SPPs

Member Function Documentation

◆ have() [1/2]

bool SaFile::have ( uint8_t  spp) const
inline

Verify SPP is in the SA_file and have at least one key

Parameters
[in]sppID
Returns
true if SPP exist with at least one key

◆ have() [2/2]

bool SaFile::have ( uint8_t  spp,
uint32_t  key 
) const
inline

Verify key exist in an SPP

Parameters
[in]sppID
[in]keyID
Returns
true if key exist

◆ read_sa() [1/2]

bool SaFile::read_sa ( const ConfigFile cfg,
const std::string &  section = "" 
)

Read a SA file and parse it. Get file name from the configuration file.

Parameters
[in]cfgreference to configuration file object
[in]section(optional)
Returns
true if parse success, false if fail or file does not exist or configuration file have an empty sa_file.

◆ read_sa() [2/2]

bool SaFile::read_sa ( const std::string &  file)

Read a SA file and parse it

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

◆ spp()

const Spp& SaFile::spp ( uint8_t  spp) const

Get SPP by spp ID

Parameters
[in]sppID
Returns
SPP if exist or empty SPP

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