History log of /haiku/src/add-ons/kernel/network/protocols/unix/unix.cpp
Revision Date Author Comments
# 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@gmail.com>


# 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 <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# b7b57869 18-Jun-2023 Trung Nguyen <trungnt282910@gmail.com>

unix: Implement datagram sockets

Implement `SOCK_DGRAM` sockets for `AF_UNIX` family.

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


# 3d5f8b7c 22-May-2018 waddlesplash <waddlesplash@gmail.com>

protocols/unix: Fix build after previous commit.


# 29fa68b2 28-Apr-2016 Jérôme Duval <jerome.duval@gmail.com>

unix: fix x86_64 build with trace.


# 2b415445 04-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Finished groundwork on ICMP by introducing a completely protocol agnostic
error mechanism.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37896 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 78888c44 15-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

Applied patch by Ma Jie adding functionality needed by mDNSResponder:
* added new protocol method process_ancillary_data_no_container() that does not
need a container to fill the cmsghdr data.
* Added support for the IP_RECVDSTADDR option using this call.
* Implemented support for IP_MULTICAST_IF.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31585 a95241bf-73f2-0310-859d-f6bbb57e9c96


# af015599 04-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

When sending a file descriptor via SCM_RIGHTS we also need to acquire an
open reference to it. Otherwise the descriptor could be closed while
being on the way. This fixes the ssh login problem with non-root users.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25318 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5d550262 03-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added support for SO_PEERCRED for Unix sockets.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25305 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ea035707 02-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Support the new {send,read}_data_no_buffer() protocol hooks to avoid
unnecessary data copies and waste of memory.
* Changed the storage backend to ring_buffer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25300 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 49e00d1f 02-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved the container management for ancillary data from the net_buffer
module to the stack module. There's a dedicated struct
ancillary_data_container, now. One can just set the container on a
net_buffer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25292 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6057b5ee 01-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added a bit more debug output in UnixFifo, but disabled debug output in
all files by default.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25285 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 59234b36 12-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added support for SCM_RIGHTS (sending file descriptors).
* Fixed shutdown(). It was computing the wrong fifo flags and set the
wrong ones from the wrong variable on the peer fifo.
* Generally made the Unix sockets behave more like they should. E.g.
after closing one end, it must still be possible to read from the
other (as long as there are buffered data). Also fine-tuned when to
return what errors from recv()/send().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24943 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eb8b342d 09-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Protocol module for Unix domain stream type sockets. The implementation
is almost complete, but still quite buggy (receiving data has a good
chance to drop into KDL).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24884 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2b4154458a820aa0b55b2800de9f0a13ea6ec1e2 04-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Finished groundwork on ICMP by introducing a completely protocol agnostic
error mechanism.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37896 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 78888c44da518b5a28135c7b3e79013e283789d4 15-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

Applied patch by Ma Jie adding functionality needed by mDNSResponder:
* added new protocol method process_ancillary_data_no_container() that does not
need a container to fill the cmsghdr data.
* Added support for the IP_RECVDSTADDR option using this call.
* Implemented support for IP_MULTICAST_IF.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31585 a95241bf-73f2-0310-859d-f6bbb57e9c96


# af015599ea0e0a449f377862b3cec4c763921a73 04-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

When sending a file descriptor via SCM_RIGHTS we also need to acquire an
open reference to it. Otherwise the descriptor could be closed while
being on the way. This fixes the ssh login problem with non-root users.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25318 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5d550262911f376e55323690a9c7fe269273002e 03-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added support for SO_PEERCRED for Unix sockets.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25305 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ea035707b3d55375ed24f460add69e2d51c3076b 02-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Support the new {send,read}_data_no_buffer() protocol hooks to avoid
unnecessary data copies and waste of memory.
* Changed the storage backend to ring_buffer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25300 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 49e00d1f99fa525355674427039e360eb96c574b 02-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved the container management for ancillary data from the net_buffer
module to the stack module. There's a dedicated struct
ancillary_data_container, now. One can just set the container on a
net_buffer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25292 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6057b5ee44416b26f14a0b10c008889285c2a0bb 01-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added a bit more debug output in UnixFifo, but disabled debug output in
all files by default.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25285 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 59234b36ce027000c55abc7ec2f6ff5b8f6f816b 12-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added support for SCM_RIGHTS (sending file descriptors).
* Fixed shutdown(). It was computing the wrong fifo flags and set the
wrong ones from the wrong variable on the peer fifo.
* Generally made the Unix sockets behave more like they should. E.g.
after closing one end, it must still be possible to read from the
other (as long as there are buffered data). Also fine-tuned when to
return what errors from recv()/send().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24943 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eb8b342d5610c48f6eb319d6726491e4f360e005 09-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Protocol module for Unix domain stream type sockets. The implementation
is almost complete, but still quite buggy (receiving data has a good
chance to drop into KDL).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24884 a95241bf-73f2-0310-859d-f6bbb57e9c96