flexPTP 1.0
An IEEE 1588 PTP implementation designed for microcontrollers
Loading...
Searching...
No Matches
nsd_linux.h File Reference
#include <stdint.h>
#include "../../timeutils.h"

Go to the source code of this file.

Functions

bool linux_nsd_preinit (const char *ifn)
 
void linux_nsd_cleanup (void)
 
void linux_set_time (uint32_t seconds, uint32_t nanoseconds)
 
void linux_adjust_clock (double tuning_ppb)
 
void linux_get_time (TimestampU *pTime)
 

Function Documentation

◆ linux_adjust_clock()

void linux_adjust_clock ( double  tuning_ppb)

Adjust the PHC.

Parameters
tuning_ppbclock adjustment

Definition at line 618 of file nsd_linux.c.

◆ linux_get_time()

void linux_get_time ( TimestampU pTime)

Query PHC time.

Parameters
pTimepointer to a timestamp object

Definition at line 639 of file nsd_linux.c.

◆ linux_nsd_cleanup()

void linux_nsd_cleanup ( void  )

Clean up the Linux network stack driver.

Definition at line 207 of file nsd_linux.c.

◆ linux_nsd_preinit()

bool linux_nsd_preinit ( const char *  ifn)

Preinitialize the Linux network stack driver.

Parameters
ifnname of the targeted network interface (e.g. eth0)
Returns
initialization successful

Definition at line 76 of file nsd_linux.c.

◆ linux_set_time()

void linux_set_time ( uint32_t  seconds,
uint32_t  nanoseconds 
)

Set PHC time.

Parameters
secondsseconds part
nanosecondsnanoseconds part

Definition at line 632 of file nsd_linux.c.