Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 53473: /trunk/ui/ /trunk/ui/gtk/: ma
Date: Thu, 21 Nov 2013 08:25:34 -0500 (EST)
Of the ones I needed/interested in ("eth", "ip", "ipv6", "tcp", "udp", "sctp") only "ip" had its proto_* variable in a header (in the dissectors directory).  Am I looking in the wrong place?  Do you think that's something I should add for the other dissectors?  I know string compares are more expensive than integers, but I don't believe the integers are available.  I also don't want to establish precendence and have dissectors think they need the proto_* variable to be public.
 
The string list to look through is rarely larger than 6 or 7 so I'm not sure the performance hit will be noticeable.
-----Original Message-----
From: Evan Huus <eapache@xxxxxxxxx>
To: wireshark-dev <wireshark-dev@xxxxxxxxxxxxx>
Sent: Thu, Nov 21, 2013 7:27 am
Subject: Re: [Wireshark-dev] [Wireshark-commits] rev 53473: /trunk/ui/ /trunk/ui/gtk/: main_menubar.c /trunk/ui/qt/: main_window_slots.cpp

Rather than doing string comparisons you should just be able to compare the 
value directly to the proto_* variable for the relevant protocol. Most of the 
necessary ones should already be I'm public headers.

> On Nov 21, 2013, at 7:16 AM, mmann@xxxxxxxxxxxxx wrote:
> 
> http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=53473
> 
> User: mmann
> Date: 2013/11/21 12:16 PM
> 
> Log:
> Walk list of protocol strings to determine which protocols are present in a 
packet rather than rely on protocol specific items in packet_info in an effort 
to (eventually) reduce packet_info members.
> 
> Directory: /trunk/ui/gtk/
>  Changes    Path              Action
>  +69 -20    main_menubar.c    Modified
> 
> Directory: /trunk/ui/qt/
>  Changes    Path                     Action
>  +40 -16    main_window_slots.cpp    Modified
> 
> ___________________________________________________________________________
> Sent via:    Wireshark-commits mailing list <wireshark-commits@xxxxxxxxxxxxx>
> Archives:    http://www.wireshark.org/lists/wireshark-commits
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-commits
>             mailto:wireshark-commits-request@xxxxxxxxxxxxx?subject=unsubscribe
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe