Mistake on this page?
Report an issue in GitHub or email us
Functions
whd_network_if.h File Reference

Provides prototypes / declarations for common APSTA functionality. More...

#include "whd.h"
#include "whd_int.h"

Go to the source code of this file.

Functions

whd_result_t 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...
 

Detailed Description

Provides prototypes / declarations for common APSTA functionality.

Definition in file whd_network_if.h.

Function Documentation

whd_result_t 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
interface: The interface on which the packet was received.
buffer: Handle of the packet which has just been received. Responsibility for releasing this buffer is transferred from WHD at this point.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.