mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
8596b1e0c3
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. |
||
---|---|---|
.. | ||
net | ||
netinet | ||
sys | ||
dirent.h | ||
errno.h | ||
fcntl.h | ||
futex.h | ||
ifaddrs.h | ||
poll.h | ||
sched.h | ||
serenity.h | ||
signal.h | ||
stdio.h | ||
termios.h | ||
time.h | ||
ucontext.h | ||
unistd.h |