2021-02-11 19:26:44 +00:00
|
|
|
#ifndef LOGENTRYBLOCKEDIP_H
|
|
|
|
#define LOGENTRYBLOCKEDIP_H
|
|
|
|
|
2022-05-23 08:57:31 +00:00
|
|
|
#include <common/common_types.h>
|
|
|
|
|
2021-02-11 19:26:44 +00:00
|
|
|
#include "logentryblocked.h"
|
|
|
|
|
|
|
|
class LogEntryBlockedIp : public LogEntryBlocked
|
|
|
|
{
|
|
|
|
public:
|
2022-05-23 08:57:31 +00:00
|
|
|
explicit LogEntryBlockedIp();
|
2021-02-11 19:26:44 +00:00
|
|
|
|
2022-01-08 12:30:59 +00:00
|
|
|
FortLogType type() const override { return FORT_LOG_TYPE_BLOCKED_IP; }
|
2021-02-11 19:26:44 +00:00
|
|
|
|
2022-05-23 08:57:31 +00:00
|
|
|
bool isIPv6() const { return m_isIPv6; }
|
|
|
|
void setIsIPv6(bool isIPv6);
|
|
|
|
|
2021-02-13 05:37:33 +00:00
|
|
|
bool inbound() const { return m_inbound; }
|
|
|
|
void setInbound(bool inbound);
|
|
|
|
|
2022-02-20 09:17:00 +00:00
|
|
|
bool inherited() const { return m_inherited; }
|
|
|
|
void setInherited(bool inherited);
|
|
|
|
|
2021-02-11 19:26:44 +00:00
|
|
|
quint8 blockReason() const { return m_blockReason; }
|
|
|
|
void setBlockReason(quint8 blockReason);
|
|
|
|
|
2021-02-13 05:37:33 +00:00
|
|
|
quint8 ipProto() const { return m_ipProto; }
|
|
|
|
void setIpProto(quint8 proto);
|
2021-02-11 19:26:44 +00:00
|
|
|
|
|
|
|
quint16 localPort() const { return m_localPort; }
|
|
|
|
void setLocalPort(quint16 port);
|
|
|
|
|
|
|
|
quint16 remotePort() const { return m_remotePort; }
|
|
|
|
void setRemotePort(quint16 port);
|
|
|
|
|
2023-03-04 17:21:04 +00:00
|
|
|
qint64 connTime() const { return m_connTime; }
|
|
|
|
void setConnTime(qint64 connTime);
|
|
|
|
|
2022-05-23 08:57:31 +00:00
|
|
|
const ip_addr_t &localIp() const { return m_localIp; }
|
|
|
|
ip_addr_t &localIp() { return m_localIp; }
|
|
|
|
void setLocalIp(ip_addr_t &ip);
|
|
|
|
|
|
|
|
quint32 localIp4() const { return m_localIp.v4; }
|
|
|
|
void setLocalIp4(quint32 ip);
|
|
|
|
|
|
|
|
QByteArray localIp6() const;
|
|
|
|
void setLocalIp6(const QByteArray &ip);
|
|
|
|
|
|
|
|
const ip_addr_t &remoteIp() const { return m_remoteIp; }
|
|
|
|
ip_addr_t &remoteIp() { return m_remoteIp; }
|
|
|
|
void setRemoteIp(ip_addr_t &ip);
|
|
|
|
|
|
|
|
quint32 remoteIp4() const { return m_remoteIp.v4; }
|
|
|
|
void setRemoteIp4(quint32 ip);
|
2021-02-11 19:26:44 +00:00
|
|
|
|
2022-05-23 08:57:31 +00:00
|
|
|
QByteArray remoteIp6() const;
|
|
|
|
void setRemoteIp6(const QByteArray &ip);
|
2021-02-11 19:26:44 +00:00
|
|
|
|
2023-04-23 15:23:17 +00:00
|
|
|
bool isAskPending() const;
|
|
|
|
|
2021-02-11 19:26:44 +00:00
|
|
|
private:
|
2023-12-16 07:04:53 +00:00
|
|
|
bool m_isIPv6 : 1 = false;
|
|
|
|
bool m_inbound : 1 = false;
|
|
|
|
bool m_inherited : 1 = false;
|
2021-02-11 19:26:44 +00:00
|
|
|
quint8 m_blockReason = 0;
|
2021-02-13 05:37:33 +00:00
|
|
|
quint8 m_ipProto = 0;
|
2021-02-11 19:26:44 +00:00
|
|
|
quint16 m_localPort = 0;
|
|
|
|
quint16 m_remotePort = 0;
|
2023-03-04 17:21:04 +00:00
|
|
|
qint64 m_connTime = 0;
|
2022-05-23 08:57:31 +00:00
|
|
|
ip_addr_t m_localIp;
|
|
|
|
ip_addr_t m_remoteIp;
|
2021-02-11 19:26:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LOGENTRYBLOCKEDIP_H
|