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

This file is a header for the employed Network Stack Driver (NSD). A NSD must define ALL four functions listed below. More...

#include <stdbool.h>
#include "ptp_raw_msg_circbuf.h"

Go to the source code of this file.

Functions

void ptp_nsd_init (PtpTransportType tp, PtpDelayMechanism dm)
 
void ptp_nsd_get_interface_address (uint8_t *hwa)
 
void ptp_nsd_transmit_msg (RawPtpMessage *pMsg)
 
void ptp_nsd_igmp_join_leave (bool join)
 

Variables

PtpCircBuf gRawRxMsgBuf
 Input circular buffer.
 
PtpCircBuf gRawTxMsgBuf
 Output circular buffers.
 

Detailed Description

This file is a header for the employed Network Stack Driver (NSD). A NSD must define ALL four functions listed below.

Definition in file network_stack_driver.h.

Function Documentation

◆ ptp_nsd_get_interface_address()

void ptp_nsd_get_interface_address ( uint8_t *  hwa)

Fetch the Ethernet network interface hardware address.

Parameters
hwapointer to a 6-byte array where the hardware address is going to be stored to

Definition at line 150 of file nsd_etherlib.c.

◆ ptp_nsd_igmp_join_leave()

void ptp_nsd_igmp_join_leave ( bool  join)

Join or leave IGMP groups associated with the current PTP profile.

Definition at line 32 of file nsd_etherlib.c.

◆ ptp_nsd_init()

void ptp_nsd_init ( PtpTransportType  tp,
PtpDelayMechanism  dm 
)

Initialize or reinitialize the Network Stack Driver.

Parameters
tpPTP transport type
dmPTP delay mechanism

Definition at line 50 of file nsd_etherlib.c.

◆ ptp_nsd_transmit_msg()

void ptp_nsd_transmit_msg ( RawPtpMessage pMsg)

Transmit a PTP message.

Parameters
pMsgpointer to a RawPtpMessage

Definition at line 135 of file nsd_etherlib.c.

Variable Documentation

◆ gRawRxMsgBuf

PtpCircBuf gRawRxMsgBuf
extern

Input circular buffer.

◆ gRawTxMsgBuf

PtpCircBuf gRawTxMsgBuf
extern

Output circular buffers.