flexPTP 1.0
An IEEE 1588 PTP implementation designed for microcontrollers
Loading...
Searching...
No Matches
tlv.h File Reference

This module implements the TLV-related functionality. More...

#include "ptp_types.h"

Go to the source code of this file.

Functions

uint16_t ptp_tlv_insert (void *dst, const PtpProfileTlvElement *pad, PtpMessageType mt, uint16_t maxLen)
 

Detailed Description

This module implements the TLV-related functionality.

Definition in file tlv.h.

Function Documentation

◆ ptp_tlv_insert()

uint16_t ptp_tlv_insert ( void *  dst,
const PtpProfileTlvElement pad,
PtpMessageType  mt,
uint16_t  maxLen 
)

Unfold TLVs to memory area beginning with dst up to maxLen bytes. The algorithm stops at the first TLV that cannot fit the remaining size. Only TLVs matching mt will be extracted from the list.

Parameters
dstpointer to destination area
padpointer to a forward linked list of TLVs
mtcorresponding message type
maxLenmaximum length of extraction.
Returns
number of bytes extracted

Definition at line 5 of file tlv.c.