2017-08-25 16:04:46 +00:00
|
|
|
#ifndef FORTCOMMON_H
|
|
|
|
#define FORTCOMMON_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
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();
|
|
|
|
static quint32 logSize(quint32 pathLen);
|
|
|
|
static quint32 logHeaderSize();
|
|
|
|
|
|
|
|
static void logHeaderWrite(char *output,
|
|
|
|
quint32 remoteIp, quint32 pid,
|
|
|
|
quint32 pathLen);
|
|
|
|
static void logHeaderRead(const char *input,
|
|
|
|
quint32 *remoteIp, quint32 *pid,
|
|
|
|
quint32 *pathLen);
|
2017-08-29 08:40:23 +00:00
|
|
|
|
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,
|
|
|
|
const QString &dosPath, bool *notify = 0);
|
2017-09-03 09:20:37 +00:00
|
|
|
|
|
|
|
static uint provRegister(bool boot);
|
|
|
|
static void provUnregister();
|
2017-08-25 16:04:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // FORTCOMMON_H
|