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
// File created from ../../../src/lib/dhcpsrv/fuzz_messages.mes

#include <cstddef><--- Include file:  not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <log/message_types.h>
#include <log/message_initializer.h>

namespace isc {
namespace dhcp {

extern const isc::log::MessageID FUZZ_DATA_READ = "FUZZ_DATA_READ";
extern const isc::log::MessageID FUZZ_INIT_COMPLETE = "FUZZ_INIT_COMPLETE";
extern const isc::log::MessageID FUZZ_INIT_FAIL = "FUZZ_INIT_FAIL";
extern const isc::log::MessageID FUZZ_READ_FAIL = "FUZZ_READ_FAIL";
extern const isc::log::MessageID FUZZ_SEND = "FUZZ_SEND";
extern const isc::log::MessageID FUZZ_SEND_ERROR = "FUZZ_SEND_ERROR";
extern const isc::log::MessageID FUZZ_SHORT_SEND = "FUZZ_SHORT_SEND";
extern const isc::log::MessageID FUZZ_SOCKET_CREATE_FAIL = "FUZZ_SOCKET_CREATE_FAIL";

} // namespace dhcp
} // namespace isc

namespace {

const char* values[] = {
    "FUZZ_DATA_READ", "read %1 byte(s) from AFL via stdin",
    "FUZZ_INIT_COMPLETE", "fuzz initialization complete: interface %1, address %2, port %3, max loops %4",
    "FUZZ_INIT_FAIL", "fuzz initialization failure, reason: %1",
    "FUZZ_READ_FAIL", "error reading input from fuzzer: %1",
    "FUZZ_SEND", "sent %1 byte(s) to the socket connected to the Kea interface",
    "FUZZ_SEND_ERROR", "failed to send data to Kea input socket: %1",
    "FUZZ_SHORT_SEND", "expected to send %1 bytes to Kea input socket but only sent %2",
    "FUZZ_SOCKET_CREATE_FAIL", "failed to crease socket for use by fuzzing thread: %1",
    NULL
};

const isc::log::MessageInitializer initializer(values);

} // Anonymous namespace