mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-25 19:02:07 -05:00
27f699ef0c
These types can be picked up by including <AK/Types.h>: * u8, u16, u32, u64 (unsigned) * i8, i16, i32, i64 (signed)
25 lines
501 B
C++
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);
|
|
}
|