On Tue, Mar 04, 2003 at 01:58:54PM +0100, Gisle Vanem wrote:
> MFC is C++ and pcap.h isn't written to be used with C++.

It wasn't *originally* so written, but change 1.24 in the libpcap CVS
history should have fixed that:

        revision 1.24
        date: 2000/07/29 07:36:43;  author: guy;  state: Exp;  lines: +10 -1 
        Pick up, from the FreeBSD libpcap, changes to surround all declarations
        with

                #ifdef __cplusplus
                extern "C" {
                #endif
        
                        ...
        
                #ifdef __cplusplus
                }
                #endif

        so that C++ code can include these header files and correctly call the
        C-language routines they declare.

and libpcap 0.6 was released after that change; WinPcap 2.3 is based on
libpcap 0.6.2, so it should have that change (and my copy of the 2.3
source has it).

Now, in <net/bpf.h>, there was *another* change:

        revision 1.55
        date: 2002/04/20 10:02:16;  author: guy;  state: Exp;  lines: +10 -2
        Throw in

                #ifdef __cplusplus
                extern "C" {
                #endif

        and change

                #if __STDC__

        to

                #if __STDC__ || defined(__cplusplus)
        
        around the non-kernel function prototypes, so they work right when
        compiling with C++.

which isn't in any current libpcap release - but WinPcap 3.0 beta is
based on a recent CVS version of libpcap, so it might have that change.


==================================================================
 This is the WinPcap users list. It is archived at
 http://www.mail-archive.com/[EMAIL PROTECTED]/

 To unsubscribe use 
 mailto: [EMAIL PROTECTED]
==================================================================

Reply via email to