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] PER dissector - CHOICE

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

From: "Ronnie Sahlberg" <ronnie_sahlberg@xxxxxxxxxxxxxx>
Date: Thu, 11 Sep 2003 01:16:45 +1000
From: "Tomas Kukosa"
Sent: Wednesday, September 10, 2003 11:18 PM
Subject: [Ethereal-dev] PER dissector - CHOICE


> Hi!
>   for the CHOICE type two lines in the tree are created. See the
> h323_message_body below.
> -------
> H.225.0 CS
>     H323_UserInformation
>         H323_UU_PDU
>             h323_message_body
>                 h323_message_body: .... .000 : setup (0)
>                     SetupUUIE
>                         ProtocolIdentifier: 0.0.8.2250.0.4
> -------
>
> Is it necessary? Is not it better to have it more like in the "old"
> H.323 plugin? I.e. only one line with h323_message_body would be
> created.

No it is not nessecary.
It is just an artefact left from when PER and H.245 was developed in
parallell during late december.
The API for the PER helpers were a bit in flux and changed as i started to
udnerstand the problem space better.
It should be changed so that :
1,  the hf_index field to this function takes a FT_UINT32 type and has the
value of the choosen arm,
         VALS() for this hf thing should preferably be a proper value string
with the names of choosen choice arm
          so there would just be one  tree item that would look like   "Some
Choice item: SecondItem (2)"

          There are quite a few calls already to dissect_per_choice,
adding a value_string to each one of them
          and changing the hf field we pass to this call to be FT_UINT32
will be a LOT of work but it will
          at the same time make the h.245 and h.225 dissectors MUCH better.
          Please feel free to do this change.


2,  All the places where we do alignment in packet-per.c should be changed
to an alignment function call :
    dissect_per_align_to_next_octet_boundary()  which would   IFF the
internal PER fields are to be shown
    put a text item in the tree to display the padding bits :  "padding :  .
. . . x x x x"


These two changes would be a lot of work but would really make the h.245 and
h.225 dissectors MUCH MUCH better