Changes

Jump to navigation Jump to search
2,230 bytes added ,  13:22, 14 September 2010
no edit summary
| 2
| 0
| ? WD_SendWMBData
|-
| 0x1009
| 1
| WD_Scan
|-
| 0x100B
| ? 3 together {{check}}
| ?
| ?
|-
| 0x100C
| ?
| switch to raw mode?
|-
| 0x100D
| 0
| 1
| WD_GetWLStatus
|-
| 0x100E
|-
| 0x100F
| ? 1| ? 0 | ? WD_SetBeacon
|-
| 0x1010
| 1 (16 Bit){{check}}
| 0
| ?
| 0x8000
| 0
| 1 (Size is variable)| ? something with WDi_AcceptReceiveRequest do not return immediately
|-
| 0x8001
| 0
| 1 (Size is variable)| ? something with WDi_AcceptReceiveRequest do not return immediately
|}
WD_SendBeacon second input is the Nintendo tag code 0xDD data, starting after the timestamp. First input might be a u16* for the Nintendo tag timestamp?
WD_SetLinkState might change which "mode"/"state" is used; 0 for Infrastructure, 1 for Ad-Hocmaster mode?
WD_SendWMBData first input buffer is the WMB data to send. In the frame, this is copied to the offset after the 06 02 01 00 bytes. First two bytes are byte-swapped, thus flags are first, size second. Input two buffer is unknown. WD_GetWLStatus copies the internal wd_wlstatus struct to outbuf. After WD_GetWLStatus copies the internal wlstatus struct to outbuf, the status field in the internal struct is set to zero. WD_GetWLStatus returns the internal wlstatus struct unka field. WD_SetBeacon sets the beacon broadcasted by hw? Perhaps this is used to have hw broadcast static beacons for example in games with local wireless DS communications, and perhaps WD_SendBeacon is for protocols that require beacon data constantly changed by software such as WMB. The state is set to the mode, upon the initial open. For Infrastructure mode, mode should be 3, while for master mode this should be 1? Initial open meaning the first open after the device is closed, or after a IOS_Reload, without net_init being called.  Configuration , info, and info wd_sendwmbdata_param structs:
<source lang="c">
//wd_privacy and wd_config fields are littlebig-endian, but they are byte swapped when checking the values and copying to/from internal config.
typedef struct _wd_privacy//When verified, only the mode and keyId/keyLen are verified. Size 72 bytes.
{
u8 beacon_nintagdata[128];
wd_privacy mpParent_privacy;//Mode 3, tkip, and aes crypto modes are removed, leaving only modes none, WEP40, and WEP104.
} mpParent;//Ad-HocMaster mode?
} wd_config;
u8 mac[6];
u16 ntr_allowed_channels;//Bit 0 is unused. Bit 1 means channel 1 is available, and so on.
u16 unk8; char country[2];//Text country code. u32 unkc; char wlversion[0x50];//IOSVersion tag from WL. u8 fillerunk[1360x30];
} wd_info;
 
typedef struct _wd_sendwmbdata_param
{
u16 unk0;
u16 unk2;
u16 unk4;
u16 unk6;
u16 unk8;
u16 unka;
u16 unkc;
} wd_sendwmbdata_param;
 
typedef struct _wd_wlstatus
{
u32 status;//When a WL error occurs, 1 is written here. After WD_GetWLStatus copies the internal wlstatus struct to outbuf, this field in the internal struct is set to zero.
u32 num;//Number of errors? Internal struct num field is incremented when WL errors occur.
u16 unk8;
u16 unka;
} wd_wlstatus;
</source>
! POSIX equivalent
! Notes
|-
| -0x8000
| ?
| Invalid fd
|-
| -0x8001
| EINVAL
| Invalid input
|-
| -0x8002
| ?
| Invalid state or invalid ioctl number
|-
| -0x8003
| ?
| WL error
|-
| -0x8005
| ENOMEM
| Memory allocation error
|}
84

edits

Navigation menu