Ethereal-dev: Re: [Ethereal-dev] Patch (PDML fields less than one byte)

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

From: Gilbert Ramirez <gilbertr@xxxxxxxxx>
Date: Tue, 24 May 2005 09:38:27 -0500
Upon further reading of the PDML specification at:

http://analyzer.polito.it/30alpha/docs/dissectors/PDMLSpec.htm

I see that you're right, but if we're going to show bit values in hex
in the "value" attribute, then we need to also add the "unmaskedvalue"
attribute for those fields. The "unmaskedvalue" attribute will show
the hex value of the entire byte or bytes.

--gilbert

On 5/24/05, vasanth.manickam@xxxxxx <vasanth.manickam@xxxxxx> wrote:
>  
> The export PDML features creates an xml file where the value of the
> subfields less than 1 byte have the wrong value. Instead of just the bit or
> part of the byte the value field contains the entire byte. 
>   
> Example:- 
>   
> <field name="tcp.flags.cwr" showname="0... .... = Congestion Window Reduced
> (CWR): Not set" size="1" pos="47" show="0" value="18" /> 
>   
>   
> The value field is supposed to represent only the 1st bit but the entire
> byte is represented as value 18. 
> This caused a lot of problem in applications which process the xml file for
> further use. 
>   
> The below patch seems to solve this problem by modifying the value field
> that is written to the xml file 
>   
>   
> ------------------------------------------------- 
>   
> --- print.c 2005-05-24 12:52:55.000000000 +0100
> +++ print_new.c 2005-05-24 13:08:56.593591576 +0100
> @@ -346,6 +346,10 @@
> }
>     if (fi->length > 0) {
>     fputs("\" value=\"", pdata->fh);
> +     if (!fi->rep)
> +     print_escaped_xml(pdata->fh, &dfilter_string[chop_len]);
> +     else
>       write_pdml_field_hex_value(pdata, fi);
>     }
> } 
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
> 
> 
>