diff --git a/cpp/devices/ctapdriver.cpp b/cpp/devices/ctapdriver.cpp index 827a0202e1..450f439dda 100644 --- a/cpp/devices/ctapdriver.cpp +++ b/cpp/devices/ctapdriver.cpp @@ -369,7 +369,7 @@ bool CTapDriver::Disable() const return result; } -void CTapDriver::Flush() +void CTapDriver::Flush() const { LOGTRACE("%s", __PRETTY_FUNCTION__) while (PendingPackets()) { @@ -421,7 +421,7 @@ uint32_t CTapDriver::Crc32(span data) { return ~crc; } -int CTapDriver::Receive(uint8_t *buf) +int CTapDriver::Receive(uint8_t *buf) const { assert(m_hTAP != -1); @@ -459,7 +459,7 @@ int CTapDriver::Receive(uint8_t *buf) return dwReceived; } -int CTapDriver::Send(const uint8_t *buf, int len) +int CTapDriver::Send(const uint8_t *buf, int len) const { assert(m_hTAP != -1); diff --git a/cpp/devices/ctapdriver.h b/cpp/devices/ctapdriver.h index 1c37293be1..b844507d76 100644 --- a/cpp/devices/ctapdriver.h +++ b/cpp/devices/ctapdriver.h @@ -11,7 +11,6 @@ #pragma once -#include #include #include #include @@ -32,14 +31,13 @@ class CTapDriver CTapDriver& operator=(const CTapDriver&) = default; bool Init(const unordered_map&); - void OpenDump(const string& path); // Capture packets - void GetMacAddr(uint8_t *mac) const; - int Receive(uint8_t *buf); - int Send(const uint8_t *buf, int len); + void GetMacAddr(uint8_t *) const; + int Receive(uint8_t *) const; + int Send(const uint8_t *, int) const; bool PendingPackets() const; // Check if there are IP packets available bool Enable() const; // Enable the piscsi0 interface bool Disable() const; // Disable the piscsi0 interface - void Flush(); // Purge all of the packets that are waiting to be processed + void Flush() const; // Purge all of the packets that are waiting to be processed static uint32_t Crc32(span);