DSWifi
|
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. | |
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.
void Wifi_RawSetPacketHandler | ( | WifiPacketHandler | wphfunc | ) |
Set a handler to process all raw incoming packets.
wphfunc | Pointer to packet handler (see WifiPacketHandler for info). |
int Wifi_RawTxFrame | ( | u16 | datalen, |
u16 | rate, | ||
const void * | src | ||
) |
Send a raw 802.11 frame at a specified rate.
datalen | The length in bytes of the frame to send from beginning of 802.11 header to end, but not including CRC. |
rate | The rate to transmit at (Specified as mbits/10, 1mbit=0x000A, 2mbit=0x0014) |
src | Pointer to the data to send (should be halfword-aligned). |
void Wifi_RxRawReadPacket | ( | u32 | base, |
u32 | size_bytes, | ||
void * | dst | ||
) |
Allows user code to read a packet from within the WifiPacketHandler function.
base | The base address of the packet in the internal buffer. |
size_bytes | Number of bytes to read. It actually reads ((number + 1) & ~1) bytes |
dst | Location for the data to be read into. It must be aligned to 16 bits. |