History log of /haiku/src/add-ons/kernel/network/stack/net_socket.cpp (Results 1 – 25 of 116)
Revision Date Author Comments
# 36708e6a 05-Nov-2024 Augustin Cavalier <waddlesplash@gmail.com>

network: Let modules process all ancillary data at once, and adjust UNIX.

This way, modules can decide to do different things based on having
all the ancillary data available. In particular, the UNI

network: Let modules process all ancillary data at once, and adjust UNIX.

This way, modules can decide to do different things based on having
all the ancillary data available. In particular, the UNIX module will
now post only one message header for all the FDs, even if they came
from multiple sets of ancillary data.

This should fix "Message needs unreceived descriptors" from the Chromium
IPC code (which is used by Firefox).

show more ...


# 0deef289 20-Aug-2024 Augustin Cavalier <waddlesplash@gmail.com>

network/stack: Clarify code in add_ancillary_data.

CMSG_ALIGN just aliases to _ALIGN; the rest is just replacing repeated
macro invocations.


# e864e939 30-Jul-2024 Augustin Cavalier <waddlesplash@gmail.com>

network: Rename net_buffer::flags to msg_flags.

It contains only the MSG_* flags, not any other kind of flags.

Change-Id: Ia4590d87a1638fcdb848ef2b816b047b72ca2836
Reviewed-on: https://review.haiku

network: Rename net_buffer::flags to msg_flags.

It contains only the MSG_* flags, not any other kind of flags.

Change-Id: Ia4590d87a1638fcdb848ef2b816b047b72ca2836
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7915
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>

show more ...


# 45383846 28-May-2024 Augustin Cavalier <waddlesplash@gmail.com>

kernel/fs: Translate ioctl(FIONBIO) into fcntl(F_SETFL).

This way, FIONBIO and O_NONBLOCK will no longer get out of sync,
and additionally, FIONBIO can be used to change non-blocking
status of regul

kernel/fs: Translate ioctl(FIONBIO) into fcntl(F_SETFL).

This way, FIONBIO and O_NONBLOCK will no longer get out of sync,
and additionally, FIONBIO can be used to change non-blocking
status of regular (non-socket) FDs, too (which some applications
seem to take advantage of, to avoid needing to fetch the open_mode
before calling fcntl.)

Change-Id: Id894fe76c79ac373c0121a003d68180a3d9b6560
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7697
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

show more ...


# d2ac1f5a 30-Apr-2024 Jérôme Duval <jerome.duval@gmail.com>

network/stack: inherit selected options from the parent socket

similar commit in FreeBSD:
https://github.com/freebsd/freebsd-src/commit/d29b95ecc0d049406d27a6c11939d40a46658733
Change-Id: I370d39c60

network/stack: inherit selected options from the parent socket

similar commit in FreeBSD:
https://github.com/freebsd/freebsd-src/commit/d29b95ecc0d049406d27a6c11939d40a46658733
Change-Id: I370d39c603a3f54158aa2eaf2ad5a30e744beda0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7658
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>

show more ...


# 28129607 14-Mar-2024 Augustin Cavalier <waddlesplash@gmail.com>

network: Remove unnecessary WeakReferenceable::PrivatePointer checks.

These aren't needed anymore after the last commit.


# 783aa308 25-Nov-2023 Augustin Cavalier <waddlesplash@gmail.com>

network/stack: Clean up socket_receive.

* Reshuffle variable declarations, most are placed much
closer to first usages now.

* Turn a confusingly worded comment into an ASSERT(),
and remove

network/stack: Clean up socket_receive.

* Reshuffle variable declarations, most are placed much
closer to first usages now.

* Turn a confusingly worded comment into an ASSERT(),
and remove another one that was outdated.

* Fix some minor code style problems.

* Make the copying logic more consistent between first
and then subsequent copies.

* Make it possible for B_BAD_ADDRESS (EFAULT) to be
returned. This is not listed in POSIX, but as per
online sources, at least Linux does do this.

Change-Id: Idcfbed30531c1ab4796c4ee37f7f4ce8078e535b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7147
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>

show more ...


# 2926dfaa 25-Nov-2023 Augustin Cavalier <waddlesplash@gmail.com>

network/stack: Fix handling of MSG_TRUNC in socket_receive.

This is a Linux extension (which at least FreeBSD has also
adopted.) It's used in the Haiku port of libpcap (where it's
a necessity) and w

