|
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 (size_t data_size, u16 rate, const void *data_src) |
| Send a raw 802.11 frame at a specified rate. | |
| void | Wifi_RxRawReadPacket (u32 address, u32 size, void *dst) |
| Allows user code to read a packet from inside a WifiPacketHandler function. | |
| const void * | Wifi_RxRawReadPacketPointer (u32 address) |
| Returns a pointer to read a packet from inside a 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(address, 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 | ( | size_t | data_size, |
| u16 | rate, | ||
| const void * | data_src | ||
| ) |
Send a raw 802.11 frame at a specified rate.
| data_size | 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 (WIFI_TRANSFER_RATE_1MBPS or WIFI_TRANSFER_RATE_2MBPS). |
| data_src | Pointer to the data to send (should be halfword-aligned). |
| void Wifi_RxRawReadPacket | ( | u32 | address, |
| u32 | size, | ||
| void * | dst | ||
| ) |
Allows user code to read a packet from inside a WifiPacketHandler function.
You can also get a pointer to the data with Wifi_RxRawReadPacketPointer(). It's a pointer to uncached RAM, so using that function may not be as fast as copying the packet information to the stack with Wifi_RxRawReadPacket().
| address | The base address of the packet in the internal buffer. |
| size | Number of bytes to read. |
| dst | Location for the data to be read into. |
| const void * Wifi_RxRawReadPacketPointer | ( | u32 | address | ) |
Returns a pointer to read a packet from inside a WifiPacketHandler function.
The returned pointer points to uncached RAM. Reading from this pointer can be slower than using Wifi_RxRawReadPacket() to copy the packet to a buffer in the stack, for example.
| address | The base address of the packet in the internal buffer. |