ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] Decoding an incoming message into an array

From: Sachin Kumar Verma <sachin.verma@xxxxxxxxxxx>
Date: Tue, 22 Jul 2008 12:11:21 +0530

Hi All,

Can anyone please provide me a sample code to dissect an incoming message into a structure that also contains an array? For e.g. if the target structure is:

 

struct sample_struct {

            int param1;

            int param2[10];

};

 

Then please suggest me the appropriate way to dissect an incoming packet into this structure and displaying its decoded tree properly. Would appreciate if you can also suggest me the way to take care of possible padding bytes that may be inserted by the sending entity.

 

Thanks a ton in advance.

 

T & R

Sachin Verma

Software Engineer



"DISCLAIMER: This message is proprietary to Aricent and is intended solely for the use of the individual to whom it is addressed. It may contain privileged or confidential information and should not be circulated or used for any purpose other than for what it is intended. If you have received this message in error,please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message. Aricent accepts no responsibility forloss or damage arising from the use of the information transmitted by this email including damage from virus."