haiku/headers/posix
Augustin Cavalier b6c24e6b40 network: Overhaul TUN/TAP subsystem.
* Rename the "tun" network device to "tunnel". FreeBSD calls theirs
   "tuntap" but speaks of both TUN and TAP devices as interfaces for
   tunnels. The other BSDs seem to do likewise.

 * Fold the "tun" driver into the "tunnel" network device. The
   network device now publishes entries in devfs when interfaces
   are created, and unpublishes them when interfaces are destroyed.

   This removes the need for the driver and device to communicate
   through a file descriptor, and thus allows the receive queue
   to be totally eliminated, massively simplifying that logic.

 * Use standard net-stack FIFOs instead of TCP BufferQueue, which is
   specialized to TCP's needs in far too many ways. Thanks to the
   previous commit adding support for interrupting semaphore waits,
   we can use the FIFO wait mechanisms, too.

 * Restructure the TAP logic, and generate MAC addresses more like
   Linux does.

 * Actually set type = IFT_TUN, and use the "loopback" frame handler
   instead of the "ethernet" frame handler. This allows significant
   cleanup of the header handling logic.

 * In TUN mode, reject packets that don't look like IP packets.

 * Delete "tunconfig"; it was mostly stubs and is now unnecessary.

TUN mode tested and confirmed as working by kallisti5 with OpenVPN.
TAP mode partially tested, but not yet confirmed as working.

Fixes #18673.

Change-Id: Ibd803139474e8db556a4f567901da15ee4083621
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7143
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2023-11-30 20:44:44 +00:00
..
arch kernel/arm: implement signals, fork, restart syscall 2023-03-20 17:28:20 +00:00
arpa
compat/sys
net network: Overhaul TUN/TAP subsystem. 2023-11-30 20:44:44 +00:00
netinet
netinet6
sys
alloca.h
assert.h headers: Define static_assert for C11 2023-09-04 05:58:31 +00:00
complex.h
ctype.h libs/posix: Implemented new locale functions 2022-07-11 16:30:16 +00:00
dirent.h
div_t.h
dlfcn.h
endian.h
errno.h
fcntl.h
fenv.h
fnmatch.h
ftw.h
getopt.h
glob.h
grp.h
inttypes.h
iovec.h
langinfo.h libs/posix: Implemented new locale functions 2022-07-11 16:30:16 +00:00
libgen.h
libio.h
limits.h Added missing posixoptions and sysconf constants according POSIX.1-2017 standard 2022-12-23 01:57:05 +00:00
locale_t.h locale_t.h: Add missing newline at end of file. 2023-04-25 12:38:37 -04:00
locale.h libs/posix: Implemented new locale functions 2022-07-11 16:30:16 +00:00
malloc_debug.h
malloc.h
math.h math.h: Change definition of FP_ILOGB0 to match the specification. 2023-04-08 12:30:15 -04:00
memory.h
monetary.h libs/posix: Implemented new locale functions 2022-07-11 16:30:16 +00:00
netdb.h Rewrite <netdb.h> and drop a lot of non-standard stuff. 2023-02-27 22:51:17 -05:00
nl_types.h
null.h
poll.h
pthread.h pthread: Use 1 for PTHREAD_BARRIER_SERIAL_THREAD. 2023-06-07 15:12:11 +00:00
pwd.h
regex.h
resolv.h
sched.h
search.h
semaphore.h
setjmp.h
shadow.h
signal.h signal.h: Look for _DEFAULT_SOURCE not __USE_GNU for sighandler_t. 2023-08-30 17:31:31 -04:00
size_t.h
spawn.h
stdint.h stdint.h: fix definition of UINT8_MAX, UINT16_MAX, UINT8_C and UINT16_C 2022-11-08 16:11:40 +00:00
stdio_ext.h
stdio_post.h
stdio_pre.h
stdio.h
stdlib.h
string.h libroot: Add stpncpy. 2023-11-28 20:37:15 -05:00
strings.h libs/posix: Implemented new locale functions 2022-07-11 16:30:16 +00:00
syslog.h
tar.h
termios.h termios.h: Undefine/remove some unimplemented BeOS extensions. 2023-05-22 18:20:17 -04:00
threads.h threads.h: Fix value of ONCE_FLAG_INIT. 2023-04-10 11:50:33 -04:00
time.h libs/posix: Implemented new locale functions 2022-07-11 16:30:16 +00:00
uchar.h uchar.h: Add missing include of stdint.h. 2023-04-08 12:30:14 -04:00
unistd.h Added missing posixoptions and sysconf constants according POSIX.1-2017 standard 2022-12-23 01:57:05 +00:00
utime.h
utmpx.h
wchar_t.h
wchar.h POSIX: wchar.h and wctype.h don't need the locale.h but locale_t.h 2022-11-02 14:09:08 +00:00
wctype.h POSIX: wchar.h and wctype.h don't need the locale.h but locale_t.h 2022-11-02 14:09:08 +00:00