DSWifi
Loading...
Searching...
No Matches
Typedefs | Functions
Raw transfer/reception of packets.

Typedefs

typedef void(* WifiPacketHandler) (int, int)
 Handler of RAW packets received in this console.
 

Functions

void Wifi_RawSetPacketHandler (WifiPacketHandler wphfunc)
 Set a handler to process all raw incoming packets.
 
int Wifi_RawTxFrame (u16 datalen, u16 rate, const void *src)
 Send a raw 802.11 frame at a specified rate.
 
void Wifi_RxRawReadPacket (u32 base, u32 size_bytes, void *dst)
 Allows user code to read a packet from within the WifiPacketHandler function.
 

Detailed Description

Typedef Documentation

◆ WifiPacketHandler

typedef void(* WifiPacketHandler) (int, int)

Handler of RAW packets received in this console.

The first parameter is the packet address. It is only valid while the called function is executing. The second parameter is packet length.

Call Wifi_RxRawReadPacket(adddress, length, buffer) while in the packet handler function to retreive the data to a local buffer.

From this handler The IEEE 802.11 header can be read, followed by the packet data.

Function Documentation

◆ Wifi_RawSetPacketHandler()

void Wifi_RawSetPacketHandler ( WifiPacketHandler  wphfunc)

Set a handler to process all raw incoming packets.

Parameters
wphfuncPointer to packet handler (see WifiPacketHandler for info).

◆ Wifi_RawTxFrame()

int Wifi_RawTxFrame ( u16  datalen,
u16  rate,
const void *  src 
)

Send a raw 802.11 frame at a specified rate.

Warning
This function doesn't include the IEEE 802.11 frame header to your data, you need to make sure that your data is prefixed by a valid header before calling this function.
Parameters
datalenThe length in bytes of the frame to send from beginning of 802.11 header to end, but not including CRC.
rateThe rate to transmit at (Specified as mbits/10, 1mbit=0x000A, 2mbit=0x0014)
srcPointer to the data to send (should be halfword-aligned).
Returns
0 on success (not enough space in queue), -1 on error.

◆ Wifi_RxRawReadPacket()

void Wifi_RxRawReadPacket ( u32  base,
u32  size_bytes,
void *  dst 
)

Allows user code to read a packet from within the WifiPacketHandler function.

Parameters
baseThe base address of the packet in the internal buffer.
size_bytesNumber of bytes to read. It actually reads ((number + 1) & ~1) bytes
dstLocation for the data to be read into. It must be aligned to 16 bits.