Ethereal-dev: [Ethereal-dev] Checking bitmasks for _header_field_info structs ?

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

From: "Martin Mathieson" <martin.mathieson@xxxxxxxxxxxx>
Date: Wed, 8 Jun 2005 00:00:59 +0100
Hi,

Since I've often got it wrong myself, I added a check (patch attached) to
make sure that the bitmasks supplied to header fields look sane, i.e. that
they don't accidentally contain any 'holes' (I assumed no correct bitmask
ever would).

Here is the output I see now when ethereal starts up:

lapd.control.u_modifier_cmd: has non-contiguous bitmask (0x000000ec)
lapd.control.u_modifier_resp: has non-contiguous bitmask (0x000000ec)
iax2.video.subclass: has non-contiguous bitmask (0x000000bf)
lapb.control.u_modifier_cmd: has non-contiguous bitmask (0x000000ec)
lapb.control.u_modifier_resp: has non-contiguous bitmask (0x000000ec)
lapd.control.u_modifier_cmd: has non-contiguous bitmask (0x000000ec)
lapd.control.u_modifier_resp: has non-contiguous bitmask (0x000000ec)
llc.control.u_modifier_cmd: has non-contiguous bitmask (0x000000ec)
llc.control.u_modifier_resp: has non-contiguous bitmask (0x000000ec)
sdlc.control.u_modifier_cmd: has non-contiguous bitmask (0x000000ec)
sdlc.control.u_modifier_resp: has non-contiguous bitmask (0x000000ec)
telnet.auth.mod.enc: has non-contiguous bitmask (0x00000014)
v120.control.u_modifier_cmd: has non-contiguous bitmask (0x000000ec)
v120.control.u_modifier_resp: has non-contiguous bitmask (0x000000ec)
x11.do-not-propagate-mask.erroneous-bits: has non-contiguous bitmask
(0xffffc0b0)
x11.pointer-event-mask.erroneous-bits: has non-contiguous bitmask
(0x00008003)
irlap.c.u_modifier_cmd: has non-contiguous bitmask (0x000000ec)
irlap.c.u_modifier_resp: has non-contiguous bitmask (0x000000ec)
irlmp.dst.lsap: has non-contiguous bitmask (0xffffff7f)
irlmp.src.lsap: has non-contiguous bitmask (0xffffff7f)
ttp.icredit: has non-contiguous bitmask (0xffffff7f)
ttp.dcredit: has non-contiguous bitmask (0xffffff7f)

- Do all or any of the above look like errors?
- Maybe something like this test should be added to Gilbert's script (see
http://www.ethereal.com/lists/ethereal-dev/200505/msg00491.html ?)

Best regards,
Martin


Attachment: proto.c.diff
Description: Binary data