DSWifi
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations
dswifi_common.h File Reference

ARM9 and ARM7 common definitions. More...

#include <nds/ndstypes.h>

Data Structures

struct  WIFI_ACCESSPOINT
 Structure that defines how to connect to an access point. More...
 
struct  Wifi_ConnectedClient
 Structure that represents a DS connected to a host DS. More...
 
struct  Wifi_NintendoVendorInfo
 Information send by Nintendo DS hosts in beacon frames. More...
 

Macros

#define DSWIFI_BEACON_NAME_SIZE   20
 Size in bytes reserved in beacon frames for the multiplayer host player name.
 
#define WIFI_MAX_MULTIPLAYER_CLIENTS   15
 Maxmimum number of multiplayer clients that can connect to a host.
 

Typedefs

typedef struct WIFI_ACCESSPOINT Wifi_AccessPoint
 Structure that defines how to connect to an access point.
 

Enumerations

enum  WEPMODES {
  WEPMODE_NONE = 0 ,
  WEPMODE_40BIT = 1 ,
  WEPMODE_128BIT = 2
}
 Supported WEP modes. More...
 
enum  Wifi_APScanFlags {
  WSCAN_LIST_AP_COMPATIBLE = 0x1 ,
  WSCAN_LIST_AP_INCOMPATIBLE = 0x2 ,
  WSCAN_LIST_AP_ALL = 0x3 ,
  WSCAN_LIST_NDS_HOSTS = 0x4 ,
  WSCAN_LIST_ALL = 0x7
}
 List of which devices to add to the AP list while scanning for APs. More...
 
enum  Wifi_ConnectedClientState {
  WIFI_CLIENT_DISCONNECTED = 0 ,
  WIFI_CLIENT_AUTHENTICATED ,
  WIFI_CLIENT_ASSOCIATED
}
 Possible states of a client. More...
 
enum  WIFI_STATS {
  WSTAT_RXQUEUEDPACKETS ,
  WSTAT_TXQUEUEDPACKETS ,
  WSTAT_RXQUEUEDBYTES ,
  WSTAT_TXQUEUEDBYTES ,
  WSTAT_RXQUEUEDLOST ,
  WSTAT_TXQUEUEDREJECTED ,
  WSTAT_RXPACKETS ,
  WSTAT_RXBYTES ,
  WSTAT_RXDATABYTES ,
  WSTAT_TXPACKETS ,
  WSTAT_TXBYTES ,
  WSTAT_TXDATABYTES ,
  WSTAT_ARM7_UPDATES ,
  WSTAT_DEBUG ,
  WSTAT_HW_1B0 ,
  WSTAT_HW_1B1 ,
  WSTAT_HW_1B2 ,
  WSTAT_HW_1B3 ,
  WSTAT_HW_1B4 ,
  WSTAT_HW_1B5 ,
  WSTAT_HW_1B6 ,
  WSTAT_HW_1B7 ,
  WSTAT_HW_1B8 ,
  WSTAT_HW_1B9 ,
  WSTAT_HW_1BA ,
  WSTAT_HW_1BB ,
  WSTAT_HW_1BC ,
  WSTAT_HW_1BD ,
  WSTAT_HW_1BE ,
  WSTAT_HW_1BF ,
  WSTAT_HW_1C0 ,
  WSTAT_HW_1C1 ,
  WSTAT_HW_1C4 ,
  WSTAT_HW_1C5 ,
  WSTAT_HW_1D0 ,
  WSTAT_HW_1D1 ,
  WSTAT_HW_1D2 ,
  WSTAT_HW_1D3 ,
  WSTAT_HW_1D4 ,
  WSTAT_HW_1D5 ,
  WSTAT_HW_1D6 ,
  WSTAT_HW_1D7 ,
  WSTAT_HW_1D8 ,
  WSTAT_HW_1D9 ,
  WSTAT_HW_1DA ,
  WSTAT_HW_1DB ,
  WSTAT_HW_1DC ,
  WSTAT_HW_1DD ,
  WSTAT_HW_1DE ,
  WSTAT_HW_1DF ,
  NUM_WIFI_STATS
}
 List of available WiFi statistics. More...
 

Detailed Description

ARM9 and ARM7 common definitions.

Macro Definition Documentation

◆ WIFI_MAX_MULTIPLAYER_CLIENTS

#define WIFI_MAX_MULTIPLAYER_CLIENTS   15

Maxmimum number of multiplayer clients that can connect to a host.

This is limited by W_AID_LOW, which can only go from 0 to 15 (with 0 being reserved by the host).

Typedef Documentation

◆ Wifi_AccessPoint

Structure that defines how to connect to an access point.

If a field is not necessary for Wifi_ConnectAP it is marked as such. only 4 fields are absolutely required to be filled in correctly for the connection to work, they are: SSID, ssid_len, bssid, and channel. All others can be ignored (though flags should be set to 0).

Enumeration Type Documentation

◆ WEPMODES

enum WEPMODES

Supported WEP modes.

  • 64 bit (40 bit) WEP mode: 5 ASCII characters (or 10 hex numbers).
  • 128 bit (104 bit) WEP mode: 13 ASCII characters (or 26 hex numbers).
Enumerator
WEPMODE_NONE 

No WEP security is used.

WEPMODE_40BIT 

5 ASCII characters.

WEPMODE_128BIT 

13 ASCII characters.

◆ Wifi_APScanFlags

List of which devices to add to the AP list while scanning for APs.

Enumerator
WSCAN_LIST_AP_COMPATIBLE 

List unprotected and WEP APs to the list (excluding NDS hosts).

WSCAN_LIST_AP_INCOMPATIBLE 

List incompatible APs, such as the ones using WPA encryption.

WSCAN_LIST_AP_ALL 

List all APs that aren't NDS hosts.

WSCAN_LIST_NDS_HOSTS 

List NDS devices acting as multiplayer hosts. They are the ones that include the Nintendo tag in their beacon frames.

WSCAN_LIST_ALL 

Add all APs that are found to the list.

◆ Wifi_ConnectedClientState

Possible states of a client.

Enumerator
WIFI_CLIENT_DISCONNECTED 

This client is disconnected.

WIFI_CLIENT_AUTHENTICATED 

The client is authenticated but not associated.

◆ WIFI_STATS

enum WIFI_STATS

List of available WiFi statistics.

Enumerator
WSTAT_RXQUEUEDPACKETS 

Number of packets queued into the RX FIFO.

WSTAT_TXQUEUEDPACKETS 

Number of packets queued into the TX FIFO.

WSTAT_RXQUEUEDBYTES 

Number of bytes queued into the RX FIFO.

WSTAT_TXQUEUEDBYTES 

Number of bytes queued into the TX FIFO.

WSTAT_RXQUEUEDLOST 

Number of packets lost due to space limitations in queuing.

WSTAT_TXQUEUEDREJECTED 

Number of packets rejected due to space limitations in queuing.