2009-12-26 11:33:27 -06:00
|
|
|
#ifndef _SERVER_WIN_PCAP_PORT_H
|
|
|
|
#define _SERVER_WIN_PCAP_PORT_H
|
|
|
|
|
2010-01-02 08:50:19 -06:00
|
|
|
#include <QtGlobal>
|
|
|
|
|
2010-01-02 07:49:54 -06:00
|
|
|
#ifdef Q_OS_WIN32
|
|
|
|
|
2009-12-26 11:33:27 -06:00
|
|
|
#include "pcapport.h"
|
|
|
|
|
|
|
|
#include <packet32.h>
|
|
|
|
|
|
|
|
class WinPcapPort : public PcapPort
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
WinPcapPort(int id, const char *device);
|
|
|
|
~WinPcapPort();
|
|
|
|
|
|
|
|
virtual OstProto::LinkState linkState();
|
2010-02-09 09:21:52 -06:00
|
|
|
virtual bool hasExclusiveControl();
|
|
|
|
virtual bool setExclusiveControl(bool exclusive);
|
2009-12-26 11:33:27 -06:00
|
|
|
|
|
|
|
protected:
|
|
|
|
class PortMonitor: public PcapPort::PortMonitor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PortMonitor(const char *device, Direction direction,
|
|
|
|
AbstractPort::PortStats *stats);
|
|
|
|
void run();
|
|
|
|
};
|
|
|
|
private:
|
|
|
|
LPADAPTER adapter_;
|
|
|
|
PPACKET_OID_DATA linkStateOid_ ;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2010-01-02 07:49:54 -06:00
|
|
|
|
|
|
|
#endif
|