libptpmgmt  1.4
libptpmgmt library that provides the functionality of linuxptp pmc
Public Attributes | List of all members
ptpmgmt_msg_t Struct Reference

#include <msg.h>

Collaboration diagram for ptpmgmt_msg_t:
Collaboration graph
[legend]

Public Attributes

void(* free )(ptpmgmt_msg msg)
 
ptpmgmt_pMsgParams(* getParams )(ptpmgmt_msg msg)
 
bool(* updateParams )(ptpmgmt_msg msg, ptpmgmt_cpMsgParams prms)
 
bool(* useAuth_cfg )(ptpmgmt_msg msg, const_ptpmgmt_cfg cfg, const char *section)
 
bool(* useAuth )(ptpmgmt_msg msg, const_ptpmgmt_safile sa, uint8_t spp, uint32_t key)
 
bool(* changeAuth )(ptpmgmt_msg msg, uint8_t spp, uint32_t key)
 
bool(* changeAuthKey )(ptpmgmt_msg msg, uint32_t key)
 
bool(* disableAuth )(ptpmgmt_msg msg)
 
int(* usedAuthSppID )(const_ptpmgmt_msg msg)
 
uint32_t(* usedAuthKeyID )(const_ptpmgmt_msg msg)
 
const_ptpmgmt_safile(* getSa )(ptpmgmt_msg msg)
 
bool(* haveAuth )(const_ptpmgmt_msg msg)
 
enum ptpmgmt_mng_vals_e(* getTlvId )(const_ptpmgmt_msg msg)
 
enum ptpmgmt_mng_vals_e(* getBuildTlvId )(const_ptpmgmt_msg msg)
 
void(* setAllClocks )(const_ptpmgmt_msg msg)
 
bool(* isAllClocks )(const_ptpmgmt_msg msg)
 
bool(* useConfig )(ptpmgmt_msg msg, const_ptpmgmt_cfg cfg, const char *section)
 
const char *(* err2str )(enum ptpmgmt_MNG_PARSE_ERROR_e err)
 
const char *(* type2str )(enum ptpmgmt_msgType_e type)
 
const char *(* tlv2str )(enum ptpmgmt_tlvType_e type)
 
const char *(* act2str )(enum ptpmgmt_actionField_e action)
 
const char *(* mng2str )(enum ptpmgmt_mng_vals_e id)
 
bool(* findMngID )(const char *str, enum ptpmgmt_mng_vals_e *id, bool exact)
 
const char *(* errId2str )(enum ptpmgmt_managementErrorId_e err)
 
const char *(* clkType2str )(enum ptpmgmt_clockType_e type)
 
const char *(* netProt2str )(enum ptpmgmt_networkProtocol_e protocol)
 
const char *(* clockAcc2str )(enum ptpmgmt_clockAccuracy_e value)
 
const char *(* faultRec2str )(enum ptpmgmt_faultRecord_e code)
 
const char *(* timeSrc2str )(enum ptpmgmt_timeSource_e type)
 
bool(* findTimeSrc )(const char *str, enum ptpmgmt_timeSource_e *type, bool exact)
 
const char *(* portState2str )(enum ptpmgmt_portState_e state)
 
bool(* findPortState )(const char *str, enum ptpmgmt_portState_e *state, bool caseSens)
 
const char *(* delayMech2str )(enum ptpmgmt_delayMechanism_e type)
 
bool(* findDelayMech )(const char *str, enum ptpmgmt_delayMechanism_e *type, bool exact)
 
const char *(* smpteLck2str )(enum ptpmgmt_SMPTEmasterLockingStatus_e state)
 
const char *(* ts2str )(enum ptpmgmt_linuxptpTimeStamp_e type)
 
const char *(* pwr2str )(enum ptpmgmt_linuxptpPowerProfileVersion_e ver)
 
const char *(* us2str )(enum ptpmgmt_linuxptpUnicastState_e state)
 
bool(* is_LI_61 )(uint8_t flags)
 
bool(* is_LI_59 )(uint8_t flags)
 
bool(* is_UTCV )(uint8_t flags)
 
bool(* is_PTP )(uint8_t flags)
 
