Ethereal-dev: Re: [Ethereal-dev] Variable redefinition in epan/dissectors/packet-ocsp.c

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

From: Tomáš Kukosa <tomas.kukosa@xxxxxxxxxxx>
Date: Sat, 1 Jan 2005 18:25:45 +0100 (CET)
I can look into it on Monday or Friday.

Can anybody see any problem with adding prefix to all value_string tables
(static and non-static) created with asn2eth compiler?

> On Fri, 31 Dec 2004 03:35:58 +0100, Joerg Mayer <jmayer@xxxxxxxxx> wrote:
>> On Wed, Dec 29, 2004 at 02:14:00PM -0600, Albert Chin wrote:
>> > The IBM v6 compiler on AIX 4.3.3 doesn't like it when a variable is
>> > redefined. Version_vals is defined in epan/dissectors/packet-x509af.h:
>> >   extern const value_string Version_vals[];
>>
>> I just tried to look at it and it's currently over my head how to fix
>> this properly as:
>> a) both files (packet-ocsd.c and packet-x509af.h are generated files
>> b) Their spec files contain variables of the same name.
>>
>> Ronnie: Would prefixing all static vars with the name of the protocol
>> (e.g. OCSD) make sense (e.g. Version -> OCSDVersion)? If so, could
>> someone
>> who knows the asn2eth.py script fix this?
>> Hmm, maybe prefixing non-static Vars would be useful too??
>
> Yes that would be the best solution,   making sure that all symbols
> are prefixed by the protocol name.
> This would get rid of a whole bunch of warning messages when compiling
> the ASN files due to  x509 and pkix1 both exporting essentially the
> same symbols.
>
> So that the variables would then be  ocsd_Version_vals
>
> I am on vacation now and travelling so I wont be able to look into it
> until i get back.  Maybe Tomas can look into it?
> Such a change to the asn2eth compiler would also likely require all
> the asn1/ dissectors to be regenerated  (and those things that break
> to be fixed).
>