network/stack: Fix handling of MSG_TRUNC in socket_receive.

This is a Linux extension (which at least FreeBSD has also
adopted.) It's used in the Haiku port of libpcap (where it's
a necessity) and wpa_supplicant (where it wasn't, and I
removed it.) It seems that we've had it for quite some time.

Fixes tcpdump following addition of flag checks.

show more ...


# 459fa41f 23-Nov-2023 Augustin Cavalier <waddlesplash@gmail.com>

network/stack: Get rid of socket_readv and socket_writev.

These have not been used in years (maybe since the redesign of the
network stack?). Only socket_writev had an implementation, which was
most

network/stack: Get rid of socket_readv and socket_writev.

These have not been used in years (maybe since the redesign of the
network stack?). Only socket_writev had an implementation, which was
mostly just an incomplete version of socket_send.

Scatter/gather I/O is already supported via msghdr's msg_iov/len fields,
so this is redundant anyway.

Change-Id: If41c4f4ee021856f6db49c7cb95422a9c1aa7700
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7127
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>

show more ...


# 973f6d33 23-Nov-2023 Augustin Cavalier <waddlesplash@gmail.com>

network: Migrate SIGPIPE generation into the socket module.

This removes the burden of determining whether to and then
actually sending SIGPIPE from the protocol modules, meaning
the MSG_NOSIGNAL fl

network: Migrate SIGPIPE generation into the socket module.

This removes the burden of determining whether to and then
actually sending SIGPIPE from the protocol modules, meaning
the MSG_NOSIGNAL flag can now be implemented entirely in
the socket module and not even passed further down the chain.

Change-Id: I9ba976c4aff60d533cb4b390bbba1560c0de423f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7124
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

show more ...


# da2f2c65 23-Nov-2023 Augustin Cavalier <waddlesplash@gmail.com>

network/stack: Mask off MSG_NOSIGNAL at the top of socket_receive.

Fixes WebKitGTK spinning endlessly and spawning lots of
short-lived worker processes following the addition of
flag checks and EOPN

network/stack: Mask off MSG_NOSIGNAL at the top of socket_receive.

Fixes WebKitGTK spinning endlessly and spawning lots of
short-lived worker processes following the addition of
flag checks and EOPNOTSUPP to the various socket modules.

Change-Id: I6d944b4d0235eea9e8a9333645fcb531805f340f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7123
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

show more ...


# b761f925 09-Aug-2023 Jérôme Duval <jerome.duval@gmail.com>

unix: respect MSG_DONTWAIT on recvmsg

fix #18548

Change-Id: I33f502c2a376be6dbdf913f9613aab9d4c5a3644
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6802
Reviewed-by: waddlesplash <waddlesplash

unix: respect MSG_DONTWAIT on recvmsg

fix #18548

Change-Id: I33f502c2a376be6dbdf913f9613aab9d4c5a3644
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6802
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

show more ...


# 34874537 06-Aug-2023 Jérôme Duval <jerome.duval@gmail.com>

unix: respect MSG_DONTWAIT on sendmsg()

fix bug #18539

Change-Id: Id21362028287d1cbdac469226e6b52f4547a276f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6796
Tested-by: Commit checker robot <

unix: respect MSG_DONTWAIT on sendmsg()

fix bug #18539

Change-Id: Id21362028287d1cbdac469226e6b52f4547a276f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6796
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

show more ...


# 4313795d 02-Jul-2023 Trung Nguyen <trungnt282910@gmail.com>

network/stack: socketpair for non-stream sockets

`socketpair` should skip the `listen` and `accept` step for
non-stream sockets. This allows the implementation to work for
UNIX domain datagram socke

network/stack: socketpair for non-stream sockets

`socketpair` should skip the `listen` and `accept` step for
non-stream sockets. This allows the implementation to work for
UNIX domain datagram sockets.

Change-Id: I81ba826d605b77be5a4ec9046ea4c6bd556a35a0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6618
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>

show more ...


# 740f3ca4 15-May-2023 Jérôme Duval <jerome.duval@gmail.com>

net_socket: binding on the same socket should return an error

Change-Id: I7b948435f6e4009d9c11d2163172ad0ab6484e1d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6458
Reviewed-by: waddlesplash <

net_socket: binding on the same socket should return an error

Change-Id: I7b948435f6e4009d9c11d2163172ad0ab6484e1d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6458
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

