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] New dissector question

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

From: Guy Harris <guy@xxxxxxxxxx>
Date: Tue, 7 Dec 1999 16:13:57 -0800 (PST)
> You'll want to convert your uses of ntohs(x) to pntohs(&x).

...or, in this case, convert it to do

    	end_of_frame =  pntohs (data + 4) + 8;

However, the checks for "fd" aren't necessary ("fd" is always non-NULL),
so perhaps it could just be

	end_of_frame = END_OF_FRAME;

In addition, there's a C++-style comment in one line:

	//          data = dataend;

Some C compilers don't like C++-style comments, so that should be

	/*          data = dataend; */