Difference between revisions of "Socket Services"

From 3dbrew
Jump to navigation Jump to search
Line 46: Line 46:
 
|-
 
|-
 
| 0x000E00C2
 
| 0x000E00C2
| This is similar to command 0x000D0082?
+
| [[SOCU:gethostbyaddr|gethostbyaddr]]
 
|-
 
|-
 
| 0x000F0106
 
| 0x000F0106
 
| This resolves the IP address(es) for the specified host-name.
 
| This resolves the IP address(es) for the specified host-name.
|-
 
| 0x00100102
 
| ?
 
 
|-
 
|-
 
| 0x00110102
 
| 0x00110102
Line 65: Line 62:
 
| 0x00140084
 
| 0x00140084
 
| [[SOCU:poll|poll]]
 
| [[SOCU:poll|poll]]
|-
 
| 0x00150042
 
| ?
 
|-
 
| 0x00160000
 
| ?
 
 
|-
 
|-
 
| 0x00170082
 
| 0x00170082
 
| [[SOCU:getsockname|getsockname]]
 
| [[SOCU:getsockname|getsockname]]
|-
 
| 0x00180082
 
| ?
 
 
|-
 
|-
 
| 0x00190000
 
| 0x00190000
 
| [[SOCU:ShutdownSockets|ShutdownSockets]]
 
| [[SOCU:ShutdownSockets|ShutdownSockets]]
|-
 
| 0x001A00C0
 
| ?
 
|-
 
| 0x001B0040
 
| ?
 
|-
 
| 0x001C0104
 
| ?
 
|-
 
| 0x001D0040
 
| ?
 
|-
 
| 0x001E0040
 
| ?
 
|-
 
| 0x001F0040
 
| ?
 
|-
 
| 0x00200146
 
| ?
 
|-
 
| 0x00210002
 
| ?
 
|-
 
| 0x00220040
 
| ?
 
|-
 
| 0x00230040
 
| ?
 
 
|}
 
|}
 
The socket descriptors are system-wide, they are not unique to each process.
 
  
 
= struct sockaddr =
 
= struct sockaddr =

Revision as of 00:29, 29 April 2014

Socket service "soc:U"

Command Header Description
0x00010044 InitializeSockets
0x000200C2 socket
0x00030082 listen
0x00040082 accept
0x00050084 bind
0x00060084 connect
0x00070104 recvfrom_other
0x00080102 recvfrom
0x00090106 sendto_other
0x000A0106 sendto
0x000B0042 close
0x000C0082 shutdown
0x000D0082 gethostbyname
0x000E00C2 gethostbyaddr
0x000F0106 This resolves the IP address(es) for the specified host-name.
0x00110102 getsockopt
0x00120104 setsockopt
0x001300C2 fcntl
0x00140084 poll
0x00170082 getsockname
0x00190000 ShutdownSockets

struct sockaddr

Offset Size Description
0x0 0x1 Total size of the entire sockaddr buffer.
0x1 0x1 u8 sa_family
0x2 sockaddr_totalsize-0x2 sa_data[]

The total buffer size is 0x8, for family AF_INET value 2. AF_INET6 seems to be value 23, the total sockaddr size for this is 0x1C. The max sockaddr buffer size which the socket module can handle is size 0x1C.