bool(* is_TTRA )(uint8_t flags)
 
bool(* is_FTRA )(uint8_t flags)
 
bool(* isEmpty )(enum ptpmgmt_mng_vals_e id)
 
bool(* isValidId )(const_ptpmgmt_msg msg, enum ptpmgmt_mng_vals_e id)
 
bool(* setAction )(ptpmgmt_msg msg, enum ptpmgmt_actionField_e actionField, enum ptpmgmt_mng_vals_e tlv_id, const void *dataSend)
 
void(* clearData )(const_ptpmgmt_msg msg)
 
enum ptpmgmt_MNG_PARSE_ERROR_e(* build )(const_ptpmgmt_msg msg, void *buf, size_t bufSize, uint16_t sequence)
 
enum ptpmgmt_actionField_e(* getSendAction )(const_ptpmgmt_msg msg)
 
size_t(* getMsgLen )(const_ptpmgmt_msg msg)
 
ssize_t(* getMsgPlanedLen )(const_ptpmgmt_msg msg)
 
enum ptpmgmt_MNG_PARSE_ERROR_e(* parse )(const_ptpmgmt_msg msg, const void *buf, ssize_t msgSize)
 
enum ptpmgmt_actionField_e(* getReplyAction )(const_ptpmgmt_msg msg)
 
bool(* isUnicast )(const_ptpmgmt_msg msg)
 
uint8_t(* getPTPProfileSpecific )(const_ptpmgmt_msg msg)
 
uint16_t(* getSequence )(const_ptpmgmt_msg msg)
 
const struct ptpmgmt_PortIdentity_t *(* getPeer )(ptpmgmt_msg msg)
 
const struct ptpmgmt_PortIdentity_t *(* getTarget )(ptpmgmt_msg msg)
 
uint32_t(* getSdoId )(const_ptpmgmt_msg msg)
 
uint8_t(* getDomainNumber )(const_ptpmgmt_msg msg)
 
uint8_t(* getVersionPTP )(const_ptpmgmt_msg msg)
 
uint8_t(* getMinorVersionPTP )(const_ptpmgmt_msg msg)
 
const void *(* getData )(ptpmgmt_msg msg)
 
const void *(* getSendData )(const_ptpmgmt_msg msg)
 
enum ptpmgmt_managementErrorId_e(* getErrId )(const_ptpmgmt_msg msg)
 
const char *(* getErrDisplay )(const_ptpmgmt_msg msg)
 
bool(* isLastMsgSig )(const_ptpmgmt_msg msg)
 
bool(* isLastMsgSMPTE )(const_ptpmgmt_msg msg)
 
enum ptpmgmt_msgType_e(* getType )(const_ptpmgmt_msg msg)
 
enum ptpmgmt_tlvType_e(* getMngType )(const_ptpmgmt_msg msg)
 
bool(* traversSigTlvs )(ptpmgmt_msg msg, void *cookie, ptpmgmt_msg_sig_callback callback)
 
size_t(* getSigTlvsCount )(const_ptpmgmt_msg msg)
 
const void *(* getSigTlv )(ptpmgmt_msg msg, size_t position)
 
enum ptpmgmt_tlvType_e(* getSigTlvType )(const_ptpmgmt_msg msg, size_t position)
 
enum ptpmgmt_mng_vals_e(* getSigMngTlvType )(const_ptpmgmt_msg msg, size_t position)
 
const void *(* getSigMngTlv )(ptpmgmt_msg msg, size_t position)
 

Detailed Description

The ptpmgmt message structure hold the message object and call backs to call C++ methods

Member Data Documentation

◆ act2str

const char*(* ptpmgmt_msg_t::act2str) (enum ptpmgmt_actionField_e action)

Convert action to string

Parameters
[in]action
Returns
string with the action in a string

◆ build

enum ptpmgmt_MNG_PARSE_ERROR_e(* ptpmgmt_msg_t::build) (const_ptpmgmt_msg msg, void *buf, size_t bufSize, uint16_t sequence)

Build a raw message for send using setAction setting