show more ...


# fc13358a 14-May-2023 Jérôme Duval <jerome.duval@gmail.com>

net_socket: getpeername: IsConnected() when parent is not set

this fixes a test in libuv

Change-Id: I3002f9c44794ff3f8215ebc000fefa0f90b80279
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6455

net_socket: getpeername: IsConnected() when parent is not set

this fixes a test in libuv

Change-Id: I3002f9c44794ff3f8215ebc000fefa0f90b80279
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6455
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>

show more ...


# 9c1af36c 06-May-2023 Jérôme Duval <jerome.duval@gmail.com>

tcp: report disconnected events for tcp

* FIONREAD shouldn't report errors, only EINVAL when listening
* read available data in closing and closing-wait states
* fix #18327

Change-Id: Idd53a043a72e

tcp: report disconnected events for tcp

* FIONREAD shouldn't report errors, only EINVAL when listening
* read available data in closing and closing-wait states
* fix #18327

Change-Id: Idd53a043a72ef6c7b282ea669895ff2e947adbb4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6420
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

show more ...


# 97f11716 04-Sep-2022 Niels Sascha Reedijk <niels.reedijk@gmail.com>

Merge remote-tracking branch 'origin/master' into dev/netservices

Change-Id: I588c4a840523995f820161d63741c137bc5c719c


# 679a91d1 03-Jun-2022 Augustin Cavalier <waddlesplash@gmail.com>

network/stack: Simplify access to msg_iov in socket_send.

As the TODO comment noted, msg_iov has already been copied to the kernel
at this point (it is done in the syscall handler), so we do not nee

network/stack: Simplify access to msg_iov in socket_send.

As the TODO comment noted, msg_iov has already been copied to the kernel
at this point (it is done in the syscall handler), so we do not need to
use the user memory access functions.

(I verified that the iovecs passed from userland are indeed copied to
the kernel, but I did not find anything that actually posts more than
a single iov, so this is not tested especially thoroughly.)

show more ...


# 46b7da1f 08-May-2022 Niels Sascha Reedijk <niels.reedijk@gmail.com>

Merge branch 'master' into dev/netservices

Change-Id: I1eb6c2ea2fd0d794ad6378eab8bbb80ce46dfbb8


# 5847cd11 24-Apr-2022 Jérôme Duval <jerome.duval@gmail.com>

net_stack: don't write notify listen sockets

bug #17714

Change-Id: I91f6340bcda142b5eea12c0739b36e2f90af8ad3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5247
Tested-by: Commit checker robot

net_stack: don't write notify listen sockets

bug #17714

Change-Id: I91f6340bcda142b5eea12c0739b36e2f90af8ad3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5247
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

show more ...


# 779ab335 09-Dec-2020 X512 <danger_mail@list.ru>

use .IsSet() instead if .Get() != NULL

Change-Id: Ia2b7a719fd398e78cc3b11d4f7b02cb81179f65f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3488
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 36aafa56 04-Dec-2020 X512 <danger_mail@list.ru>

fix build after CObjectDeleter interface change

Change-Id: I76e217abcd13c22c4d68170e07333cdde4d7a891
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3461
Reviewed-by: Adrien Destugues <pulkomandy

fix build after CObjectDeleter interface change

Change-Id: I76e217abcd13c22c4d68170e07333cdde4d7a891
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3461
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>

show more ...


# 5c63c64b 25-Mar-2020 Leorize <leorize+oss@disroot.org>

net_socket: getpeername now only works on connected socket

Per POSIX.1-2008, getpeername() shall fails if the socket is not
connected.

Fixes #15081

Change-Id: Iafaed09df26f47b10efc2ceed6dfa2852857

net_socket: getpeername now only works on connected socket

Per POSIX.1-2008, getpeername() shall fails if the socket is not
connected.

Fixes #15081

Change-Id: Iafaed09df26f47b10efc2ceed6dfa2852857d39a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2549
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>

show more ...


# a03ed4fa 01-May-2020 Jérôme Duval <jerome.duval@gmail.com>

udp: set is_connected flag on our socket once connected.

Change-Id: Ie5fcc5152af813d74d33c20ed7c3e81f9e828518
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2548
Reviewed-by: waddlesplash <waddl

udp: set is_connected flag on our socket once connected.

Change-Id: Ie5fcc5152af813d74d33c20ed7c3e81f9e828518
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2548
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

show more ...


12345