/dev/net/ncd/manage

From WiiBrew
< /dev‎ | net
Jump to navigation Jump to search

NCD is the Network Configuration Device. It handles stuff like reading the network configuration stored in /shared2/sys/net/02/config.dat or getting the Wii's MAC address.

ios_ioctlv( fd, 1, 0, 1, vec); // NCDLockWirelessDriver 32 out
ios_ioctlv( fd, 2, 1, 1, vec); // NCDUnlockWirelessDriver in 4, out 32
ios_ioctlv( fd, 3, 0, 2, vec); // NCDGetIfConfig, 7004 out, 32 out
ios_ioctlv( fd, 4, 1, 1, vec); // NCDSetIpConfig, 7004 in, 32 out
ios_ioctlv( fd, 5, 0, 2, vec); // NCDReadConfig, 7004 out, 32 out
ios_ioctlv( fd, 6, 1, 1, vec); // NCDWriteConfig, 7004 in, 32 out
ios_ioctlv( fd, 7, 0, 1, vec); // NCDGetLinkStatus, 32 out
ios_ioctlv( fd, 8, 0, 2, vec); // NCDGetWirelessMacAddress, 32 out, 6 out

Detailed Description

NCDReadConfig read the contents of /shared2/sys/net/02/config.dat into the first output buffer. It will not return a working config under IOS9 (unless the console is on 1.0), since IOS9 uses /shared2/sys/net/config.dat.

TODO: What about the second buffer?

NCDGetWirelessMacAddress stores the Wii's MAC address in the second out buffer.