#include "qgrexnetwork.h"

//#include "qgnetworkinterface.h"

QgRexNetwork::QgRexNetwork() //QObject* parent): QObject(parent)
{
}

QgRexNetwork::~QgRexNetwork()
{
}

#if 0
#include <QDebug>

//static QHostAddress rexHostAddress;
//static QHostAddress rexBroadcastAddress;

void QgRexNetwork::setNetworkInterface(const QHostAddress& adr)
{

   rexHostAddress=adr;   
   quint32 ip=adr.toIPv4Address();
   if (!adr.isLoopback())
    ip|=255;

   rexBroadcastAddress=QHostAddress(ip);
   qDebug()<<"RexNetwork Interface:"<<adr;
}

QHostAddress QgRexNetwork::networkInterface()
{
    return rexHostAddress;
}

QHostAddress QgRexNetwork::networkBroadcast()
{
    return rexBroadcastAddress;
}

QString QgRexNetwork::networkIP() const
{
    return rexHostAddress.toString();
}

void QgRexNetwork::setNetworkIP(const QString& str)
{
    rexHostAddress=QHostAddress(str);
}

unsigned int QgRexNetwork::networkMTU() const
{
    return 1536;
}
void QgRexNetwork::setNetworkMTU(unsigned int)
{
    return;
}
#endif
