2020-12-03 23:27:56 +03:00
|
|
|
#ifndef ROUTER_H
|
|
|
|
|
#define ROUTER_H
|
|
|
|
|
|
|
|
|
|
#include <QTimer>
|
|
|
|
|
#include <QString>
|
|
|
|
|
#include <QSettings>
|
|
|
|
|
#include <QHash>
|
|
|
|
|
#include <QDebug>
|
2021-02-21 09:44:53 -08:00
|
|
|
#include <QObject>
|
2020-12-03 23:27:56 +03:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief The Router class - General class for handling ip routing
|
|
|
|
|
*/
|
|
|
|
|
class Router : public QObject
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
2021-02-21 09:44:53 -08:00
|
|
|
static bool routeAdd(const QString &ip, const QString &gw, QString mask = QString());
|
|
|
|
|
static int routeAddList(const QString &gw, const QStringList &ips);
|
|
|
|
|
static bool clearSavedRoutes();
|
|
|
|
|
static bool routeDelete(const QString &ip);
|
|
|
|
|
static void flushDns();
|
2020-12-03 23:27:56 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // ROUTER_H
|
2021-02-21 09:44:53 -08:00
|
|
|
|