Wireshark-bugs: [Wireshark-bugs] [Bug 4210] Bug parsing IPv4 header flags field
Date: Fri, 6 Nov 2009 14:39:37 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4210


Filipe David Borba Manana <fdmanana@xxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #3917|review_for_checkin?         |
               Flag|                            |
Attachment #3917 is|0                           |1
           obsolete|                            |
   Attachment #3919|                            |review_for_checkin?
               Flag|                            |
         AssignedTo|wireshark-bugs@xxxxxxxxxxxxx|fdmanana@xxxxxxxxx




--- Comment #3 from Filipe David Borba Manana <fdmanana@xxxxxxxxx>  2009-11-06 14:39:35 PDT ---
Created an attachment (id=3919)
 --> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3919)
2nd patch, this time using two constants created with the pp #define directive

Here's a 2nd patch, using constants this time.

I just can't avoid the hardcoded string containing the offset field's width in
the static hf_register_info hf[] variable of the proto_register_ip(void)
function:

                { &hf_ip_frag_offset,
                { "Fragment offset",    "ip.frag_offset", FT_UINT16, BASE_DEC,
NULL, 0x0,
                        "Fragment offset (13 bits)", HFILL }},


Whatever I try, I simply can't assign a dynamically generated string (using
GString and g_string_printf() for example) to the static variable.

My C is a little bit rusty nowadays, so maybe there's a way to do it. Let me
know if there is one.

Patch for the evil bit info display (rfc 3514) will come soon.

best regards,
Filipe Manana


-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.