Ethereal-dev: Re: [Ethereal-dev] New Ethereal Dissector for IAPP

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

From: "Ronnie Sahlberg" <sahlberg@xxxxxxxxxxxxxxxx>
Date: Sat, 2 Feb 2002 00:41:26 +1100
Nice work,
but to make it even better:

1, replace all proto_tree_add_text()  with proper proto_tree_add_item() with
corresponding hf_index fields.
Then everything can be filterabled on.
the display filters are a very nice feature of ethereal, we should use it as
much as possible.
This would also allow you to get rid of a lot of the sprintf/strcpy copying
which the dissector is now doing.
proto_tree_add_item() calls relate to different types of parameters due to
how the hf_index parameter is
used at the hf_register)info structure. Please look at one of the other
dissectors, and use cut-n-paste,
a dissector is much nicer when display filters can be used.

2, replace dissect_caps() with code that uses the boolean hf_index which
ethereal supplies to make it resemble the
other ethereal dissectors closer.
See packet-smb.c/dissect_access() for an example on how to do this. This
will show each individual bit position for the mask-variable
and will at the same time make them filterable.


3, get rid of all match_strval() since this functionality of selecting the
correct value_string entry will be done
automatically by proto_tree_add_item()  if the corresponding
hf_register_info entry has the VALS(value_string_name) field specified.
Actually much easier and much more compact code.
This goes for all value_string arrays, put it in VALS() down in
hf_register_info instead.


If you want to improve the dissector in this way you can mail me directly if
you have any questions on how to do these changes.

Thankyou for contributing to ethereal,
best regards
    ronnie sahlberg


----- Original Message -----
From: <Alfred.Arnold@xxxxxxx>
To: <ethereal-dev@xxxxxxxxxxxx>
Sent: Saturday, February 02, 2002 12:04 AM
Subject: [Ethereal-dev] New Ethereal Dissector for IAPP


> Hi,
>
>  I have written an ethereal dissector for IAPP.  IAPP, the
> Inter-Access-Point-Protocol,
> is a protocol used by some 802.11 wireless access points to communicate
> with each
> other over a LAN backbone, especially to handle handovers when a station
> moves
> from one access point to another.
>
> The dissector was written on a Debian Woody Linux system, based on
ethereal
> 0.8.20 (the version that currently comes with Debian Woody).
>
> It's the first time I did such a thing - hopefully I dodn't goof too
> much...
>
> Best regards
>
> Alfred Arnold
>
> ELSA AG
> (See attached file: packet-iapp.c)
>
> ______________________________________________________________________
>
> Visit us at the CeBit 2002
>
> from 13 - 20/03/2002
>
> Hall 16 Booth B52
>
> Hall 11 Booth D50