sortix-mirror/libc/include
Jonas 'Sortie' Termansen 8d88bcdbf8 Add networking stack.
This commit is based on work by Meisaka Yukara <Meisaka.Yukara@gmail.com>
contributed as the commit bbf7f1e8a5238a2bd1fe8eb1d2cc5c9c2421e2c4. See the
individual file headers for which files contain remnants of this work.

This change adds all the kernel parts of a network stack. The network stack
is partial but implements many of the important parts.

Add if(4) network interface abstraction. Network interfaces are registered
in a global list that can be iterated and each assigned an unique integer
identifier.

Add reference counted packets with a cache that recycles recent packets.

Add support for lo(4) loopback and ether(4) ethernet network interfaces.
The /dev/lo0 loopback device is created automatically on boot.

Add arp(4) address resolution protocol driver for translation of inet(4)
network layer addresses into ether(4) link layer addresses. arp(4) entries
are cached and evicted from the cache when needed or when the entry has not
been used for a while. The cache is limited to 256 entries for now.

Add ip(4) internet protocol version 4 support. IP fragmentation and options
are not implemented yet.

Add tcp(4) transmission control protocol sockets for a reliable transport
layer protocol that provides a reliable byte stream connection between two
hosts. The implementation is incomplete and does not yet implement out of
band data, options, and high performance extensions.

Add udp(4) user datagram protocol sockets for a connectionless transport
layer that provides best-effort delivery of datagrams.

Add ping(4) sockets for a best-effort delivery echo of datagrams.

Change type of sa_family_t from unsigned short to uint16_t.

Add --disable-network-drivers to the kernel(7) options and expose it with a
bootloader menu. tix-iso-bootconfig can set this option by default.

Import CRC32 code from libz for the Ethernet checksum.

This is a compatible ABI change that adds features to socket(2) (AF_INET,
IPPROTO_TCP, IPPROTO_UDP, IPPROTO_PING), the ioctls for if(4), socket
options, and the lo0 loopback interface.
2022-02-08 18:48:34 +01:00
..
__ Implement threading primitives that truly sleep. 2021-06-23 22:10:47 +02:00
arpa Delete inet_addr(3) and inet_ntoa(3). 2020-07-29 21:38:41 +02:00
net Add networking stack. 2022-02-08 18:48:34 +01:00
netinet Add networking stack. 2022-02-08 18:48:34 +01:00
sys Add networking stack. 2022-02-08 18:48:34 +01:00
DIR.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
FILE.h Fix <stdio.h> pulling in <pthread.h> through <FILE.h> when __is_sortix_libc. 2018-07-17 12:25:52 +02:00
alloca.h Clean up alloca.h header. 2016-05-15 22:43:29 +02:00
ar.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
argp.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
assert.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
blf.h Add bcrypt_checkhash(3) and bcrypt_newhash(3). 2016-01-09 02:54:51 +01:00
brand.h Make the branding system more neutral. 2016-05-15 22:43:29 +02:00
byteswap.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
ctype.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
dirent.h Fix <fcntl.h> including <sys/stat.h> namespace pollution. 2018-08-06 23:59:34 +02:00
dlfcn.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
elf.h Replace <elf.h> with public domain version from musl. 2016-02-29 01:37:31 +01:00
endian.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
err.h Add errc(3) family. 2016-11-06 15:31:52 -06:00
errno.h Add networking stack. 2022-02-08 18:48:34 +01:00
error.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
fcntl.h Fix <fcntl.h> including <sys/stat.h> namespace pollution. 2018-08-06 23:59:34 +02:00
features.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
fnmatch.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
fsmarshall-msg.h Fix <fcntl.h> including <sys/stat.h> namespace pollution. 2018-08-06 23:59:34 +02:00
fsmarshall.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
fstab.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
getopt.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
grp.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
inttypes.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
ioleast.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
langinfo.h Add nl_langinfo(3). 2016-10-03 20:02:12 +02:00
libgen.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
libk.h Abort on overlapping memcpy. 2021-05-30 23:48:19 +02:00
locale.h Fix <locale.h> not defining NULL. 2017-08-20 12:44:34 +02:00
malloc.h Fix kernel HEAP_GUARD_DEBUG support. 2017-05-15 22:11:24 +02:00
msr.h Compile libc with -ffreestanding. 2016-05-15 22:43:29 +02:00
netdb.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
poll.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
psctl.h Fix <psctl.h> using the same include guard as <sys/ioctl.h>. 2021-12-12 22:13:05 +01:00
pthread.h Implement threading primitives that truly sleep. 2021-06-23 22:10:47 +02:00
pty.h Add openpty(3). 2016-11-23 22:31:05 +01:00
pwd.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
regex.h Add REG_STARTEND. 2016-10-30 18:08:59 +01:00
sched.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
scram.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
semaphore.h Implement threading primitives that truly sleep. 2021-06-23 22:10:47 +02:00
setjmp.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
sha2.h Add <sha2.h>. 2020-04-13 22:15:04 +02:00
signal.h Fix <signal.h> namespace pollution for strict C. 2017-08-20 12:44:33 +02:00
stdint.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
stdio.h Rewrite scanf(3) to be standards compliant. 2020-03-07 23:31:05 +01:00
stdio_ext.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
stdlib.h Fix <stdlib.h> using long long in C89 mode. 2017-08-20 12:44:34 +02:00
string.h Fix <string.h> including <sys/__/types.h> in strict C mode. 2017-08-20 12:44:34 +02:00
strings.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
syslog.h Implement RFC5424 syslog version 1. 2022-01-05 22:00:53 +01:00
system-elf.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
termios.h Add pseudo terminals. 2016-11-23 22:31:05 +01:00
time.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
timespec.h Fix handling of overflow and non-canonical values in timespec APIs. 2021-06-22 21:48:27 +02:00
unistd.h Add support for sessions. 2016-11-23 22:30:47 +01:00
utime.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
wchar.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00
wctype.h Relicense Sortix to the ISC license. 2016-03-05 22:21:50 +01:00