diff --git a/include/PacketParser.h b/include/PacketParser.h new file mode 100644 --- /dev/null +++ b/include/PacketParser.h @@ -0,0 +1,46 @@ +/* + * $Id: PacketParser.h 2 2007-12-22 14:15:30Z mbroeker $ + * $URL: http://localhost/svn/cpp/qMonitor/trunk/include/PacketParser.h $ + */ + +#ifndef PACKET_PARSER +#define PACKET_PARSER + +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +#include +} + +class PacketParser : public PacketReader +{ + public: + PacketParser ( int tm=500 ); + PacketParser ( std::string ); + ~PacketParser (); + std::string read(); + std::string getPacket(); + void setPort(unsigned short); + void setProtocol(int); + std::string getProtocol(int); + + private: + std::string str; + int protocol; + unsigned short port; + + std::string shost; + std::string dhost; + unsigned short sport, dport; + struct protoent *proto; +}; + +#endif +