Parameters
[in]msgobject
[in,out]bufmemory buffer to fill with raw PTP Message
[in]bufSizebuffer size
[in]sequencemessage sequence
Returns
parse error state
Note
build before setting with setAction will create a GET raw message with NULL_PTP_MANAGEMENT management TLV
usually the user increases the sequence so it can be compared with replied message
if raw message is larger than buffer size the function return MNG_PARSE_ERROR_TOO_SMALL

◆ changeAuth

bool(* ptpmgmt_msg_t::changeAuth) (ptpmgmt_msg msg, uint8_t spp, uint32_t key)

Change the spp and send key used in the AUTHENTICATION TLVs

Parameters
[in,out]msgobject
[in]sppID to use to send
[in]keyID to use to send
Returns
true if change success

◆ changeAuthKey

bool(* ptpmgmt_msg_t::changeAuthKey) (ptpmgmt_msg msg, uint32_t key)

Change the send key used in the AUTHENTICATION TLVs.

Parameters
[in,out]msgobject
[in]keyID to use to send
Returns
true if change success

◆ clearData

void(* ptpmgmt_msg_t::clearData) (const_ptpmgmt_msg msg)

Clear data for send, prevent accidentally use, in case it is freed

Parameters
[in]msgobject

◆ clkType2str

const char*(* ptpmgmt_msg_t::clkType2str) (enum ptpmgmt_clockType_e type)

Convert clock type to string

Parameters
[in]typeclock type
Returns
string with the clock type

◆ clockAcc2str

const char*(* ptpmgmt_msg_t::clockAcc2str) (enum ptpmgmt_clockAccuracy_e value)

Convert clock accuracy to string

Parameters
[in]valueclock accuracy
Returns
string with the clock accuracy

◆ delayMech2str

const char*(* ptpmgmt_msg_t::delayMech2str) (enum ptpmgmt_delayMechanism_e type)

Convert delay mechanism to string

Parameters
[in]typedelay mechanism
Returns
string with a delay mechanism type

◆ disableAuth

bool(* ptpmgmt_msg_t::disableAuth) (ptpmgmt_msg msg)

Disable the use of AUTHENTICATION TLV.

Parameters
[in,out]msgobject
Returns
true if disabled

◆ err2str

const char*(* ptpmgmt_msg_t::err2str) (enum ptpmgmt_MNG_PARSE_ERROR_e err)

Convert parse error code to string

Parameters
[in]errparse code
Returns
string with the error message

◆ errId2str

const char*(* ptpmgmt_msg_t::errId2str) (enum ptpmgmt_managementErrorId_e err)

Convert management error to string

Parameters
[in]errID
Returns
string with the error message

◆ faultRec2str

const char*(* ptpmgmt_msg_t::faultRec2str) (enum ptpmgmt_faultRecord_e code)

Convert fault record severity code to string

Parameters
[in]codeseverity code
Returns
string with the severity code

◆ findDelayMech

bool(* ptpmgmt_msg_t::findDelayMech) (const char *str, enum ptpmgmt_delayMechanism_e *type, bool exact)

Convert string to delay mechanism

Parameters
[in]strstring to search
[out]typedelay mechanism
[in]exactperform an exact match
Returns
true if found

◆ findMngID

bool(* ptpmgmt_msg_t::findMngID) (const char *str, enum ptpmgmt_mng_vals_e *id, bool exact)

Convert string to management id

Parameters
[in]strstring to search
[out]idparse code
[in]exactperform an exact match
Returns
true if found

◆ findPortState

bool(* ptpmgmt_msg_t::findPortState) (const char *str, enum ptpmgmt_portState_e *state, bool caseSens)

Convert string to port state

Parameters
[in]strstring to search
[out]stateport state
[in]caseSensperform case sensetive match
Returns
true if found

◆ findTimeSrc

bool(* ptpmgmt_msg_t::findTimeSrc) (const char *str, enum ptpmgmt_timeSource_e *type, bool exact)

Convert string to time source type

Parameters
[in]strstring to search
[out]typetime source
[in]exactperform an exact match
Returns
true if found

◆ free

void(* ptpmgmt_msg_t::free) (ptpmgmt_msg msg)

< Free msg object

Parameters
[in,out]msgobject

◆ getBuildTlvId

