aboutsummaryrefslogtreecommitdiffstats
path: root/fnet/src/vespa/fnet/dummypacket.cpp
blob: 0e507a7a6b5d061cd7101d3cf9899a55239ec5e9 (plain) (blame)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "dummypacket.h"
#include "context.h"
#include <vespa/vespalib/util/stringfmt.h>

#include <vespa/log/log.h>
LOG_SETUP(".fnet.controlpacket");

FNET_DummyPacket::FNET_DummyPacket()
{
}

bool
FNET_DummyPacket::IsRegularPacket()
{
    return false;
}

bool
FNET_DummyPacket::IsControlPacket()
{
    return false;
}

uint32_t
FNET_DummyPacket::GetPCODE()
{
    return FNET_NOID;
}

uint32_t
FNET_DummyPacket::GetLength()
{
    return 0;
}

void
FNET_DummyPacket::Encode(FNET_DataBuffer *)
{
    LOG_ABORT("should not be reached");
}

bool
FNET_DummyPacket::Decode(FNET_DataBuffer *, uint32_t)
{
    LOG_ABORT("should not be reached");
}

vespalib::string
FNET_DummyPacket::Print(uint32_t indent)
{
    return vespalib::make_string("%*sFNET_DummyPacket {}\n", indent, "");
}