1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:28:11 +00:00
serenity/Kernel/Net
brapru 8596b1e0c3 Kernel: Add a global routing table
Previously the system had no concept of assigning different routes for
different destination addresses as the default gateway IP address was
directly assigned to a network adapter. This default gateway was
statically assigned and any update  would remove the previously existing
route.

This patch is a beginning step towards implementing #180. It implements
a simple global routing table that is referenced during the routing
process. With this implementation it is now possible for a user or
service (i.e. DHCP) to dynamically add routes to the table.

The routing table will select the most specific route when possible. It
will select any direct match between the destination and routing entry
addresses. If the destination address overlaps between multiple entries,
the Kernel will use the longest prefix match, or the longest number of
matching bits between the destination address and the routing address.
In the event that there is no entries found for a specific destination
address, this implementation supports entries for a default route to be
set for any specified interface.

This is a small first step towards enhancing the system's routing
capabilities. Future enhancements would include referencing a
configuration file at boot to load pre-defined static routes.
2022-04-28 08:41:11 -07:00
..
Intel Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
NE2000 Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Realtek Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
ARP.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
EthernetFrameHeader.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
EtherType.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ICMP.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
IPv4.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
IPv4Socket.cpp Kernel: Add a global routing table 2022-04-28 08:41:11 -07:00
IPv4Socket.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
IPv4SocketTuple.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
LocalSocket.cpp Kernel: Allow sys$bind() on local sockets with short socket address 2022-04-21 16:31:53 +02:00
LocalSocket.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
LoopbackAdapter.cpp Kernel: Use default constructors/destructors 2022-03-17 00:51:36 -07:00
LoopbackAdapter.h Kernel: Remove the kmalloc_eternal heap :^) 2021-12-28 21:02:38 +01:00
NetworkAdapter.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
NetworkAdapter.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
NetworkingManagement.cpp Kernel/PCI: Don't hold spinlocks when doing fast device enumeration 2022-03-14 22:39:09 +01:00
NetworkingManagement.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
NetworkTask.cpp Kernel: Generalize the UpdateArp table to UpdateTable 2022-04-28 08:41:11 -07:00
NetworkTask.h Kernel: Avoid deadlock when trying to send packets from the NetworkTask 2021-04-30 23:11:56 +02:00
Routing.cpp Kernel: Add a global routing table 2022-04-28 08:41:11 -07:00
Routing.h Kernel: Add a global routing table 2022-04-28 08:41:11 -07:00
Socket.cpp Kernel: Move NNRP<Socket>s instead of copying in queue_connection_from 2022-04-09 23:46:02 +02:00
Socket.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
TCP.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
TCPSocket.cpp Kernel: Accept NNRP<Socket> instead of RP<Socket> in release_for_accept 2022-04-09 23:46:02 +02:00
TCPSocket.h Kernel: Accept NNRP<Socket> instead of RP<Socket> in release_for_accept 2022-04-09 23:46:02 +02:00
UDP.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
UDPSocket.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
UDPSocket.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00