serenity/Kernel/Net/LoopbackAdapter.cpp
Andreas Kling 27f699ef0c AK: Rename the common integer typedefs to make it obvious what they are.
These types can be picked up by including <AK/Types.h>:

* u8, u16, u32, u64 (unsigned)
* i8, i16, i32, i64 (signed)
2019-07-03 21:20:13 +02:00

25 lines
501 B
C++

#include <Kernel/Net/LoopbackAdapter.h>
LoopbackAdapter& LoopbackAdapter::the()
{
static LoopbackAdapter* the;
if (!the)
the = new LoopbackAdapter;
return *the;
}
LoopbackAdapter::LoopbackAdapter()
{
set_interface_name("loop");
set_ipv4_address({ 127, 0, 0, 1 });
}
LoopbackAdapter::~LoopbackAdapter()
{
}
void LoopbackAdapter::send_raw(const u8* data, int size)
{
dbgprintf("LoopbackAdapter: Sending %d byte(s) to myself.\n", size);
did_receive(data, size);
}