-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文件。 –