SOCU:recvfrom: Difference between revisions

From 3dbrew
Jump to navigation Jump to search
Created page with "=Request= {| class="wikitable" border="1" |- ! Index Word ! Description |- | 0 | Header code [0x00080102] |- | 1 | Socket descriptor |- | 2 | size_t len |- | 3 | int flags |- |..."
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 56: Line 56:
|-
|-
| 1
| 1
| Result code (zero for success)
| Result code
|-
|-
| 2
| 2
| Total received data
| POSIX return value
|-
|-
| 3
| 3
| Output addrlen?(Value 0x1 when src_addr is unused)
| Total received data, from the above return-value when no error was returned.
|}
|}
=Description=
This receives data from the socket. The max length for the len field is 0x2000, the socket module will use length 0x2000 when this field is >0x2000.

Latest revision as of 22:15, 13 July 2013

Request

Index Word Description
0 Header code [0x00080102]
1 Socket descriptor
2 size_t len
3 int flags
4 socklen_t addrlen
5 Value 0x20 (processID header)
6 ProcessID set by the ARM11 kernel.

The following is located 0x100-bytes after the beginning of the above command buffer:

Index Word Description
0 (len<<14) | 2
1 Pointer to output buf
2 (addrlen<<14) | 2
3 Pointer to the output src_addr structure (must be a valid address, even when unused)

Response

Index Word Description
0 Header code
1 Result code
2 POSIX return value
3 Total received data, from the above return-value when no error was returned.

Description

This receives data from the socket. The max length for the len field is 0x2000, the socket module will use length 0x2000 when this field is >0x2000.