ladybird/Kernel/Net
Liav A 64aaf263a2 Kernel/Net: Generate interface name near construction point
This change allows the Kernel to actually construct other interfaces
besides the E1000 type.
This solves a breakage that was introduced recently because of move
semantics.

A couple of points on this patch:
1. In current situation, we can waste time to create a KString and throw
it for nothing. This patch ensures we only create it near construction
point so we know we actually need it.
2. It's very likely to assume that non-x86 machines will expose network
device with a device tree (or with ACPI). The raspberry pi machine is a
good example of that. Therefore, each driver should explicitly ask the
correct interface name generation method, and this patch simplifies this
pattern greatly, especially in a case where the same network device can
appear as a PCI device or as device in another bus type on the same
platform target. For example, the (in)famous ne2000 device can be used
either as a PCI device or as an ISA device, depending on the model.
3. In my opinion, it seems much more readable to construct the name near
calling point of the object constructor than to just pass it with move
semantics.
2021-10-18 12:25:56 -07:00
..
ARP.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
E1000ENetworkAdapter.cpp Kernel/Net: Generate interface name near construction point 2021-10-18 12:25:56 -07:00
E1000ENetworkAdapter.h Kernel/Net: Generate interface name near construction point 2021-10-18 12:25:56 -07:00
E1000NetworkAdapter.cpp Kernel/Net: Generate interface name near construction point 2021-10-18 12:25:56 -07:00
E1000NetworkAdapter.h Kernel/Net: Generate interface name near construction point 2021-10-18 12:25:56 -07:00
EthernetFrameHeader.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
EtherType.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ICMP.h Kernel: Switch static_asserts of a type size to AK::AssertSize 2021-09-05 20:08:57 +02:00
IPv4.h Kernel: Switch static_asserts of a type size to AK::AssertSize 2021-09-05 20:08:57 +02:00
IPv4Socket.cpp Kernel: Drop the receive buffer when socket enters the TimeWait state 2021-09-16 16:50:23 +02:00
IPv4Socket.h Kernel: Use operator ""sv in all class_name() implementations 2021-10-03 13:36:10 +02:00
IPv4SocketTuple.h Kernel: Make IPv4SocketTuple operator== by reference 2021-09-16 17:17:13 +02:00
LocalSocket.cpp Kernel: Fix -Wunreachable-code warnings from clang 2021-10-08 23:33:46 +02:00
LocalSocket.h Kernel: Use operator ""sv in all class_name() implementations 2021-10-03 13:36:10 +02:00
LoopbackAdapter.cpp Kernel: Convert network adapter names to Kernel::KString 2021-10-01 17:22:17 +00:00
LoopbackAdapter.h Kernel: Use operator ""sv in all class_name() implementations 2021-10-03 13:36:10 +02:00
NE2000NetworkAdapter.cpp Kernel/Net: Generate interface name near construction point 2021-10-18 12:25:56 -07:00
NE2000NetworkAdapter.h Kernel/Net: Generate interface name near construction point 2021-10-18 12:25:56 -07:00
NetworkAdapter.cpp Kernel: Convert network adapter names to Kernel::KString 2021-10-01 17:22:17 +00:00
NetworkAdapter.h Kernel: Convert network adapter names to Kernel::KString 2021-10-01 17:22:17 +00:00
NetworkingManagement.cpp Kernel/Net: Generate interface name near construction point 2021-10-18 12:25:56 -07:00
NetworkingManagement.h Kernel/Net: Generate interface name near construction point 2021-10-18 12:25:56 -07:00
NetworkTask.cpp Kernel: Fix -Wunreachable-code warnings from clang 2021-10-08 23:33:46 +02:00
NetworkTask.h Kernel: Avoid deadlock when trying to send packets from the NetworkTask 2021-04-30 23:11:56 +02:00
Routing.cpp Kernel: Improve names in the ARP table thread blocker 2021-09-05 01:10:56 +02:00
Routing.h Kernel: Convert Routing to east-const style 2021-09-03 23:18:50 +02:00
RTL8139NetworkAdapter.cpp Kernel/Net: Generate interface name near construction point 2021-10-18 12:25:56 -07:00
RTL8139NetworkAdapter.h Kernel/Net: Generate interface name near construction point 2021-10-18 12:25:56 -07:00
RTL8168NetworkAdapter.cpp Kernel/Net: Generate interface name near construction point 2021-10-18 12:25:56 -07:00
RTL8168NetworkAdapter.h Kernel/Net: Generate interface name near construction point 2021-10-18 12:25:56 -07:00
Socket.cpp Kernel: Convert network adapter names to Kernel::KString 2021-10-01 17:22:17 +00:00
Socket.h Kernel: Use operator ""sv in all class_name() implementations 2021-10-03 13:36:10 +02:00
TCP.h Kernel: Switch static_asserts of a type size to AK::AssertSize 2021-09-05 20:08:57 +02:00
TCPSocket.cpp Kernel: Drop the receive buffer when socket enters the TimeWait state 2021-09-16 16:50:23 +02:00
TCPSocket.h Kernel: Use operator ""sv in all class_name() implementations 2021-10-03 13:36:10 +02:00
UDP.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
UDPSocket.cpp Kernel/Net: Add a special SOCKET_TRY() and use it in socket code 2021-09-07 15:05:51 +02:00
UDPSocket.h Kernel: Use operator ""sv in all class_name() implementations 2021-10-03 13:36:10 +02:00