fort/src/ui/log/logentryblockedip.h

75 lines
2.0 KiB
C
Raw Normal View History

#ifndef LOGENTRYBLOCKEDIP_H
#define LOGENTRYBLOCKEDIP_H
2022-05-23 08:57:31 +00:00
#include <common/common_types.h>
#include "logentryblocked.h"
class LogEntryBlockedIp : public LogEntryBlocked
{
public:
2022-05-23 08:57:31 +00:00
explicit LogEntryBlockedIp();
2022-01-08 12:30:59 +00:00
FortLogType type() const override { return FORT_LOG_TYPE_BLOCKED_IP; }
2022-05-23 08:57:31 +00:00
bool isIPv6() const { return m_isIPv6; }
void setIsIPv6(bool isIPv6);
bool inbound() const { return m_inbound; }
void setInbound(bool inbound);
bool inherited() const { return m_inherited; }
void setInherited(bool inherited);
quint8 blockReason() const { return m_blockReason; }
void setBlockReason(quint8 blockReason);
quint8 ipProto() const { return m_ipProto; }
void setIpProto(quint8 proto);
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);
2022-05-23 08:57:31 +00:00
QByteArray remoteIp6() const;
void setRemoteIp6(const QByteArray &ip);
2023-04-23 15:23:17 +00:00
bool isAskPending() const;
private:
bool m_isIPv6 : 1 = false;
bool m_inbound : 1 = false;
bool m_inherited : 1 = false;
quint8 m_blockReason = 0;
quint8 m_ipProto = 0;
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;
};
#endif // LOGENTRYBLOCKEDIP_H