b28bcd3055
- OstProto service has a new method "modifyPort()" - At port init port.isExclusive is now set using a bindconfig query (Win32 only) - AbstractPort interface has 2 new pure virtual methods - hasExclusiveControl() and setExclusiveControl() - PcapPort does not support this functionality (yet) so these methods return false - WinPcapPort suppots this new functionality using bindconfig - Port's notes (specifying Rx/Tx limitations) are now set and updated based on hasExclusiveControl() - Presence of 'notes' on a port is indicated using a '*' after the port name in the port stats window - The tabwidget has been removed from Port Window | Stream View Pane - Ostinato Client has a new action in the port window's context menu for the same - Port Icon in the Port Window is decorated based on exclusive control
88 lines
3.5 KiB
C++
88 lines
3.5 KiB
C++
#ifndef _MY_SERVICE_H
|
|
#define _MY_SERVICE_H
|
|
|
|
#include <QList>
|
|
|
|
#include "../common/protocol.pb.h"
|
|
|
|
#define MAX_PKT_HDR_SIZE 1536
|
|
#define MAX_STREAM_NAME_SIZE 64
|
|
|
|
class AbstractPort;
|
|
|
|
class MyService: public OstProto::OstService
|
|
{
|
|
public:
|
|
MyService();
|
|
virtual ~MyService();
|
|
|
|
/* Methods provided by the service */
|
|
virtual void getPortIdList(::google::protobuf::RpcController* controller,
|
|
const ::OstProto::Void* request,
|
|
::OstProto::PortIdList* response,
|
|
::google::protobuf::Closure* done);
|
|
virtual void getPortConfig(::google::protobuf::RpcController* controller,
|
|
const ::OstProto::PortIdList* request,
|
|
::OstProto::PortConfigList* response,
|
|
::google::protobuf::Closure* done);
|
|
void MyService::modifyPort(::google::protobuf::RpcController* /*controller*/,
|
|
const ::OstProto::PortConfigList* request,
|
|
::OstProto::Ack* response,
|
|
::google::protobuf::Closure* done);
|
|
virtual void getStreamIdList(::google::protobuf::RpcController* controller,
|
|
const ::OstProto::PortId* request,
|
|
::OstProto::StreamIdList* response,
|
|
::google::protobuf::Closure* done);
|
|
virtual void getStreamConfig(::google::protobuf::RpcController* controller,
|
|
const ::OstProto::StreamIdList* request,
|
|
::OstProto::StreamConfigList* response,
|
|
::google::protobuf::Closure* done);
|
|
virtual void addStream(::google::protobuf::RpcController* controller,
|
|
const ::OstProto::StreamIdList* request,
|
|
::OstProto::Ack* response,
|
|
::google::protobuf::Closure* done);
|
|
virtual void deleteStream(::google::protobuf::RpcController* controller,
|
|
const ::OstProto::StreamIdList* request,
|
|
::OstProto::Ack* response,
|
|
::google::protobuf::Closure* done);
|
|
virtual void modifyStream(::google::protobuf::RpcController* controller,
|
|
const ::OstProto::StreamConfigList* request,
|
|
::OstProto::Ack* response,
|
|
::google::protobuf::Closure* done);
|
|
virtual void startTx(::google::protobuf::RpcController* controller,
|
|
const ::OstProto::PortIdList* request,
|
|
::OstProto::Ack* response,
|
|
::google::protobuf::Closure* done);
|
|
virtual void stopTx(::google::protobuf::RpcController* controller,
|
|
const ::OstProto::PortIdList* request,
|
|
::OstProto::Ack* response,
|
|
::google::protobuf::Closure* done);
|
|
virtual void startCapture(::google::protobuf::RpcController* controller,
|
|
const ::OstProto::PortIdList* request,
|
|
::OstProto::Ack* response,
|
|
::google::protobuf::Closure* done);
|
|
virtual void stopCapture(::google::protobuf::RpcController* controller,
|
|
const ::OstProto::PortIdList* request,
|
|
::OstProto::Ack* response,
|
|
::google::protobuf::Closure* done);
|
|
virtual void getCaptureBuffer(::google::protobuf::RpcController* controller,
|
|
const ::OstProto::PortId* request,
|
|
::OstProto::CaptureBuffer* response,
|
|
::google::protobuf::Closure* done);
|
|
virtual void getStats(::google::protobuf::RpcController* controller,
|
|
const ::OstProto::PortIdList* request,
|
|
::OstProto::PortStatsList* response,
|
|
::google::protobuf::Closure* done);
|
|
virtual void clearStats(::google::protobuf::RpcController* controller,
|
|
const ::OstProto::PortIdList* request,
|
|
::OstProto::Ack* response,
|
|
::google::protobuf::Closure* done);
|
|
|
|
private:
|
|
/*! AbstractPort::id() and index into portInfo[] are same! */
|
|
QList<AbstractPort*> portInfo;
|
|
|
|
};
|
|
|
|
#endif
|