[Bro-Dev] [Bro-Commits] [git/bro] topic/matthias/opaque: Implement equivalence relation for opaque types. (2494940)

Seth Hall seth at icir.org
Thu Dec 6 06:54:29 PST 2012


On Dec 5, 2012, at 11:58 PM, Matthias Vallentin <vallentin at icir.org> wrote:

>   Implement equivalence relation for opaque types.
>  case TYPE_OPAQUE:
> -    // FIXME: Should we downcast here and compare the opaque type names?
> -    return 1;
> +    {
> +		const OpaqueType* ot1 = (const OpaqueType*) t1;
> +		const OpaqueType* ot2 = (const OpaqueType*) t2;
> +    return ot1->Name() == ot2->Name() ? 1 : 0;
> +    }


When we implement opaque types, shouldn't we be able to supply an equivalency testing function?  Just comparing the types seems of limited use.

  .Seth

--
Seth Hall
International Computer Science Institute
(Bro) because everyone has a network
http://www.bro-ids.org/




More information about the bro-dev mailing list