Kernel+ifconfig: Add an MTU value to NetworkAdapter

This defaults to 1500 for all adapters, but LoopbackAdapter increases
it to 65536 on construction.

If an IPv4 packet is larger than the MTU, we'll need to break it into
smaller fragments before transmitting it. This part is a FIXME. :^)
This commit is contained in:
Andreas Kling 2019-11-28 07:12:05 +01:00
commit 75ed262fe5
Notes: sideshowbarker 2024-07-19 11:02:41 +09:00
5 changed files with 18 additions and 4 deletions

View file

@ -345,6 +345,7 @@ Optional<KBuffer> procfs$net_adapters(InodeIdentifier)
obj.add("packets_out", adapter.packets_out());
obj.add("bytes_out", adapter.bytes_out());
obj.add("link_up", adapter.link_up());
obj.add("mtu", adapter.mtu());
});
array.finish();
return builder.build();