#ifdef __WIN_32 #include #endif #include #include "tracesPlayDll.h" // this is a way to catch data from library class myOutputData : public OutputDataStream { int myData; public: myOutputData(){ myData=0; } ~myOutputData(){} bool printData(int_32 *ptr, int lenght); void freeBuffor(); }; // here we catch data from "one" packet stored as array of int_32 bool myOutputData::printData(int_32 *ptr, int lenght){ /* if tab[i] == -1 or 0xffffffff it is empty cel */ printf("\n Packet number %i data:", myData ++); for (int i=0;ideactivateOutputToCSV(); tracesPlay->deactivateOutputToConsol(); tracesPlay->disablePrintBasicInfoToConsol(); tracesPlay->disablePrintError(); tracesPlay->activateOutputToMemory(); // set what type of filed we have to output char *filed[3]={ "PACKET.num", "IP.src"}; tracesPlay->setOutputProtocolFiled(2,&filed[0]); // give us all date even in somthing isnt full tracesPlay->activateAlwaysShareData(); // set output stream myOutputData *myOutputStream = new myOutputData(); tracesPlay->setOutputDataStream(myOutputStream); // analiz file tracesPlay->readFile("test.pcap",NULL); // analiz file with force format // tracesPlay->checkFormat("test.pcap","pcap"); delete myOutputStream; delete tracesPlay; }