/dev/socket

< /dev
Revision as of 20:58, 13 September 2015 by Marionumber1 (talk | contribs) (→‎0x04 - connect(): Include a struct for the Wii U socket address)

/dev/socket is the IOSU device node that implements the Berkeley sockets (BSD sockets) API. Its functions are exposed to the Cafe OS userspace through nsysnet.rpl.

ioctl() interface

0x04 - connect()

This function is used to connect a socket to a remote host. Its input is a 24-byte buffer containing: the 32-bit socket descriptor, a 16-byte socket address structure (as defined here), and the 32-bit length of the structure (0x10 bytes). No output is produced by IOSU.

0x11 - socket()

This function is used to create a new socket. Its input is a 12-byte buffer containing 32-bit values for the domain, type, and protocol of the socket, as defined by Unix. No output is produced by IOSU, except for the socket descriptor, which is returned by IOS_Ioctl().