Official MINIX sources - Automatically replicated from gerrit.minix3.org
Go to file
David van Moolenbroek 4c27a83389 Add libsockevent: a socket event dispatching library
This library provides an event-based abstraction model and dispatching
facility for socket drivers.  Its main goal is to eliminate any and
all need for socket drivers to keep track of pending socket calls.
Additionally, this library takes over responsibility of a number of
other tasks that would otherwise be duplicated between socket drivers,
but in such a way that individual socket drivers retain a large degree
of freedom in terms of API behavior.  The library's main features are:

- suspension, resumption, and cancellation of socket calls;
- an abstraction layer for select(2);
- state tracking of shutdown(2);
- pending (asynchronous) errors and the SO_ERROR socket option;
- listening-socket tracking and the SO_ACCEPTCONN socket option;
- generation of SIGPIPE signals; SO_NOSIGPIPE, MSG_NOSIGNAL;
- send and receive low-watermark tracking, SO_SNDLOWAT, SO_RCVLOWAT;
- send and receive timeout support and SO_SNDTIMEO, SO_RCVTIMEO;
- an abstraction layer for the SO_LINGER socket option;
- tracking of various on/off socket options as well as SO_TYPE;
- a range of pre-checks on socket calls that are required POSIX.

In order to track per-socket state, the library manages an opaque
"sock" object for each socket.  The allocation of such objects is left
entirely to the socket driver.  Each sock object has an associated
callback table for calls from libsockevent to the socket driver.  The
socket driver can raise events on the sock object in order to flag
that any previously suspended operations of a particular type should
be resumed.  The library may defer processing such raised events if
immediate processing could interfere with internal consistency.

The sockevent library is layered on top of libsockdriver, and should
be used by all socket driver implementations if at all possible.

Change-Id: I3eb2c80602a63ef13035f646473360293607ab76
2017-03-09 23:39:53 +00:00
bin Import NetBSD ps(1) 2016-01-13 20:32:52 +01:00
common w(1): switch to libkvm 2016-01-13 20:32:50 +01:00
crypto etc: synchronize master.password, group to NetBSD 2017-02-18 21:37:24 +00:00
dist/pf/sbin/pfctl Import a subset of PF distribution files 2016-06-18 12:20:46 +00:00
distrib Add libsockevent: a socket event dispatching library 2017-03-09 23:39:53 +00:00
docs Initial import of NetBSD rc system 2017-02-23 14:08:39 +00:00
etc etc: replace one more "service" with minix-service 2017-02-26 00:03:38 +00:00
external etc: synchronize master.password, group to NetBSD 2017-02-18 21:37:24 +00:00
games Fix ARM noassert builds -g/-O{s/0/1/2/3} 2016-01-24 18:56:38 +01:00
gnu Fix the process for GNU tools on MINIX 2016-11-30 08:42:36 +01:00
include Start using sysctl(3) throughout userland 2016-01-13 20:32:45 +01:00
lib Add libsockevent: a socket event dispatching library 2017-03-09 23:39:53 +00:00
libexec ld.elf_so: sysctl support uncommented 2016-01-16 14:04:24 +01:00
minix Add libsockevent: a socket event dispatching library 2017-03-09 23:39:53 +00:00
releasetools fixed git checkout and updated latest known changeset working for grub 2016-10-18 14:22:28 +02:00
sbin Import NetBSD rcorder(8) 2017-02-22 17:17:28 +00:00
share Add libsockevent: a socket event dispatching library 2017-03-09 23:39:53 +00:00
sys libc: remove MINIX3 restrictions from getnameinfo(3) 2016-10-24 12:11:07 +00:00
tests tests: add most kyua kernel tests 2016-01-16 14:04:25 +01:00
tools Improve the process for GNU tools 2016-09-01 21:16:13 +02:00
usr.bin Import NetBSD getent(1) 2017-03-09 20:04:33 +01:00
usr.sbin Import NetBSD service(8) 2017-02-23 14:08:56 +00:00
.gitignore Initial import of NetBSD rc system 2017-02-23 14:08:39 +00:00
.gitreview build:update 'git review' config to match gerrit.minix3.org 2014-07-28 17:05:15 +02:00
build.sh NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
LICENSE Fix parameter parsing in cut 2010-01-21 10:16:05 +00:00
Makefile NetBSD re-synchronization of the source tree 2016-01-13 20:32:14 +01:00
Makefile.inc Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC) 2014-07-28 17:05:06 +02:00