Infineon Logo Wi-Fi Host Driver (WHD) Public API Reference Guide
 
whd_netif_funcs Struct Reference

General Description

Contains functions which allows WHD to pass received data to the network stack, to send an ethernet frame to WHD, etc.

Data Fields

void(* whd_network_process_ethernet_data )(whd_interface_t ifp, whd_buffer_t buffer)
 Called by WHD to pass received data to the network stack. More...
 

Field Documentation

◆ whd_network_process_ethernet_data

void(* whd_network_process_ethernet_data) (whd_interface_t ifp, whd_buffer_t buffer)

Called by WHD to pass received data to the network stack.

Packets received from the Wi-Fi network by WHD are forwarded to by calling function ptr which must be implemented in the network interface. Ethernet headers are present at the start of these packet buffers.

This function is called asynchronously in the context of the WHD thread whenever new data has arrived. Packet buffers are allocated within WHD, and ownership is transferred to the network stack. The network stack or application is thus responsible for releasing the packet buffers. Most packet buffering systems have a pointer to the 'current point' within the packet buffer. When this function is called, the pointer points to the start of the Ethernet header. There is other inconsequential data before the Ethernet header.

It is preferable that the (whd_network_process_ethernet_data)() function simply puts the received packet on a queue for processing by another thread. This avoids the WHD thread being unnecessarily tied up which would delay other packets being transmitted or received.

Parameters
interfaceThe interface on which the packet was received.
bufferHandle of the packet which has just been received. Responsibility for releasing this buffer is transferred from WHD at this point.

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