Ethereal-dev: [Ethereal-dev] support for C++

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

From: HelgeKruse@xxxxxxxxxxx (Helge Kruse)
Date: Sat, 15 Jan 2005 16:54:13 +0100

Hello,

 

I know, that ethereal is a C not a C++ project, because it should be compiled on platforms, that have only a C compiler available.

 

But I want to write some dissectors for my personal use. In this dissectors I want to use my C++ classes and knowledge. The current implementation cannot be used in a C++ project. The reasons are:

 

Use of reserved keywords.

    The name class is used in as structure member.

 

Use of global definitions in header files.

    The Xplugin_api_decls.h defines a lot of variables. This is valid in plain C programs, but generates multiple defined globals when linking of C++ object modules. This can be avoided, if they are declared as extern in a header file an and defined in one implementation file. Since C++ programs often implement one class per source file, the Xplugin_api_decls.h is included in multiple source files.

 

What do you think to change this two points in the Ethereal project?

 

Regards, Helge