ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: Re: [Ethereal-dev] capture_if_dlg.c has weird #if directive + proto_tree_add_ite

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: metatech <metatech@xxxxxxxxxxxxx>
Date: Sun, 29 Aug 2004 12:41:15 +0200

[For another reason I had to define explicitly WIN32 in pcap.h so that it compiles,

"It" meaning WinPcap, or "it" meaning Ethereal?

"It" meaning Ethereal.

so might be the reason why I am the only one to see this compilation error.]

You probably just did "#define WIN32", rather than "#define WIN32 1", which is how it's defined in config.h.win32.

You're right. I defined WIN32 to 1 and I got rid of all those warnings. Thanks !

I have another remark:
I noticed that if I call proto_tree_add_item() with a length parameter = 0, Ethereal crashes on win32.
Wouldn't it be more factorised/safer to check for "length > 0" in proto.c ?

See you,

metatech