Ethereal-dev: Re: [ethereal-dev] Mismatch in "port" integer size

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: Wed, 5 Jan 2000 12:03:29 -0800 (PST)
> So, does packet_info use guint32 to support non-tcp/udp "ports"?

That was the intent - to allow it to handle protocols where the
equivalent of a transport-layer port (transport layer service access
point?) could be longer than 16 bits.

I'd be inclined to turn the port number arguments into "guint32"s - they
may actually work better than guint16s on many platforms (e.g., on
Alpha, you can load an aligned 32-bit quantity from memory or store it
into memory with a single instruction, but, on processors that don't
have the BWX extensions, you have to do 16-bit or 8-bit accesses with
multiple instructions; admittedly, they'll be passed in registers on
Alpha, but "srcport" and "destport" in "packet_info" structures are in
memory).