mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
![Andreas Kling](/assets/img/avatar_default.png)
Choosing adapter for transmit is done by adapter_for_route_to(IPv4Address). This is just hard-coded logic right now but can be expanded to support a proper routing table. Also start moving kernel networking code into Kernel/Net/.
17 lines
362 B
C++
17 lines
362 B
C++
#pragma once
|
|
|
|
#include <Kernel/NetworkAdapter.h>
|
|
|
|
class LoopbackAdapter final : public NetworkAdapter {
|
|
public:
|
|
static LoopbackAdapter& the();
|
|
|
|
virtual ~LoopbackAdapter() override;
|
|
|
|
virtual void send_raw(const byte*, int) override;
|
|
virtual const char* class_name() const override { return "LoopbackAdapter"; }
|
|
|
|
private:
|
|
LoopbackAdapter();
|
|
};
|