00001 00007 #ifndef CLI_H_ 00008 #define CLI_H_ 00009 #include "Configuration.h" 00010 #include "NetSniff.h" 00011 00012 using namespace network; 00013 00024 class Cli 00025 { 00026 public: 00032 Cli(Configuration cfg, NetSniff *netsnf); 00034 virtual ~Cli(); 00036 void MainLoop (); 00041 bool SetDebugger(Debug *debugger); 00042 00043 private: 00045 string prompt; 00047 string hcmdpath; 00053 void ProcessCommand(string cmd, string args); 00058 void DisplayHelp(string args); 00063 void DebugCmd(string args); 00068 void VerbosityCmd(string args); 00073 void SnifferCmd(string args); 00075 NetSniff *netsnf; 00077 Configuration *conf; 00079 Debug *dbg; 00089 void SplitStr(string str, string *keyword, string *args); 00090 }; 00091 00092 #endif /*CLI_H_*/