Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Can I safely use PCRE in wiretap file reader?

From: Hadriel Kaplan <HKaplan@xxxxxxxxxxxxxx>
Date: Sat, 18 Sep 2010 13:46:43 -0400
Hi,
Thanks for the tip! (I had looked at GRegex but worried about older GLib, but version checking is fine with me)
BTW, your answer of "yes" means I cannot safely use plain PCRE, or yes I can safely use it?

-hadriel

On Sep 18, 2010, at 1:33 PM, Stephen Fisher wrote:

> On Sat, Sep 18, 2010 at 01:14:37PM -0400, Hadriel Kaplan wrote:
> 
>> Since PCRE is "optional" in the dev docs, does that mean I can't 
>> safely assume it's available in wireshark builds?
> 
> Yes, however, we recently started using GLib's GRegex functionality in 
> place of PCRE when running a high-enough GLib version.  It's in GLib 
> 2.14 and higher:
> 
> http://library.gnome.org/devel/glib/unstable/glib-Perl-compatible-regular-expressions.html
> 
> You can block out your wiretap code to only work when compiled with GLib 
> 2.14 (which is most people, including all of the automated builds that 
> people download) by using:
> 
> #if GLIB_CHECK_VERSION(2,14,0)
> ...
> #endif
> 
> I don't see a problem with blocking out all of the new code, so that 
> file format simply isn't available without GLib > 2.14.  That's how we 
> usually handle new features (we don't show it unavailable in the GUI - 
> it just doesn't show up at all).
> 
> 
> ___________________________________________________________________________
> 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