mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
Kernel: Add support for route flags
Previously the routing table did not store the route flags. This adds basic support and exposes them in the /proc directory so that a userspace caller can query the route and identify the type of each route.
This commit is contained in:
parent
210c3f24cd
commit
7a4e41f8f8
5 changed files with 12 additions and 8 deletions
|
@ -135,9 +135,9 @@ SpinlockProtected<Route::RouteList>& routing_table()
|
|||
return *s_routing_table;
|
||||
}
|
||||
|
||||
ErrorOr<void> update_routing_table(IPv4Address const& destination, IPv4Address const& gateway, IPv4Address const& netmask, RefPtr<NetworkAdapter> adapter, UpdateTable update)
|
||||
ErrorOr<void> update_routing_table(IPv4Address const& destination, IPv4Address const& gateway, IPv4Address const& netmask, u16 flags, RefPtr<NetworkAdapter> adapter, UpdateTable update)
|
||||
{
|
||||
auto route_entry = adopt_ref_if_nonnull(new (nothrow) Route { destination, gateway, netmask, adapter.release_nonnull() });
|
||||
auto route_entry = adopt_ref_if_nonnull(new (nothrow) Route { destination, gateway, netmask, flags, adapter.release_nonnull() });
|
||||
if (!route_entry)
|
||||
return ENOMEM;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue