#include "../../network_stack_driver.h"
#include "../../ptp_defs.h"
#include "../../task_ptp.h"
#include "lwip/err.h"
#include "lwip/igmp.h"
#include "lwip/ip4_addr.h"
#include "lwip/ip_addr.h"
#include "lwip/netif.h"
#include "lwip/udp.h"
#include "netif/ethernet.h"
#include <string.h>
Go to the source code of this file.
|
static void | ptp_transmit_cb (uint32_t ts_s, uint32_t ts_ns, uint32_t tag) |
|
static void | ptp_receive_cb (void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) |
|
void | ptp_nsd_igmp_join_leave (bool join) |
|
void | ptp_nsd_init (PtpTransportType tp, PtpDelayMechanism dm) |
|
static void | ptp_receive_cb (void *pArg, struct udp_pcb *pPCB, struct pbuf *pP, const ip_addr_t *pAddr, uint16_t port) |
|
void | ptp_nsd_transmit_msg (RawPtpMessage *pMsg) |
|
void | ptp_transmit_free (struct pbuf *pPBuf) |
|
void | ptp_nsd_get_interface_address (uint8_t *hwa) |
|
err_t | hook_unknown_ethertype (struct pbuf *pbuf, struct netif *netif) |
|
◆ ETHERNET_HEADER_LENGTH
#define ETHERNET_HEADER_LENGTH (14) |
◆ hook_unknown_ethertype()
err_t hook_unknown_ethertype |
( |
struct pbuf * |
pbuf, |
|
|
struct netif * |
netif |
|
) |
| |
◆ ptp_nsd_get_interface_address()
void ptp_nsd_get_interface_address |
( |
uint8_t * |
hwa | ) |
|
Fetch the Ethernet network interface hardware address.
- Parameters
-
hwa | pointer to a 6-byte array where the hardware address is going to be stored to |
Definition at line 149 of file nsd_lwip.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 27 of file nsd_lwip.c.
◆ ptp_nsd_init()
Initialize or reinitialize the Network Stack Driver.
- Parameters
-
tp | PTP transport type |
dm | PTP delay mechanism |
Definition at line 40 of file nsd_lwip.c.
◆ ptp_nsd_transmit_msg()
Transmit a PTP message.
- Parameters
-
Definition at line 112 of file nsd_lwip.c.
◆ ptp_receive_cb() [1/2]
static void ptp_receive_cb |
( |
void * |
arg, |
|
|
struct udp_pcb * |
pcb, |
|
|
struct pbuf * |
p, |
|
|
const ip_addr_t * |
addr, |
|
|
u16_t |
port |
|
) |
| |
|
static |
◆ ptp_receive_cb() [2/2]
static void ptp_receive_cb |
( |
void * |
pArg, |
|
|
struct udp_pcb * |
pPCB, |
|
|
struct pbuf * |
pP, |
|
|
const ip_addr_t * |
pAddr, |
|
|
uint16_t |
port |
|
) |
| |
|
static |
◆ ptp_transmit_cb()
static void ptp_transmit_cb |
( |
uint32_t |
ts_s, |
|
|
uint32_t |
ts_ns, |
|
|
uint32_t |
tag |
|
) |
| |
|
static |
◆ ptp_transmit_free()
void ptp_transmit_free |
( |
struct pbuf * |
pPBuf | ) |
|
◆ DM
◆ PTP_L4_EVENT
struct udp_pcb* PTP_L4_EVENT = NULL |
|
static |
◆ PTP_L4_GENERAL
struct udp_pcb* PTP_L4_GENERAL = NULL |
|
static |
◆ TP