enum ptpmgmt_mng_vals_e(* ptpmgmt_msg_t::getBuildTlvId) (const_ptpmgmt_msg msg)

Get the current build TLV id

Parameters
[in]msgobject
Returns
current TLV id

◆ getData

const void*(* ptpmgmt_msg_t::getData) (ptpmgmt_msg msg)

Get last parsed message dataField

Parameters
[in,out]msgobject
Returns
pointer to last parsed message dataField or null
Note
You need to cast to proper structure depends on management TLV ID, get with.
You should not try to free or change this TLV object

◆ getDomainNumber

uint8_t(* ptpmgmt_msg_t::getDomainNumber) (const_ptpmgmt_msg msg)

Get last parsed message domainNumber

Parameters
[in]msgobject
Returns
parsed message domainNumber

◆ getErrDisplay

const char*(* ptpmgmt_msg_t::getErrDisplay) (const_ptpmgmt_msg msg)

Get management error message

Parameters
[in]msgobject Relevant only when parsed message return MNG_PARSE_ERROR_MSG
Returns
error message

◆ getErrId

enum ptpmgmt_managementErrorId_e(* ptpmgmt_msg_t::getErrId) (const_ptpmgmt_msg msg)

Get management error code ID

Parameters
[in]msgobject Relevant only when parsed message return MNG_PARSE_ERROR_MSG
Returns
error code

◆ getMinorVersionPTP

uint8_t(* ptpmgmt_msg_t::getMinorVersionPTP) (const_ptpmgmt_msg msg)

Get last parsed message minor PTP version

Parameters
[in]msgobject
Returns
parsed message versionPTP

◆ getMngType

enum ptpmgmt_tlvType_e(* ptpmgmt_msg_t::getMngType) (const_ptpmgmt_msg msg)

Get management message type

Parameters
[in]msgobject
Returns
management message type
Note
return MANAGEMENT or MANAGEMENT_ERROR_STATUS

◆ getMsgLen

size_t(* ptpmgmt_msg_t::getMsgLen) (const_ptpmgmt_msg msg)

Get last build message size

Parameters
[in]msgobject
Returns
message size

◆ getMsgPlanedLen

ssize_t(* ptpmgmt_msg_t::getMsgPlanedLen) (const_ptpmgmt_msg msg)

Get planned message to build size

Parameters
[in]msgobject
Returns
planned message size or negative for error
Note
the planned message size is based on the management TLV id, action and the dataSend set by the user. You can use the size to allocate proper buffer for sending. Add Authentication TLV size if used.

◆ getParams

ptpmgmt_pMsgParams(* ptpmgmt_msg_t::getParams) (ptpmgmt_msg msg)

Get the current msgparams parameters

Parameters
[in,out]msgobject
Returns
msgparams parameters

◆ getPeer

const struct ptpmgmt_PortIdentity_t*(* ptpmgmt_msg_t::getPeer) (ptpmgmt_msg msg)

Get last parsed message peer port ID

Parameters
[in,out]msgobject
Returns
parsed message peer port ID

◆ getPTPProfileSpecific

uint8_t(* ptpmgmt_msg_t::getPTPProfileSpecific) (const_ptpmgmt_msg msg)

Get last reply PTP Profile Specific

Parameters
[in]msgobject
Returns
reply management action
Note
set on parse

◆ getReplyAction

enum ptpmgmt_actionField_e(* ptpmgmt_msg_t::getReplyAction) (const_ptpmgmt_msg msg)

Get last reply management action

Parameters
[in]msgobject
Returns
reply management action
Note
set on parse

◆ getSa

const_ptpmgmt_safile(* ptpmgmt_msg_t::getSa) (ptpmgmt_msg msg)

Get authentication security association pool

Returns
authentication parameters

◆ getSdoId

uint32_t(* ptpmgmt_msg_t::getSdoId) (const_ptpmgmt_msg msg)

Get last parsed message sdoId

Parameters
[in]msgobject
Returns
parsed message sdoId
Note
upper byte is was transportSpecific

◆ getSendAction

enum ptpmgmt_actionField_e(* ptpmgmt_msg_t::getSendAction) (const_ptpmgmt_msg msg)

Get build management action

Parameters
[in]msgobject
Returns
build management action

