History log of /fuchsia/zircon/docs/syscalls/socket_write.md
Revision Date Author Comments
# ff3ec64b 04-Sep-2018 George Kulakowski <kulakowski@google.com>

[socket] Modify the error reported when writing a very large datagram packet

When attempting to write a datagram packet larger than the socket's
entire capacity, we previously returned ZX_ERR_SHOULD_WAIT. This is
misleading: the wait can never be satisfied, as socket capacity cannot
grow. This CL changes it to report ZX_ERR_OUT_OF_BOUNDS instead.

ZX-2553 #done

Test: modified /boot/test/core/socket accordingly, and added `k ut
mbuf` tests

Change-Id: I40ac9e8ec0c1e228ee19219499e951e7e6870a8a


# 99387274 23-Jul-2018 George Kulakowski <kulakowski@google.com>

[docs][syscalls] Add TODOs about documenting system call rights

ZX-2399 #comment

Test: no functional change
Change-Id: I1f285c677e2444fcf1d720d7ecbd9f490c303962


# 013973ad 26-Jun-2018 Doug Evans <dje@google.com>

[docs][syscalls] Clarify ZX_ERR_NO_MEMORY as eventually going away

Not touched:
vmo_op_range.md
vmo_set_size.md
vmo_write.md
The current text is ok for these.

ZX-2303 #comment patch

Tested: Just doc changes, read before/after.

Change-Id: I2c6e1039e2b205e9cc377b9888755fa7ac676c78


# 479c6302 04-Jun-2018 Adam Barth <abarth@google.com>

[docs] Improve zx_socket_write docs

Clarify that short writes are still considered a success and that
callers should wait when they receive ZX_ERR_SHOULD_WAIT.

Change-Id: I322db7a5ebef3925fe95fa5c9f7568e7d569ffd6


# 9dd5b5f5 24-May-2018 Adam Barth <abarth@chromium.org>

[syscalls] Update parameter types and names

This CL updates the parameter types and names for a number of syscalls
to match the Zircon System API rubric. There's more work to do to make
all the syscalls conform to the rubric, but this change is a start.

Change-Id: I218ac5e7e0cbd80a8c69fef7891ad40b78b6b407


# f3e2126c 12-Sep-2017 Roland McGrath <mcgrathr@google.com>

[zx] Magenta -> Zircon

The Great Renaming is here!

Change-Id: I3229bdeb2a3d0e40fb4db6fec8ca7d971fbffb94


# 174b093c 02-Aug-2017 David Crawshaw <crawshaw@google.com>

[kernel][socket] control plane

Implement an out-of-band socket control plane to be used for
configuring a socket connection. Typical POSIX functions (like
bind and listen) can be implemented by sending an out-of-band
message to the other side of the socket using MX_SOCKET_CONTROL.

Change-Id: Ic1a8d1a2fbf8cc9b1e815bb1abd6fdb0ccf3271a


# 4c361056 03-Aug-2017 James Robinson <jamesr@google.com>

Allow shutting down sockets for read, write or both

This replaces half-closing sockets with calls to shut down a socket
endpoint for read, write, or both as a separate operation from closing.
Shutting an endpoint down for read disables all further reads from that
endpoint (past data already buffered) and all further writes into the
peer endpoint. Shutting an endpoint down for writing disables all
further writing into that endpoint and all reader from the peer
endpoint (past data already buffered).

Shutting a socket endpoint down no longer raises the PEER_CLOSED
signal on the peer endpoint. Separate signals are raised when reading and
writing are disabled and the PEER_CLOSED signal is only raised when the peer
is actually closed.

In mxio, this fully implements the posix shutdown(2) calls for local sockets
created with the socketpair(2) call. Remote sockets support shutdown(SHUT_WR)
using their existing mechanism. Once remote sockets are migrated to use an
mx_socket directly, they can re-use this machinery to fully support partial
shutdowns.

This is a reland of 2f2e0a0f8f1cefdd9505d5ba18d4c8aeaacb4188 which was reverted
in a8fa45f268598f75478464f568d543ad3e58a0cb, with the following changes:

mxio/remotesocket.c updated to use the new shutdown bits for reading
and writing

The READ_DISABLED signal is now only raised when reading is disabled in
that direction on the socket and the socket is drained in that
direction.

New tests added for blocking recv() and send() and fixes in the mxio
bindings to behave correctly for these cases.

Change-Id: I455855d29a6a79d2e98ad47b37222965332b9b98


# a8fa45f2 02-Aug-2017 Tim Kilbourn <tkilbourn@google.com>

Revert "Allow shutting down sockets for read, write or both"

