I already have the data of some protocol which ethereal supported.Such as the data of ISUP, of V5UA ,of ANSI-41D etc.. I want to constructed a capture file for those data so that ethereal can decode them . Now I am woking on constructing a capture file for my data. And I got big problems.
I have a part of ISUP data. I want to dissect it with Ethereal. I add a capture file header in front of the ISUP data and constructed a capture file for it. Then dissect it with Ethereal. When I add a capture file header to the ISUP data. I must modify "data link type field" to designate which one of the data (of ISUP ) belong to. In this example, I modified the "data link type" (guint32 network; /* data link type */)value to 0x8D(the ISUP file format already supports storing MTP2 or MTP3 directly).When I want to validate a different protocol every time, I need to check which protocol category the protocol belong to in Ethereal. So I can modify corresponding data link type field. But how to check which "data link type" a protocol belong to when loading a capture file header?
Thanks for help.
struct pcap_hdr {
guint16 version_major; /* major version number */
guint16 version_minor; /* minor version number */
gint32 thiszone; /* GMT to local correction */
guint32 sigfigs; /* accuracy of timestamps */
guint32 snaplen; /* max length of captured packets, in octets */
guint32 network; /* data link type */
};
Author Name: xian.zhang
Phone:+86-755-89650618
Mobil:
EMail:sxhover@xxxxxxxxxx
*****************************************************************
This e-mail and its attachments contain confidential information from HUAWEI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!
*****************************************************************