fort/src/ui/fortcommon.h

58 lines
1.7 KiB
C
Raw Normal View History

2017-08-25 16:04:46 +00:00
#ifndef FORTCOMMON_H
#define FORTCOMMON_H
#include <QObject>
2017-11-01 13:49:11 +00:00
#include <QString>
2017-08-25 16:04:46 +00:00
class FortCommon : public QObject
{
Q_OBJECT
public:
explicit FortCommon(QObject *parent = nullptr);
static QString deviceName();
static quint32 ioctlSetConf();
static quint32 ioctlSetFlags();
static quint32 ioctlGetLog();
static quint32 bufferSize();
2017-11-01 13:49:11 +00:00
static quint32 logBlockedHeaderSize();
static quint32 logBlockedSize(quint32 pathLen);
2017-11-24 08:53:11 +00:00
static quint32 logProcNewHeaderSize();
static quint32 logProcNewSize(quint32 pathLen);
static quint32 logProcDelSize();
2017-11-07 12:15:58 +00:00
static quint32 logType(const char *input);
2017-11-01 13:49:11 +00:00
static void logBlockedHeaderWrite(char *output,
quint32 remoteIp, quint32 pid,
quint32 pathLen);
static void logBlockedHeaderRead(const char *input,
quint32 *remoteIp, quint32 *pid,
quint32 *pathLen);
2017-08-29 08:40:23 +00:00
2017-11-24 08:53:11 +00:00
static void logProcNewHeaderWrite(char *output,
quint32 pid, quint32 pathLen);
static void logProcNewHeaderRead(const char *input,
quint32 *pid, quint32 *pathLen);
static void logProcDelWrite(char *output, quint32 pid);
static void logProcDelRead(const char *input, quint32 *pid);
2017-08-30 08:34:37 +00:00
static void confAppPermsMaskInit(void *drvConf);
2017-08-29 08:40:23 +00:00
static bool confIpInRange(const void *drvConf, quint32 ip,
bool included = false);
static bool confAppBlocked(const void *drvConf,
2017-11-05 04:40:11 +00:00
const QString &kernelPath);
2017-09-03 09:20:37 +00:00
2017-10-27 10:59:09 +00:00
static uint provRegister(bool isBoot);
2017-09-03 09:20:37 +00:00
static void provUnregister();
2017-08-25 16:04:46 +00:00
};
#endif // FORTCOMMON_H