8 #define LOG_MODULE UndefinedLogModule 144 void setErrorString(
char* errString,
int len) { m_ErrorString = errString; m_ErrorStringLen = len; }
180 int m_ErrorStringLen;
181 bool m_SuppressErrors;
186 #define LOG_DEBUG(format, ...) do { \ 187 if(pcpp::LoggerPP::getInstance().isDebugEnabled(LOG_MODULE)) { \ 188 printf("[%-35s: %-25s: line:%-4d] " format "\n", __FILE__, __FUNCTION__, __LINE__, ## __VA_ARGS__); \ 192 #define LOG_ERROR(format, ...) do { \ 193 if (!pcpp::LoggerPP::getInstance().isSuppressErrors()) {\ 194 if(pcpp::LoggerPP::getInstance().isErrorStringSet()) \ 195 snprintf(pcpp::LoggerPP::getInstance().getErrorString(), pcpp::LoggerPP::getInstance().getErrorStringLength(), format, ## __VA_ARGS__); \ 197 fprintf(stderr, format "\n", ## __VA_ARGS__); \ 201 #define IS_DEBUG pcpp::LoggerPP::getInstance().isDebugEnabled(LOG_MODULE) The main namespace for the PcapPlusPlus lib.
IcmpLayer module (Packet++)
Definition: Logger.h:44
bool isSuppressErrors() const
Definition: Logger.h:166
PfRingDevice module (Pcap++)
Definition: Logger.h:63
static LoggerPP & getInstance()
Definition: Logger.h:173
LogModule
Definition: Logger.h:23
SdpLayer module (Packet++)
Definition: Logger.h:51
SllLayer module (Packet++)
Definition: Logger.h:47
Packet module (Packet++)
Definition: Logger.h:30
RadiusLayer module (Packet++)
Definition: Logger.h:52
MBufRawPacket module (Pcap++)
Definition: Logger.h:64
const LogLevel * getLogModulesArr() const
Definition: Logger.h:124
PayloadLayer module (Packet++)
Definition: Logger.h:36
void enableErrors()
Definition: Logger.h:160
VlanLayer module (Packet++)
Definition: Logger.h:39
IP Utils module (Common++)
Definition: Logger.h:26
void setLogLevel(LogModule module, LogLevel level)
Definition: Logger.h:102
IPReassembly module (Packet++)
Definition: Logger.h:57
LogLevel
Definition: Logger.h:91
HttpLayer module (Packet++)
Definition: Logger.h:40
bool isErrorStringSet() const
Definition: Logger.h:130
SipLayer module (Packet++)
Definition: Logger.h:50
void setErrorString(char *errString, int len)
Definition: Logger.h:144
IgmpLayer module (Packet++)
Definition: Logger.h:49
void suppressErrors()
Definition: Logger.h:155
Debug log level.
Definition: Logger.h:94
DnsLayer module (Packet++)
Definition: Logger.h:42
RawPacket module (Packet++)
Definition: Logger.h:29
SSHLayer module (Packet++)
Definition: Logger.h:55
PcapLiveDevice module (Pcap++)
Definition: Logger.h:61
IPSecLayers module (Packet++)
Definition: Logger.h:58
GtpLayer module (Packet++)
Definition: Logger.h:53
DpdkDevice module (Pcap++)
Definition: Logger.h:65
Normal log level.
Definition: Logger.h:93
MplsLayer module (Packet++)
Definition: Logger.h:43
IPv4Layer module (Packet++)
Definition: Logger.h:34
FileDevice module (Pcap++)
Definition: Logger.h:62
Generic Utils (Common++)
Definition: Logger.h:28
bool isDebugEnabled(LogModule module) const
Definition: Logger.h:115
NetworkUtils module (Pcap++)
Definition: Logger.h:67
SSLLayer module (Packet++)
Definition: Logger.h:46
TcpLayer module (Packet++)
Definition: Logger.h:37
KniDevice module (Pcap++)
Definition: Logger.h:66
GreLayer module (Packet++)
Definition: Logger.h:45
WinPcapLiveDevice module (Pcap++)
Definition: Logger.h:59
WinPcapRemoteDevice module (Pcap++)
Definition: Logger.h:60
void setAllModlesToLogLevel(LogLevel level)
Definition: Logger.h:108
TcpReassembly module (Packet++)
Definition: Logger.h:56
Layer module (Packet++)
Definition: Logger.h:31
ArpLayer module (Packet++)
Definition: Logger.h:32
int getErrorStringLength() const
Definition: Logger.h:150
EthLayer module (Packet++)
Definition: Logger.h:33
UdpLayer module (Packet++)
Definition: Logger.h:38
GtpLayer module (Packet++)
Definition: Logger.h:54
PPPoELayer module (Packet++)
Definition: Logger.h:41
DhcpLayer module (Packet++)
Definition: Logger.h:48
IPv6Layer module (Packet++)
Definition: Logger.h:35
char * getErrorString() const
Definition: Logger.h:136
Table printer module (Common++)
Definition: Logger.h:27