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.

Date: Fri, 27 May 2005 14:31:44 +0100
Hi,
Can you send me some more examples... I can help you clean them up..
Regards
Vasanth Manickam


-----Original Message-----
From: ethereal-dev-bounces@xxxxxxxxxxxx
[mailto:ethereal-dev-bounces@xxxxxxxxxxxx] On Behalf Of Gilbert Ramirez
Sent: 26 May 2005 16:19
To: Ethereal development
Subject: Re: [Ethereal-dev] Patch (PDML fields less than one byte)


Thanks. I'm testing this; it turns out there are some non-integer fields
with bitmasks defined for them, like FT_NONE fields! I'm tracking these
down.

--gilbert

On 5/25/05, vasanth.manickam@xxxxxx <vasanth.manickam@xxxxxx> wrote:
> Sorry for spamming again..   I am unable to format the patch in the
> mail.. Attaching the file now...
> 
> 
> -----Original Message-----
> From: ethereal-dev-bounces@xxxxxxxxxxxx 
> [mailto:ethereal-dev-bounces@xxxxxxxxxxxx] On Behalf Of 
> vasanth.manickam@xxxxxx
> Sent: 25 May 2005 16:31
> To: ethereal-dev@xxxxxxxxxxxx; gram@xxxxxxxxxxxxxxx
> Subject: RE: [Ethereal-dev] Patch (PDML fields less than one byte)
> 
> 
> Oops in the previous mail the patch seems to be formatted all wrong...
> 
> --- print1.c    2005-05-25 13:13:53.000000000 +0100
> +++ print.c     2005-05-25 16:09:25.301581248 +0100
> @@ -346,6 +346,13 @@
>                         }
>                         if (fi->length > 0) {
>                                 fputs("\" value=\"", pdata->fh);
> +
> +                               if(fi->hfinfo->bitmask!=0){
> +
> fprintf(pdata->fh,"%X",fvalue_get_integer(&fi->value));
> +                                       fputs("\"
> unmaskedvalue=\"",pdata->fh);
> +
> write_pdml_field_hex_value(pdata,fi);
> +                               }
> +                               else
>                                 write_pdml_field_hex_value(pdata,fi);
>                         }
>                 }
> 
> 
> -----Original Message-----
> From: ethereal-dev-bounces@xxxxxxxxxxxx 
> [mailto:ethereal-dev-bounces@xxxxxxxxxxxx] On Behalf Of 
> vasanth.manickam@xxxxxx
> Sent: 25 May 2005 16:21
> To: gram@xxxxxxxxxxxxxxx; ethereal-dev@xxxxxxxxxxxx
> Subject: RE: [Ethereal-dev] Patch (PDML fields less than one byte)
> 
> 
> Ok I have fixed the patch to accommodate "unmaskedvalue" and also 
> corrected a small error which applied the changes to some fields which

> were not necessarily subfields.  I am new to contributing code to open

> source projects...  Please guide me on how I can get this patch 
> verified and make it into the main build...
> 
> Vasanth Manickam
> 
> 
> --- print.c     2005-05-25 13:13:53.000000000 +0100
> +++ print1.c    2005-05-25 16:09:25.301581248 +0100
> @@ -346,6 +346,13 @@
>                         }
>                         if (fi->length > 0) {
>                                 fputs("\" value=\"", pdata->fh);
> +
> +                               if(fi->hfinfo->bitmask!=0){
> +                                       fprintf(pdata->fh, "%X",
> fvalue_get_integer(&fi->value));
> +                                       fputs("\" unmaskedvalue=\"",
> pdata->fh);
> +
> write_pdml_field_hex_value(pdata, fi);
> +                               }
> +                               else
>                                 write_pdml_field_hex_value(pdata, fi);
>                         }
>                 }
> 
> 
> 
> 
> -----Original Message-----
> From: ethereal-dev-bounces@xxxxxxxxxxxx 
> [mailto:ethereal-dev-bounces@xxxxxxxxxxxx] On Behalf Of Gilbert 
> Ramirez
> Sent: 24 May 2005 15:38
> To: Ethereal development
> Subject: Re: [Ethereal-dev] Patch (PDML fields less than one byte)
> 
> 
> 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
> >
> >
> >
> 
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx 
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
> 
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx 
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
> 
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx 
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
> 
> 
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx 
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
> 
> 
> 
>

_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev