7#ifndef DHCPSRV_PACKET_FUZZER_H
8#define DHCPSRV_PACKET_FUZZER_H
17#include <sys/socket.h>
48 static constexpr size_t BUFFER_SIZE = 256 * 1024;
55 static constexpr size_t MAX_SEND_SIZE = 64000;
63 static constexpr long MAX_LOOP_COUNT = 1000;
72 PacketFuzzer(uint16_t
const port,
73 std::string
const interface,
74 std::string
const address);
87 void transfer()
const;
88 void transfer(uint8_t
const* data,
size_t size)
const;
98 long maxLoopCount()
const {
114 void createAddressStructures(uint16_t
const port,
115 std::string
const& interface,
120 size_t sockaddr_len_;
121 struct sockaddr* sockaddr_ptr_;
122 struct sockaddr_in servaddr4_;
123 struct sockaddr_in6 servaddr6_;
128class FuzzInitFail :
public Exception {
130 FuzzInitFail(
const char* file,
size_t line,
const char* what) :
131 isc::Exception(file, line, what) { }
The IOAddress class represents an IP addresses (version agnostic)
Defines the logger used by the top-level component of kea-lfc.