Hi, Iam in the process of developing my custom dissector on top of UDP(wireshark). I have a packet data spli in many packets and reassembled together when i get "end of message" key. I have 3 keys 1. beginning of message 2. continuation of message 3. end of message. I have to display the data (reassembled ) in a seperate TAB. (only when i get end of message key i have to do this) I have gone through the below code and could not understand
edited 10 Sep ‘14, 00:46 |
2 Answers:
Go into epan/reassemble.h and epan/reassemble.c. There you'll find all the details in which you can reassemble fragments in a way suitable for your protocol. answered 10 Sep '14, 04:12 Jaap ♦ |
To reassemble your packets you need some information such as the ID of your fragment, the offset of the current segment in the reassembled packet, if it's the last fragment or not, and more (It depend on your protocol). All these information are passed to the fragment_add_seq_check() to attempt a reassembly. You can also see exemple of reassemble interface in the epan/dissectors folder (packet-ipv6.c, packet-6lowpan.c, etc.) answered 22 Sep '14, 05:49 Afrim Hi Afrim , do i need to create ID on my own? because i have raw data which does not comes with ID . Can \you help me to explain step by step procedure. (define table, init table add data to reassemble data etc..) I tried to understand the existing code and could not understand.How to display the reassembled data in a separate tab ? below image for reference. I have 3 diff type of packet pdu 1. beginning of message 2. continuation of message 3, end of message each type contain data in it. for example beginning of message got 20 octets and continuation of message got 10 octets and end of message got 15 octets. I need to reassemble all these 45 octets of data in End of message sequence. Please suggest Thanks RAj (14 Oct '14, 01:58) umar (14 Oct '14, 02:39) umar 1 The ID is needed cause when you receive your packets in Wireshark they are not sorted by fragmentation order. For exemple you will not receive : But it will be something like : Then all what you need is to tell if there is more fragments(you have this information) to wait for this ID, if no the ressembly will occur. Ofc you have to tell the length of the fragment as the code of your first post says. (14 Oct '14, 03:04) Afrim Hi Afrim, Thanks for the reply . Got it, Thanks. for my protocol only one beginning of message and may be multiple continuation of message and 1 end of message. Now i have gone through many protocols to understand how to add the data into reassemble table. As iam new to this , could you help me to guide step by step procedure to add data to table and display in a separate tab like in the image. when it comes to end of message!
(27 Oct '14, 04:25) Afrim Hi Afrim, Thank you so much! This will be really helpful. I will Try this! Thanks Grahamb! (28 Oct '14, 20:33) umar Hi Afrim grahamb, Need your help.
In this parameter 6 i need to pass a function ALSIG PDU How it is possible? Those tvb i have reassemblesd had to be proceessed in ALSIG PDU function. Please suggest some idea, (29 Oct '14, 23:10) umar save_fragmented = pinfo->fragmented;
What is wrong my reassembly not happening? (30 Oct ‘14, 01:15) umar Hi, I have beginning of the message (in this pdu i have info about total msg length) continuation of the message end of message I have set a global variable to take the total length and substract it from pdu length of beginning of msg and continuation of message when it comes to end of message i have added the pdu data to the reassembled table and then used process_reassembled_data to process. But its not happening beginning of message and continuation of message shows correct for me. I dont know whether reassembled table got data added or not. please suggest! I have used
(30 Oct ‘14, 02:09) umar Hi, My comple re assembly code is below Please suggest what i have missed or issue
|
Hi Jaap , Thanks for your reply. my requirement is , i have n number of frames and i have three different data .. 1. beginning of message 2. continuation of message 3, end of message. when beginning of message i have to store the data and continuation of message data alo be included and when it comes to end of data i have to display it in a separate tab (reassembled data and process it). i have gone through reassemble.c and could not understand. can you help me on this.
my packet dissection is byte by byte...
Thanks