Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: Re: [Ethereal-dev] Libethereal version

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

From: Tomas Kukosa <tomas.kukosa@xxxxxxxxxxx>
Date: Thu, 01 Jul 2004 11:02:18 +0200


Joerg Mayer wrote:

Just an idea: Why use a version number? Maybe a hash over the generated
exported apis would be more useful.

With the version number the plugin can check or exact version number or
it can peform test for "version x.x.x or higher" or whatever else is necessary.

See my example:

/*--- version ---------------------------------------------------------------*/
G_MODULE_EXPORT const gchar version[] = PLUGIN_VERSION;

/*--- plugin_init -----------------------------------------------------------*/
G_MODULE_EXPORT void plugin_init(plugin_address_table_t *pat) {

  /* initialise the table of pointers needed in Win32 DLLs */
  plugin_address_table_init(pat);

#if CHK_VER  /* 0.10.5 or later */
  if (strcmp(epan_version, VERSION)) {
    g_error("HiPath plugin: %s\n"
            "Plugin is compiled for Ethereal %s but running version is %s",
            version, VERSION, epan_version);
    return;
  }
#endif

...




 ciao
         Joerg


--
_________________________________________________

ANF DATA              ANF DATA spol. s r. o.
a SIEMENS Company     M-palác, Heršpická 5
                      639 00 Brno
                      Czech Republic
Tomáš Kukosa          Tel.: +420 - 5 4310 6822
PSE ECT AES 6         Fax: +420 - 5 4324 8780
Room: 8.24            mailto:tomas.kukosa@xxxxxxxxxxx
_________________________________________________