Ethereal-dev: Re: [Ethereal-dev] Patch to expose OPC/DPC from MTP3, SCCP preferences

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Fri, 5 Dec 2003 13:19:54 -0800

On Dec 5, 2003, at 10:43 AM, Jeff Morriss wrote:

It's been a while since I actually worked on a dissector, but I think it's okay to have 2 hf_ variables that correspond to the same filter string.

Yes, it is. We use that to, for example, handle some fields in X.25, as their bitfield masks are different depending on whether you're using mod-8 or mod-128 mode.

 E.g. something like:

    { & hf_mtp3_itu_opc,
{ "OPC", "mtp3.opc", FT_UINT32, BASE_DEC, NULL, ITU_OPC_MASK,
              "", HFILL }},
    { & hf_mtp3_ansi_opc,
      { "DPC", "mtp3.opc",

(Presumably you meant "OPC", not "DPC".)

              FT_UINT32, BASE_NONE, NULL, 0x0,
              "", HFILL }},

So in that case a particular item in the protocol tree would either be associated with hf_mtp3_itu_opc or hf_mtp3_ansi_opc. However, a filter expression that contained "mtp3.opc" would work with the item regardless of which of those particular hf_ variables was used.