Commit Graph

22 Commits

Author SHA1 Message Date
Jonas 'Sortie' Termansen 2ef6804ead Add networking stack.
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 of echo 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.

This commit is based on work by Meisaka Yukara contributed as the commit
bbf7f1e8a5238a2bd1fe8eb1d2cc5c9c2421e2c4. Almost no lines of this work
remains in this final commit as it has been rewritten or refactored away
over the years, see the individual file headers for which files contain
remnants of this work.

Co-authored-by: Meisaka Yukara <Meisaka.Yukara@gmail.com>
2022-12-11 13:40:34 +01:00
Jonas 'Sortie' Termansen 0e32284417 Fix 'is can' typo in README. 2016-10-01 14:52:09 +02:00
Jonas 'Sortie' Termansen a2add96997 Update README for the 1.0 release. 2016-03-06 23:06:46 +01:00
Jonas 'Sortie' Termansen 2b72262b4f Relicense Sortix to the ISC license.
I hereby relicense all my work on Sortix under the ISC license as below.

All Sortix contributions by other people are already under this license,
are not substantial enough to be copyrightable, or have been removed.

All imported code from other projects is compatible with this license.

All GPL licensed code from other projects had previously been removed.

Copyright 2011-2016 Jonas 'Sortie' Termansen and contributors.

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2016-03-05 22:21:50 +01:00
Jonas 'Sortie' Termansen b24103d458 Add manual pages. 2016-02-03 21:50:32 +01:00
Jonas 'Sortie' Termansen 398eee1a8b Add AHCI driver. 2016-02-02 22:47:49 +01:00
Jonas 'Sortie' Termansen 4df23d9a36 Fix README typos. 2015-06-29 17:17:55 +02:00
Jonas 'Sortie' Termansen a5d14bf3c0 Link to the preferred users-cs.au.dk instead. 2015-04-25 16:02:20 +02:00
Jonas 'Sortie' Termansen 0087b43c3b Migrate to gitlab. 2015-03-11 13:59:28 +01:00
Jonas 'Sortie' Termansen d14a9fff72 Update documentation for the upcoming 0.9 release. 2014-12-28 20:18:58 +01:00
Jonas 'Sortie' Termansen b0d07b9142 Add the Tix package management system. 2013-12-19 18:09:08 +01:00
Jonas 'Sortie' Termansen 425069cbf1 Add documentation. 2013-12-19 17:42:07 +01:00
Jonas 'Sortie' Termansen db57bb6336 Port remaining x86 nasm assembly to GNU as. 2012-12-14 14:13:37 +01:00
Jonas 'Sortie' Termansen be4858f82c Rename libmaxsi to sortix libc. 2012-12-14 14:13:36 +01:00
Jonas 'Sortie' Termansen 50a2342a37 Update README. 2012-09-10 12:28:29 +02:00
Jonas 'Sortie' Termansen 111e359482 Updated README. 2012-09-08 18:45:52 +02:00
Jonas 'Sortie' Termansen db79994e64 Refactored all the sortix headers into a include directory.
Also got rid of trailing white space. That corrupted .git/.

Big ass-commit because of recovered .git directory.
2012-03-22 00:52:29 +01:00
Jonas 'Sortie' Termansen 8a8b8e47b7 Fixed spelling error in README. 2012-03-18 22:46:58 +01:00
Jonas 'Sortie' Termansen 051ec170f5 Updated the README with information about the upcoming 0.6 release. 2012-03-18 21:36:11 +01:00
Jonas 'Sortie' Termansen a353706011 Updated the README. 2012-03-14 15:14:21 +01:00
Jonas 'Sortie' Termansen 3de134a3f0 Added build instructions to the README. 2012-03-11 01:42:03 +01:00
Jonas 'Sortie' Termansen 89223ed3ed Added a README. 2012-03-11 00:57:56 +01:00