Wireshark mailing list archives

header alignment fix for wiretap/nettl.c


From: Kenichi Okuyama <kenichi.okuyama () gmail com>
Date: Thu, 22 Sep 2011 01:57:21 +0900

Dear list,

I was wondering around with the reason why my customer's TRC0 file
captured by HPUX 10.20 can not be analyzed using Wireshark 1.6.2.

I think I found a way to make it work, but I really don't know if this
works for other versions of HPUX.
So, I'd like to disclose it here asking for someone to test if this
works for TRC0 files captured by other than HPUX 10.20.
# diff files are attached. This patch work for both 1.6.2 and trunc.


In short, in old magic number ( HPUX till 9 ) header is aligned to 2
bytes. On other hand, in new magic number, header is aligned to 4
bytes.
That seems to be the reason why we need extra 2 bytes for padding
(probably). The reason why old code didn't work, was because it
assumed that extra 2 bytes were necessary only for HPUX 11. But it was
really for all the TRC0 files with new header....

I really don't know if my guess is correct, but at least, it's working
on my data so far...
Hope this will be a hint for someone who concur this problem.

best regards,
-- 
Kenichi Okuyama
URL: http://www.dd.iij4u.or.jp/~okuyamak/

Attachment: nettl.diff
Description:

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: