48 lines
966 B
C++
48 lines
966 B
C++
#ifndef INCLUDE_DINETRPCLLSNIFFER_H_
|
|
#define INCLUDE_DINETRPCLLSNIFFER_H_
|
|
|
|
#include <tins/tins.h>
|
|
#include "tins/tcp_ip/stream_follower.h"
|
|
|
|
#include <di/rpc/Reader.h>
|
|
#include <di/Application.h>
|
|
#include <server/ProtocolFacade.h>
|
|
|
|
#include <map>
|
|
|
|
class DinetrpcllSniffer : public Di::Application {
|
|
public:
|
|
void loadDefaultConfig(void);
|
|
|
|
/** Configure DinetrpcllSniffer instance */
|
|
int init(void);
|
|
|
|
/**
|
|
* get the application name
|
|
* @return string with application name
|
|
*/
|
|
std::string getApplicationName(void);
|
|
/**
|
|
* get the application version
|
|
* @return string with application version
|
|
*/
|
|
std::string getApplicationVersion(void);
|
|
|
|
/**
|
|
* Run the proxy instance
|
|
*/
|
|
int run(void);
|
|
|
|
/** Control running state of proxy */
|
|
void stop(void);
|
|
|
|
private:
|
|
ProtocolFacade __protoFacade;
|
|
std::map<uint16_t, std::shared_ptr<Di::Buffer>> __buffers;
|
|
|
|
bool __handler(const Tins::Packet& pkt);
|
|
uint64_t pack;
|
|
};
|
|
|
|
#endif // INCLUDE_DINETRPCLLSNIFFER_H_
|