◆ getSendData

const void*(* ptpmgmt_msg_t::getSendData) (const_ptpmgmt_msg msg)

Get send message dataField

Parameters
[in]msgobject
Returns
pointer to send message dataField or null a pointer to the last setAction dataSend parameter.
Note
You need to cast to proper structure depends on management TLV ID.
In case you release this memory, you should call
void(* clearData)(const_ptpmgmt_msg msg)
Definition: msg.h:383

◆ getSequence

uint16_t(* ptpmgmt_msg_t::getSequence) (const_ptpmgmt_msg msg)

Get last parsed message sequence number

Parameters
[in]msgobject
Returns
parsed sequence number

◆ getSigMngTlv

const void*(* ptpmgmt_msg_t::getSigMngTlv) (ptpmgmt_msg msg, size_t position)

Get a management TLV from the last signalling message TLVs by position

Parameters
[in,out]msgobject
[in]positionof TLV
Returns
management TLV or null
Note
return null if TLV is not management
You should not try to free this TLV object

◆ getSigMngTlvType

enum ptpmgmt_mng_vals_e(* ptpmgmt_msg_t::getSigMngTlvType) (const_ptpmgmt_msg msg, size_t position)

Get the management TLV ID of a management TLV from the last signalling message TLVs by position

Parameters
[in]msgobject
[in]positionof TLV
Returns
management TLV ID or NULL_PTP_MANAGEMENT
Note
return NULL_PTP_MANAGEMENT if TLV is not management

◆ getSigTlv

const void*(* ptpmgmt_msg_t::getSigTlv) (ptpmgmt_msg msg, size_t position)

Get a TLV from the last signalling message TLVs by position

Parameters
[in,out]msgobject
[in]positionof TLV
Returns
TLV or null

◆ getSigTlvsCount

size_t(* ptpmgmt_msg_t::getSigTlvsCount) (const_ptpmgmt_msg msg)

Get number of the last signalling message TLVs

Parameters
[in]msgobject
Returns
number of TLVs or zero

◆ getSigTlvType

enum ptpmgmt_tlvType_e(* ptpmgmt_msg_t::getSigTlvType) (const_ptpmgmt_msg msg, size_t position)

Get a type of TLV from the last signalling message TLVs by position

Parameters
[in]msgobject
[in]positionof TLV
Returns
type of TLV or unknown

◆ getTarget

const struct ptpmgmt_PortIdentity_t*(* ptpmgmt_msg_t::getTarget) (ptpmgmt_msg msg)

Get last parsed message target port ID

Parameters
[in,out]msgobject
Returns
parsed message target port ID

◆ getTlvId

enum ptpmgmt_mng_vals_e(* ptpmgmt_msg_t::getTlvId) (const_ptpmgmt_msg msg)

Get the current parsed TLV id

Parameters
[in]msgobject
Returns
current parsed TLV id

◆ getType

enum ptpmgmt_msgType_e(* ptpmgmt_msg_t::getType) (const_ptpmgmt_msg msg)

Get message type

Parameters
[in]msgobject
Returns
message type

◆ getVersionPTP

uint8_t(* ptpmgmt_msg_t::getVersionPTP) (const_ptpmgmt_msg msg)

Get last parsed message PTP version

Parameters
[in]msgobject
Returns
parsed message versionPTP

◆ haveAuth

bool(* ptpmgmt_msg_t::haveAuth) (const_ptpmgmt_msg msg)

Get if AUTHENTICATION TLV with authentication parameters are used

Parameters
[in]msgobject
Returns
true if AUTHENTICATION TLV is used

◆ is_FTRA

bool(* ptpmgmt_msg_t::is_FTRA) (uint8_t flags)

Check if frequency is traceable flag is enabled

Parameters
[in]flags
Returns
true if flag on

◆ is_LI_59

bool(* ptpmgmt_msg_t::is_LI_59) (uint8_t flags)

Check if leap 59 seconds flag is enabled

Parameters
[in]flags
Returns
true if flag on

◆ is_LI_61

bool(* ptpmgmt_msg_t::is_LI_61) (uint8_t flags)

Check if leap 61 seconds flag is enabled

