1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:47:35 +00:00
serenity/Kernel
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
..
API Kernel: Add a global routing table 2022-04-28 08:41:11 -07:00
Arch Kernel: Strip null terminators from all CPUID strings, not just brand 2022-04-26 20:20:44 +02:00
Bus Kernel: Use C++17 namespace style for nested PCI namespace 2022-04-26 22:56:45 +02:00
Devices Kernel: Allow WorkQueue items allocation failures propagation 2022-04-20 19:47:18 +02:00
FileSystem Kernel: Don't require AnonymousFiles to be mmap'd completely 2022-04-21 13:55:00 +02:00
Firmware Kernel: Move VMWareBackdoor to new directory in the Firmware directory 2022-04-20 19:21:32 +02:00
Graphics Kernel: Allow WorkQueue items allocation failures propagation 2022-04-20 19:47:18 +02:00
Heap Kernel: Move allocate_unbacked_region_anywhere() to MemoryManager 2022-04-05 13:45:10 +02:00
Interrupts Kernel: Move create_identity_mapped_region() to MemoryManager 2022-04-05 13:45:10 +02:00
Library Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Locking Kernel: Verify mutex big lock behavior 2022-04-09 15:55:20 +02:00
Memory Kernel: Limit free space between randomized memory allocations 2022-04-21 13:16:56 +02:00
Net Kernel: Add a global routing table 2022-04-28 08:41:11 -07:00
Prekernel Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Storage Kernel: Fix typo in Ramdisk 2022-04-22 22:20:57 -07:00
Syscalls Kernel: Add FIOCLEX and FIONCLEX ioctls 2022-04-26 14:32:12 +02:00
Tasks Kernel: Remove unnecessary includes from Thread.h 2022-01-30 16:21:59 +01:00
Time Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
TTY Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
AddressSanitizer.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
AddressSanitizer.h Everywhere: Use bgianf@serenityos.org for my copyright attribution 2021-04-22 21:15:54 +02:00
Assertions.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
AtomicEdgeAction.h Kernel: Add per platform Processor.h headers 2021-10-14 01:23:08 +01:00
BootInfo.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
CMakeLists.txt Kernel/USB: Get all interface descriptors on enumeration 2022-04-22 15:16:56 +02:00
CMOS.cpp Kernel: Move x86 IO instructions code into the x86 specific folder 2021-10-01 12:27:20 +02:00
CMOS.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CommandLine.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
CommandLine.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Coredump.cpp Kernel: Store AddressSpace memory regions in an IntrusiveRedBlackTree 2022-04-03 21:51:58 +02:00
Coredump.h Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
Debug.h.in Kernel: Stop debug spam when using mmap on /dev/mem device 2022-04-01 19:59:45 +02:00
DoubleBuffer.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
DoubleBuffer.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
embedmap.sh Kernel: Make new kernel build process work on macOS 2021-07-15 11:04:30 +02:00
Forward.h Kernel: Use intrusive RegionTree solution for kernel regions as well 2022-04-03 21:51:58 +02:00
FutexQueue.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
FutexQueue.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
GlobalProcessExposed.cpp Kernel: Add hypervisor_vendor_id entry to /proc/cpuinfo 2022-04-03 23:20:33 +02:00
init.cpp Kernel: Move VMWareBackdoor to new directory in the Firmware directory 2022-04-20 19:21:32 +02:00
KBuffer.h Kernel: Propagate overflow errors from Memory::page_round_up 2021-12-28 23:08:50 +01:00
KBufferBuilder.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
KBufferBuilder.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
KLexicalPath.cpp Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
KLexicalPath.h Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
kprintf.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
kstdio.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
KString.cpp Kernel: Add an error propagating KString::format(..) API :^) 2021-11-30 11:16:35 +01:00
KString.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
KSyms.cpp Kernel: Use kernel_mapping_base as the minimum kernel stack address 2022-04-10 21:57:19 +02:00
KSyms.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
MiniStdLib.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
mkmap.sh Kernel: Use the toolchain's nm in mkmap.sh 2021-12-30 18:10:51 +01:00
Multiboot.h Kernel: Only use multiboot framebuffer details if present 2022-01-06 22:34:11 +01:00
Panic.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Panic.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
PerformanceEventBuffer.cpp Kernel: Store AddressSpace memory regions in an IntrusiveRedBlackTree 2022-04-03 21:51:58 +02:00
PerformanceEventBuffer.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
PerformanceManager.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
PhysicalAddress.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Process.cpp Kernel: Remove big lock from sys$set_coredump_metadata 2022-04-09 21:51:16 +02:00
Process.h Kernel+LibC+LibCore: Implement the unlinkat(2) syscall 2022-04-23 10:43:32 -07:00
ProcessExposed.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
ProcessExposed.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
ProcessGroup.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
ProcessGroup.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
ProcessProcFSTraits.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
ProcessSpecificExposed.cpp Kernel: Store AddressSpace memory regions in an IntrusiveRedBlackTree 2022-04-03 21:51:58 +02:00
Random.cpp Kernel: Make KernelRng not inherit from Lockable 2021-12-26 21:22:59 +01:00
Random.h Kernel: Make PhysicalRegion.cpp compile on aarch64 2022-04-02 19:34:20 -07:00
RTC.cpp Everywhere: Fix many spelling errors 2022-01-07 10:56:59 +01:00
RTC.h Kernel: Ensure we read valid values from the RTC CMOS registers 2021-08-04 19:53:04 +02:00
SanCov.cpp Kernel: Add some implied auto qualifiers 2021-12-30 14:32:17 +01:00
Scheduler.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Scheduler.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Sections.h Kernel: Use the whole kernel PD range when randomizing the KASLR offset 2022-03-23 19:49:49 +02:00
StdLib.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
StdLib.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Syscall.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Thread.cpp Kernel: Unbreak ASLR in the new RegionTree world 2022-04-03 21:51:58 +02:00
Thread.h Kernel: Increase the default userspace stack size to 4 MiB 2022-04-12 16:48:15 +02:00
ThreadBlockers.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
ThreadTracer.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
ThreadTracer.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
TimerQueue.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
TimerQueue.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
UBSanitizer.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
UnixTypes.h Kernel: Add support for SA_SIGINFO 2022-03-04 20:07:05 +01:00
UserOrKernelBuffer.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
UserOrKernelBuffer.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
VirtualAddress.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
WaitQueue.cpp Kernel: Don't register thread as custom data for WaitQueueBlocker 2021-08-24 01:57:11 +02:00
WaitQueue.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
WorkQueue.cpp Kernel: Take WorkQueue item as reference instead of pointer in do_queue 2022-04-20 19:47:18 +02:00
WorkQueue.h Kernel: Take WorkQueue item as reference instead of pointer in do_queue 2022-04-20 19:47:18 +02:00