Ethereal-dev: Re: [Ethereal-dev] external plugin and exported symbols

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

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Sun, 5 Feb 2006 01:01:56 +0100
Paolo,

On Sat, Feb 04, 2006 at 04:34:19PM +0100, Paolo Abeni wrote:
> I posted the patch previously and there was a bit of discussion about
> it's inclusion. Anyway I attach the latest version of the patch
> 
> > Why not simply adding it to Ethereal itself instead of a plugin?
> 
> I would like to see the decryption functionality in ethereal, but so far
> the patch does not get included. The plugin enable users to get
> decryption functionality without recompiling ethereal.

Committed revision 17156.

I've mixed feelings about this patch because there are things that need to
be fixed. I still checked it in in order to accelerate the process.

I've already fixed a few small warnings and an omission that would have
caused "make distcheck" to fail.

Please change the way you format functions:
Write
static void
function(...)
instead of
static void function(...)
etc.

Also, I've attached a list of warnings I get when compiling packet-ssl.c
and packet-ssl-utils.c. Please try to fix (most of) them.
Also, gcc has an option to check the format functions, please include
them where appropriate (see epan/proto.h, search for GNUC_FORMAT_CHECK).

Warnings in packet-ssl.c

packet-ssl.c:226: warning: initialization discards qualifiers from
pointer target type
packet-ssl.c: In function 'ssl_hash':
packet-ssl.c:256: warning: cast discards qualifiers from pointer target type
packet-ssl.c: In function 'ssl_private_key_hash':
packet-ssl.c:281: warning: cast discards qualifiers from pointer target type
packet-ssl.c: In function 'ssl_private_key_free':
packet-ssl.c:290: warning: unused parameter 'dummy'
packet-ssl.c: In function 'ssl_association_remove_handle':
packet-ssl.c:328: warning: unused parameter 'key'
packet-ssl.c:329: warning: unused parameter 'user_data'
packet-ssl.c: In function 'ssl_parse':
packet-ssl.c:418: warning: ISO C90 does not support the 'hh' scanf length modifier
packet-ssl.c:418: warning: ISO C90 does not support the 'hh' scanf length modifier
packet-ssl.c:418: warning: ISO C90 does not support the 'hh' scanf length modifier
packet-ssl.c:418: warning: ISO C90 does not support the 'hh' scanf length modifier
packet-ssl.c: In function 'decrypt_ssl3_record':
packet-ssl.c:1439: warning: implicit declaration of function 'p_rem_proto_data'
packet-ssl.c:1709:13: warning: C++ style comments are not allowed in ISO C90
packet-ssl.c:1709:13: warning: (this will be reported only once per input file)

Warnings in packet-ssl-utils.c

packet-ssl-utils.c:38: warning: no previous declaration for 'ssl_hmac_init'
packet-ssl-utils.c:46: warning: no previous declaration for 'ssl_hmac_update'
packet-ssl-utils.c:50: warning: no previous declaration for 'ssl_hmac_final'
packet-ssl-utils.c:56: warning: no previous declaration for 'ssl_hmac_cleanup'
packet-ssl-utils.c:62: warning: no previous declaration for 'ssl_md_init'
packet-ssl-utils.c:68: warning: no previous declaration for 'ssl_md_update'
packet-ssl-utils.c:72: warning: no previous declaration for 'ssl_md_final'
packet-ssl-utils.c:78: warning: no previous declaration for 'ssl_md_cleanup'
packet-ssl-utils.c:85: warning: no previous declaration for 'ssl_sha_init'
packet-ssl-utils.c:91: warning: no previous declaration for 'ssl_sha_update'
packet-ssl-utils.c:95: warning: no previous declaration for 'ssl_sha_final'
packet-ssl-utils.c:101: warning: no previous declaration for 'ssl_md5_init'
packet-ssl-utils.c:107: warning: no previous declaration for 'ssl_md5_update'
packet-ssl-utils.c:111: warning: no previous declaration for 'ssl_md5_final'
packet-ssl-utils.c:120: warning: no previous declaration for 'ssl_cipher_init'
packet-ssl-utils.c:138: warning: no previous declaration for 'ssl_cipher_decrypt'
packet-ssl-utils.c:142: warning: no previous declaration for 'ssl_get_digest_by_name'
packet-ssl-utils.c:146: warning: no previous declaration for 'ssl_get_cipher_by_name'
packet-ssl-utils.c:151: warning: no previous declaration for 'ssl_get_key_len'
packet-ssl-utils.c:162: warning: no previous declaration for 'ssl_private_decrypt'
packet-ssl-utils.c:535: warning: no previous declaration for 'ssl_create_decoder'
packet-ssl-utils.c:873: warning: no previous declaration for 'ssl3_check_mac'
packet-ssl-utils.c:983: warning: no previous declaration for 'ssl_get_version'
packet-ssl-utils.c:1059:5: warning: C++ style comments are not allowed in ISO C90
packet-ssl-utils.c:1059:5: warning: (this will be reported only once per input file)
packet-ssl-utils.c:1199: warning: no previous declaration for 'ssl_data_init'

Warnings in ssl-dlg.c

ssl-dlg.c: In function 'ssl_queue_packet_data':
ssl-dlg.c:140: warning: unused parameter 'edt'
ssl-dlg.c: At top level:
ssl-dlg.c:185: warning: no previous declaration for 'ssl_stream_cb'

So please have a look at the sources from the svn repository and send
patches to fix these warnings. Your disregard to the coding rules and
the many warnings have been part of the reason why I was reluctant to
check this in.

 Ciao
      Joerg