aboutsummaryrefslogtreecommitdiff
path: root/pflocal/sock.h
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-07-05 17:09:58 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-07-05 17:09:58 +0200
commit9b64495c6cd22cd65f118c18a36b2de7cbde4344 (patch)
tree4ea487ab78ca73da32c50fa48bc3be546213551f /pflocal/sock.h
parent414f6c35a62a7e72f40c39089a9952913a7eeb90 (diff)
downloadhurd-9b64495c6cd22cd65f118c18a36b2de7cbde4344.tar.gz
hurd-9b64495c6cd22cd65f118c18a36b2de7cbde4344.tar.bz2
hurd-9b64495c6cd22cd65f118c18a36b2de7cbde4344.zip
pflocal: support SO_SNDBUF for unconnected sockets
We can store the requested value, to be applied when we connect the sockets. * pflocal/sock.h (struct sock): Add req_write_limit field. * pflocal/sock.c (sock_create): Initialize req_write_limit field to 0. (sock_connect): Bump the write_limit of the write pipe to the req_write_limit value. (sock_shutdown): Update req_write_limit from the write_limit of the write pipe. * pflocal/socket.c (S_socket_getopt, S_socket_setopt): When write_pipe is NULL, use req_write_limit.
Diffstat (limited to 'pflocal/sock.h')
-rw-r--r--pflocal/sock.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/pflocal/sock.h b/pflocal/sock.h
index dca16755..c1e73f9b 100644
--- a/pflocal/sock.h
+++ b/pflocal/sock.h
@@ -52,6 +52,9 @@ struct sock
another socket. */
struct pipe *read_pipe, *write_pipe;
+ /* The write limit that this side would like write_pipe to support. */
+ size_t req_write_limit;
+
/* FLAGS from SOCK_*, below. */
unsigned flags;