Parameters
[in]flags
Returns
true if flag on

◆ is_PTP

bool(* ptpmgmt_msg_t::is_PTP) (uint8_t flags)

Check if is PTP instance flag is enabled

Parameters
[in]flags
Returns
true if flag on

◆ is_TTRA

bool(* ptpmgmt_msg_t::is_TTRA) (uint8_t flags)

Check if timescale is traceable flag is enabled

Parameters
[in]flags
Returns
true if flag on

◆ is_UTCV

bool(* ptpmgmt_msg_t::is_UTCV) (uint8_t flags)

Check if UTC offset is valid flag is enabled

Parameters
[in]flags
Returns
true if flag on

◆ isAllClocks

bool(* ptpmgmt_msg_t::isAllClocks) (const_ptpmgmt_msg msg)

Query if target clock ID is using all clocks.

Parameters
[in]msgobject
Returns
true if target use all clocks

◆ isEmpty

bool(* ptpmgmt_msg_t::isEmpty) (enum ptpmgmt_mng_vals_e id)

Check management TLV id uses empty dataField

Parameters
[in]idmanagement TLV id
Returns
true if dataField is empty

◆ isLastMsgSig

bool(* ptpmgmt_msg_t::isLastMsgSig) (const_ptpmgmt_msg msg)

query if last message is a signalling message

Parameters
[in]msgobject
Returns
true if last message is a signalling message

◆ isLastMsgSMPTE

bool(* ptpmgmt_msg_t::isLastMsgSMPTE) (const_ptpmgmt_msg msg)

query if last message is a SMPTE message

Parameters
[in]msgobject
Returns
true if last message is a SMPTE message

◆ isUnicast

bool(* ptpmgmt_msg_t::isUnicast) (const_ptpmgmt_msg msg)

Is last parsed message a unicast or not

Parameters
[in]msgobject
Returns
true if parsed message is unicast

◆ isValidId

bool(* ptpmgmt_msg_t::isValidId) (const_ptpmgmt_msg msg, enum ptpmgmt_mng_vals_e id)

Check if management TLV is valid for use

Parameters
[in]msgobject
[in]idmanagement TLV id
Returns
true if management TLV is valid
Note
function also check implement specific TLVs!

◆ mng2str

const char*(* ptpmgmt_msg_t::mng2str) (enum ptpmgmt_mng_vals_e id)

Convert management id to string

Parameters
[in]idparse code
Returns
string with ID name

◆ netProt2str

const char*(* ptpmgmt_msg_t::netProt2str) (enum ptpmgmt_networkProtocol_e protocol)

Convert network protocol to string

Parameters
[in]protocolnetwork protocol
Returns
string with the network protocol

◆ parse

enum ptpmgmt_MNG_PARSE_ERROR_e(* ptpmgmt_msg_t::parse) (const_ptpmgmt_msg msg, const void *buf, ssize_t msgSize)

Parse a received raw socket

Parameters
[in]msgobject
[in]bufmemory buffer containing the raw PTP Message
[in]msgSizereceived size of PTP Message
Returns
parse error state

◆ portState2str

const char*(* ptpmgmt_msg_t::portState2str) (enum ptpmgmt_portState_e state)

Convert port state to string

Parameters
[in]stateport state
Returns
string with the port state

◆ pwr2str

const char*(* ptpmgmt_msg_t::pwr2str) (enum ptpmgmt_linuxptpPowerProfileVersion_e ver)

Convert linuxptp power profile version to string

Parameters
[in]verversion
Returns
string with the Linux power profile version

◆ setAction

bool(* ptpmgmt_msg_t::setAction) (ptpmgmt_msg msg, enum ptpmgmt_actionField_e actionField, enum ptpmgmt_mng_vals_e tlv_id, const void *dataSend)

Set message object management TLV id, action and data for dataField

Parameters
[in,out]msgobject
[in]actionFieldfor sending
[in]tlv_idmanagement TLV id
[in]dataSendpointer to TLV object
Returns
true if setting is correct
Note
the setting is valid for send only
Attention
The caller must use the proper structure with the TLV id! Mismatch will probably cause a crash to your application. The library does NOT perform any error catchig of any kind!

