Line 1:
Line 1:
−
ios_open("/dev/net/ncd/manage");
+
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
+
ios_ioctlv( fd, 1, 0, 1, vec); // NCDLockWirelessDriver
−
ios_ioctlv( fd, 2, 1, 1, vec); //NCDUnlockWirelessDriver
+
ios_ioctlv( fd, 2, 1, 1, vec); // NCDUnlockWirelessDriver
−
ios_ioctlv( fd, 7, 0, 1, vec); //NCDGetLinkStatus
+
ios_ioctlv( fd, 3, 0, 2, vec); // NCDReadConfig?, 7004 out, 32 out
−
ios_ioctlv( fd, 4, 0, 2, vec); //NCDGetWirelessMacAddress
+
ios_ioctlv( fd, 4, 1, 1, vec); // ?, 7004 in, 32 out
−
ios_ioctlv( fd, 3, 0, 2, vec); // ??? It seems that is related to Write and Read information
+
ios_ioctlv( fd, 5, 0, 2, vec); // ?, 7004 out, 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. TODO: What about the second buffer?
−
Feel free to modify
+
NCDGetWirelessMacAddress stores the Wii's MAC address in the second out buffer.