mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Kernel: Stop exposing gateway field
It doesn't make sense after introduction of routing table which allows having multiple gateways for every interface, and isn't used by any of the userspace programs now.
This commit is contained in:
parent
06c90b35ec
commit
66ab4d61a4
Notes:
sideshowbarker
2024-07-17 11:25:07 +09:00
Author: https://github.com/sppmacd Commit: https://github.com/SerenityOS/serenity/commit/66ab4d61a4 Pull-request: https://github.com/SerenityOS/serenity/pull/13857 Reviewed-by: https://github.com/brapru
4 changed files with 0 additions and 13 deletions
|
@ -55,10 +55,6 @@ private:
|
|||
auto ipv4_netmask = TRY(adapter.ipv4_netmask().to_string());
|
||||
TRY(obj.add("ipv4_netmask", ipv4_netmask->view()));
|
||||
}
|
||||
if (!adapter.ipv4_gateway().is_zero()) {
|
||||
auto ipv4_gateway = TRY(adapter.ipv4_gateway().to_string());
|
||||
TRY(obj.add("ipv4_gateway", ipv4_gateway->view()));
|
||||
}
|
||||
TRY(obj.add("packets_in", adapter.packets_in()));
|
||||
TRY(obj.add("bytes_in", adapter.bytes_in()));
|
||||
TRY(obj.add("packets_out", adapter.packets_out()));
|
||||
|
|
|
@ -159,9 +159,4 @@ void NetworkAdapter::set_ipv4_netmask(IPv4Address const& netmask)
|
|||
m_ipv4_netmask = netmask;
|
||||
}
|
||||
|
||||
void NetworkAdapter::set_ipv4_gateway(IPv4Address const& gateway)
|
||||
{
|
||||
m_ipv4_gateway = gateway;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -55,7 +55,6 @@ public:
|
|||
IPv4Address ipv4_address() const { return m_ipv4_address; }
|
||||
IPv4Address ipv4_netmask() const { return m_ipv4_netmask; }
|
||||
IPv4Address ipv4_broadcast() const { return IPv4Address { (m_ipv4_address.to_u32() & m_ipv4_netmask.to_u32()) | ~m_ipv4_netmask.to_u32() }; }
|
||||
IPv4Address ipv4_gateway() const { return m_ipv4_gateway; }
|
||||
virtual bool link_up() { return false; }
|
||||
virtual i32 link_speed()
|
||||
{
|
||||
|
@ -66,7 +65,6 @@ public:
|
|||
|
||||
void set_ipv4_address(IPv4Address const&);
|
||||
void set_ipv4_netmask(IPv4Address const&);
|
||||
void set_ipv4_gateway(IPv4Address const&);
|
||||
|
||||
void send(MACAddress const&, ARPPacket const&);
|
||||
void fill_in_ipv4_header(PacketWithTimestamp&, IPv4Address const&, MACAddress const&, IPv4Address const&, IPv4Protocol, size_t, u8 type_of_service, u8 ttl);
|
||||
|
@ -103,7 +101,6 @@ private:
|
|||
MACAddress m_mac_address;
|
||||
IPv4Address m_ipv4_address;
|
||||
IPv4Address m_ipv4_netmask;
|
||||
IPv4Address m_ipv4_gateway;
|
||||
|
||||
// FIXME: Make this configurable
|
||||
static constexpr size_t max_packet_buffers = 1024;
|
||||
|
|
|
@ -67,7 +67,6 @@ void NetworkTask_main(void*)
|
|||
if (adapter.class_name() == "LoopbackAdapter"sv) {
|
||||
adapter.set_ipv4_address({ 127, 0, 0, 1 });
|
||||
adapter.set_ipv4_netmask({ 255, 0, 0, 0 });
|
||||
adapter.set_ipv4_gateway({ 0, 0, 0, 0 });
|
||||
}
|
||||
|
||||
adapter.on_receive = [&]() {
|
||||
|
|
Loading…
Reference in a new issue