◆ setAllClocks

void(* ptpmgmt_msg_t::setAllClocks) (const_ptpmgmt_msg msg)

Set target clock ID to use all clocks.

Parameters
[in]msgobject

◆ smpteLck2str

const char*(* ptpmgmt_msg_t::smpteLck2str) (enum ptpmgmt_SMPTEmasterLockingStatus_e state)

Convert SMPTE clock locking state to string

Parameters
[in]stateSMPTE clock locking state
Returns
string with the SMPTE clock locking state

◆ timeSrc2str

const char*(* ptpmgmt_msg_t::timeSrc2str) (enum ptpmgmt_timeSource_e type)

Convert time source to string

Parameters
[in]typetime source
Returns
string with the time source

◆ tlv2str

const char*(* ptpmgmt_msg_t::tlv2str) (enum ptpmgmt_tlvType_e type)

Convert TLV type to string

Parameters
[in]type
Returns
string with the TLV type

◆ traversSigTlvs

bool(* ptpmgmt_msg_t::traversSigTlvs) (ptpmgmt_msg msg, void *cookie, ptpmgmt_msg_sig_callback callback)

Traverse all last signalling message TLVs

Parameters
[in,out]msgobject
[in]cookiepointer to a user cookie
[in]callbackfunction to call with each TLV
Returns
true if any of the calling to call-back return true
Note
stop once a call-back return true

◆ ts2str

const char*(* ptpmgmt_msg_t::ts2str) (enum ptpmgmt_linuxptpTimeStamp_e type)

Convert linuxptp time stamp type to string

Parameters
[in]typetime stamp type
Returns
string with the Linux time stamp type

◆ type2str

const char*(* ptpmgmt_msg_t::type2str) (enum ptpmgmt_msgType_e type)

Convert message type to string

Parameters
[in]type
Returns
string with the TLV type

◆ updateParams

bool(* ptpmgmt_msg_t::updateParams) (ptpmgmt_msg msg, ptpmgmt_cpMsgParams prms)

Set and use a user MsgParams parameters

Parameters
[in,out]msgobject
[in]prmsMsgParams parameters
Returns
true if parameters are valid and updated

◆ us2str

const char*(* ptpmgmt_msg_t::us2str) (enum ptpmgmt_linuxptpUnicastState_e state)

Convert linuxptp master unicasy state to string

Parameters
[in]state
Returns
string with the master state in the unicast master table

◆ useAuth

bool(* ptpmgmt_msg_t::useAuth) (ptpmgmt_msg msg, const_ptpmgmt_safile sa, uint8_t spp, uint32_t key)

Use the AUTHENTICATION TLV on send and receive, read SA file.

Parameters
[in,out]msgobject
[in]sareference to SA file object
[in]sppID to use to send
[in]keyID to use to send
Returns
true if find valid authentication parameters and hmac library

◆ useAuth_cfg

bool(* ptpmgmt_msg_t::useAuth_cfg) (ptpmgmt_msg msg, const_ptpmgmt_cfg cfg, const char *section)

Use the AUTHENTICATION TLV on send and receive read parameters from configuration file.

Parameters
[in,out]msgobject
[in]cfgreference to configuration file object
[in]sectionin configuration file
Returns
true if find valid authentication parameters and hmac library

◆ useConfig

bool(* ptpmgmt_msg_t::useConfig) (ptpmgmt_msg msg, const_ptpmgmt_cfg cfg, const char *section)

Fetch MsgParams parameters from configuration file

Parameters
[in,out]msgobject
[in]cfgreference to configuration file object
[in]sectionin configuration file
Returns
true on success
Note
calling with null section will fetch value from "global" section

◆ usedAuthKeyID

uint32_t(* ptpmgmt_msg_t::usedAuthKeyID) (const_ptpmgmt_msg msg)

Get used AUTHENTICATION TLV key ID used for send.

Parameters
[in]msgobject
Returns
key ID or 0

◆ usedAuthSppID

int(* ptpmgmt_msg_t::usedAuthSppID) (const_ptpmgmt_msg msg)

Get used AUTHENTICATION TLV Spp ID used for send

Returns
Spp ID or -1

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