Wireshark mailing list archives

Re: filtering not working


From: Brian Oleksa <oleksab () darkcornersoftware com>
Date: Tue, 26 Jan 2010 10:23:43 -0500

Stig

Yes.... that did work.

But now I am confused. I am trying to fix up my code to adhere to the 
wireshark coding standards.
I thought that if you had a string that you have to use ( 
proto_tree_add_string )..??

Here is another example (which filtering does not work).

{ &hf_helen_sequence_num,
    { "Sequence Number", "helen.sequenceNumber", FT_UINT32, BASE_DEC, 
NULL, 0x0,
         "Sequence Number", HFILL}},

guint32 seq;
seq = tvb_get_ntohl(tvb,offset);

 proto_tree_add_uint_format(helen_sub_tree, hf_helen_sequence_num, tvb, 
offset, 4, 0,
         "Sequence #: %d", seq);

To get this to work....are you telling me that I need to change it to:

 proto_tree_add_item(helen_sub_tree, hf_helen_sequence_num, tvb, offset, 
4, FALSE);

Looks like I have to change all of my ( proto_tree_add ) routines for 
filtering to work correctly..??

Thanks,
Brian




Stig Bjørlykke wrote:
On Tue, Jan 26, 2010 at 3:58 PM, Brian Oleksa
<oleksab () darkcornersoftware com> wrote:
  
proto_tree_add_string_format(helen_sub_tree, hf_helen_flowname, tvb,
offset, 8, 0,
      "Flowname: %s", flowname);
    

You feed proto_tree_add_string_format with value = 0, and a pointer to
NULL will not match "SA_EX" .  Try this:

proto_tree_add_item(helen_sub_tree, hf_helen_flowname, tvb, offset, 8, FALSE);


  
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: