mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-05 18:44:27 +03:00
Kernel: Show netmask/gateway in ProcFS when available
This commit is contained in:
parent
1aa7437ad7
commit
682fe48222
Notes:
sideshowbarker
2024-07-19 12:27:57 +09:00
Author: https://github.com/deoxxa Commit: https://github.com/SerenityOS/serenity/commit/682fe482224 Pull-request: https://github.com/SerenityOS/serenity/pull/499 Reviewed-by: https://github.com/awesomekling
@ -319,7 +319,12 @@ Optional<KBuffer> procfs$net_adapters(InodeIdentifier)
|
||||
obj.add("name", adapter.name());
|
||||
obj.add("class_name", adapter.class_name());
|
||||
obj.add("mac_address", adapter.mac_address().to_string());
|
||||
obj.add("ipv4_address", adapter.ipv4_address().to_string());
|
||||
if (!adapter.ipv4_address().is_zero()) {
|
||||
obj.add("ipv4_address", adapter.ipv4_address().to_string());
|
||||
obj.add("ipv4_netmask", adapter.ipv4_netmask().to_string());
|
||||
}
|
||||
if (!adapter.ipv4_gateway().is_zero())
|
||||
obj.add("ipv4_gateway", adapter.ipv4_gateway().to_string());
|
||||
obj.add("packets_in", adapter.packets_in());
|
||||
obj.add("bytes_in", adapter.bytes_in());
|
||||
obj.add("packets_out", adapter.packets_out());
|
||||
|
Loading…
Reference in New Issue
Block a user