You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
687 B
31 lines
687 B
// Copyright (c) 2014, Brad Parker
|
|
// This file is licensed under the BSD 2-clause license.
|
|
|
|
#ifndef QIPROUTE_INTERFACE_H
|
|
#define QIPROUTE_INTERFACE_H
|
|
|
|
#include <QObject>
|
|
#include "qiproute_global.h"
|
|
|
|
class QIPROUTE_EXPORT Interface : public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
Interface(QString interface);
|
|
~Interface();
|
|
static QStringList list();
|
|
QStringList addresses() const;
|
|
bool hasCarrier(bool *ok = 0);
|
|
bool hasAdminLink(bool *ok = 0);
|
|
int setLinkUp();
|
|
int setLinkDown();
|
|
int addAddress(QString address) const;
|
|
int deleteAddress(QString address) const;
|
|
const QString& name() const;
|
|
|
|
private:
|
|
QString m_interface;
|
|
int m_index;
|
|
};
|
|
|
|
#endif // QIPROUTE_INTERFACE_H
|
|
|