summaryrefslogtreecommitdiff
path: root/Kernel/Net/LoopbackAdapter.cpp
blob: f304c7680bddfe7bf6e5b9b8f3bbc561bb6d2281 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#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_mtu(65536);
}

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);
}