-1
我想從pcap文件解析一些信息到我的項目。 我正在創建可以在SIP呼叫中發現錯誤的分析程序。我創建了可以保存這些信息的類(現在不是全部)。我使用Windows和Codeblocks C++,並安裝了windows的pcap庫。 實現此目的的最簡單方法是什麼?解析pcap文件以在C++中讀取消息
class Messege
{
private:
int number;
string cseq;
string method;
string callId;
string source;
string destination;
string request;
public:
//set
void setCseq (string newCseq){cseq=newCseq;};
void setNumber (int newNumber){number=newNumber;};
void setMethod (string newMethod){method=newMethod;};
void setSource (string newSource){source=newSource;};
void setDestination (string newDestination){destination = newDestination;};
void setCallId (string newCallId){callId = newCallId;};
void setRequest (string newRequest){request = newRequest;};
//get
int getNumber(){return number;};
string getCseq(){return cseq;};
string getMethod(){return method;};
string getSource(){return source;};
string getDestination() {return destination;};
string getCallId(){return callId;};
string getRequest(){return request;};
};
我已投票結束爲「太寬泛」。或者,您可能會要求提供一個工具的建議 - 這將是「脫離主題」。 *您需要決定如何解析pcap文件。 –