This reverts commit 2f2e0a0f8f1cefdd9505d5ba18d4c8aeaacb4188.

NET-129 #done

Change-Id: Iac5291251a8b3f28e77169aa8e59677dd3568f4c


# 2f2e0a0f 27-Jul-2017 James Robinson <jamesr@google.com>

Allow shutting down sockets for read, write or both

This replaces half-closing sockets with calls to shut down a socket
endpoint for read, write, or both as a separate operation from closing.
Shutting an endpoint down for read disables all further reads from that
endpoint (past data already buffered) and all further writes into the
peer endpoint. Shutting an endpoint down for writing disables all
further writing into that endpoint and all reader from the peer
endpoint (past data already buffered).

Shutting a socket endpoint down no longer raises the PEER_CLOSED
signal on the peer endpoint. Separate signals are raised when reading and
writing are disabled and the PEER_CLOSED signal is only raised when the peer
is actually closed.

In mxio, this fully implements the posix shutdown(2) calls for local sockets
created with the socketpair(2) call. Remote sockets support shutdown(SHUT_WR)
using their existing mechanism. Once remote sockets are migrated to use an
mx_socket directly, they can re-use this machinery to fully support partial
shutdowns.

Change-Id: If73a3550a97a87785be32c182ca4fb44abb98fc5


# 04e878e7 22-Jun-2017 Mark Seaborn <mseaborn@google.com>

[syscalls][socket] Update docs and test for mx_socket_write() error conditions

Fix the docs: (MX_)ERR_TOO_BIG does not exist as an error code.

Furthermore, mx_socket_write() doesn't seem to have a code path for
the exact condition of "*size* is larger than the largest allowable
size for socket messages".

The actual error behaviour is already covered in the docs under
"DESCRIPTION".

Change the test to be stricter: Test the status code, and test whether
'written' was or wasn't filled out.

Change-Id: I257695477ac673b24cb108728f96a2e207942733


# 4e0f8792 09-Jun-2017 George Kulakowski <kulakowski@google.com>

[docs][errors] Rename all the errors in docs/ to MX_OK and MX_ERR_*

Change-Id: I62451456a83145760c6454a619d4c699ce8e9017


# 9a2f08bc 24-May-2017 David Crawshaw <crawshaw@google.com>

[syscalls][socket] add MX_SOCKET_DATAGRAM support

Change-Id: Ifa9a2e7f5d40b2d04f7a6467d451df2116376d47


# 1bb8a330 15-Feb-2017 George Kulakowski <kulakowski@google.com>

[magenta][errors] Rename ERR_REMOTE_CLOSED to ERR_PEER_CLOSED

This error, at least at the Magenta syscall level, is really about
peers. This new name aligns with the MX_*_PEER_CLOSED signals. And
REMOTE implies a distance or asymmetry that isn't necessarily true.

This leaves a compatibility alias for the old name in place until the
rest of Fuchsia can be cleaned up.

Change-Id: Icf95003b2813270d865c6876b62e21d9f5b8c0f6


# 7e86f15c 24-Feb-2017 George Kulakowski <kulakowski@google.com>

[syscalls] Uniformally use "options" rather than "flags" as a syscall parameter name

With the exception of the VMAR syscalls which really do want to talk
about map_flags.

Part of MG-559

Change-Id: I51673de824b4072990f01724a3bf522a9a84f4f4


# d4ba06df 23-Feb-2017 George Kulakowski <kulakowski@google.com>

[docs][syscalls] Fix all the manpages

Change-Id: Ie9ba25060f3331de8d9c178caf6332fb48fc80f5


# 2b6c705b 29-Dec-2016 Abdulla Kamar <abdulla@google.com>

[socket] Allow actual to be NULL in mx_socket_read.

Users should be allowed to pass NULL for actual, in the same way as
mx_socket_write.

Change-Id: I9678be6efe77a4e44949e86d05fcba2eba7d192c


# 7006ae17 07-Dec-2016 Roland McGrath <mcgrathr@google.com>

Remove mx_size_t and mx_ssize_t types

mx_ssize_t is no longer used. mx_size_t is superfluous and
can be replaced by the standard C type size_t.

Change-Id: I2137af6f166099d2e8aaca4fab63ff101f2a43ac


# c49b633a 28-Nov-2016 George Kulakowski <kulakowski@google.com>

[docs] Fix typo in socket write manpage

Change-Id: Icb0dfa056fa3ea4c83359402f70a6e2245d9e5ca


# a39228c2 16-Nov-2016 George Kulakowski <kulakowski@google.com>

[docs] Add socket man pages

Change-Id: Icb7debc576fc46777f38a7e47170a19eed854062