----- Original Message -----
From: "Guy Harris"
Sent: Wednesday, May 26, 2004 4:23 AM
Subject: Re: [Ethereal-dev] H235 & ASN1 compiler
> On Tue, May 25, 2004 at 04:49:03PM +1000, Ronnie Sahlberg wrote:
> > (To get this to work, i had to upgrade python from 1.5 to 2.2 bloody
> > bleading edge requirements :-)
>
> What happens with Python 1.5? Does the ASN.1-to-dissector translator
> not work at all?
[sahlberg@Derek h235]$ python ../../tools/asn2eth.py -X -p h235 -c
h235.cnf -s packet-h235-template H235-SECURITY-MESSAGES.asn
File "../../tools/asn2eth.py", line 221
if (t.value.find("\n") >= 0) : t.lineno += 1
^
SyntaxError: invalid syntax
[sahlberg@Derek h235]$
The ^ points to the second = character
>
> BTW, is that why the generated source was checked in - so that people
> don't need to upgrade Python in order to build from CVS?
that is one reason,
another reason, we dont require python at all for any other things so we
would need to implement some
sort of fallback if python is not available.
another reason, Im not really good at writing makefiles, so i was hoping
someone else would do the makefile magic.
And maybe run the asn2eth compiles manually until the compiler is well
tested on as many platforms as possible.
>
> > Tomas, I still get some warnings from packet-h235.h which is
generated
> > by your compiler.
> > It warns about:
> > const value_string AuthenticationMechanism_vals[];
> > const value_string CryptoToken_vals[];
> >
> > Should not these constructs be declared as:
> > const value_string *AuthenticationMechanism_vals;
> > const value_string *CryptoToken_vals;
> > in the machine generated header files instead?
>
> No, because they're defined as
>
> const value_string AuthenticationMechanism_vals[] = {
> ...
> };
>
> and
>
> const value_string CryptoToken_vals[] = {
> ...
> };
>
> in "packet-h235.c", so they should be declared as arrays, not pointers.
>
> They should be declared as
>
> extern const value_string AuthenticationMechanism_vals[];
> extern const value_string CryptoToken_vals[];
>
> which at least appears to squelch the GNU *linker* warning I got about
> the size changing. (I think Joerg Mayer did a bunch of similar changes
> for the shared libethereal stuff, so this is more of the same.)
>
> I get a flood of other warnings, many of which are from initializing
> members of a "per_sequence_t" array with structures that include a
> dissector pointer to a function that returns "guint32", not "int" - the
> translator should generate dissectors that return "int", not "guint32",
> offset values.
>
> (Unfortunately, this isn't helped by some "guint32" offsets and, I
> suspect, offset return values in some of the PER dissection routines.)
>
> The other warnings (I'm assuming all the "initialization from
> incompatible pointer type" warnings are due to that problem) are:
>
> ../packet-h235.c: In function `dissect_xxx_ToBeSigned':
> ../packet-h235.c:182: warning: unused parameter `hf_index'
>
> That one might as well remain, as it's a "not decoded yet" item
> (dissect_xxx_ToBeSigned).
>
> ../packet-h235.c: In function `dissect_h235_TimeStamp':
> ../packet-h235.c:215: warning: decimal constant is so large that it is
unsigned
>
> The constant in question is 4294967295 - it should probably be
> 4294967295U, instead.
>
> ../packet-h235.c: In function `dissect_h235_NULL':
> ../packet-h235.c:556: warning: unused parameter `pinfo'
> ../packet-h235.c:530: warning: `dissect_h235_ECGDSASignature' defined but
not used
> ../packet-h235.c:876: warning: `dissect_h235_PwdCertToken' defined but not
used
> ../packet-h235.c:970: warning: `dissect_h235_KeySignedMaterial' defined
but not used
> ../packet-h235.c:986: warning: `dissect_h235_H235CertificateSignature'
defined but not used
> ../packet-h235.c:1002: warning: `dissect_h235_ReturnSig' defined but not
used
> ../packet-h235.c:1016: warning: `dissect_h235_KeySyncMaterial' defined but
not used
>
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
>