Ethereal-dev: [Ethereal-dev] help needed for sniffer in c++

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

From: "akshar SNIFFER" <akshar_sniffer@xxxxxxxxxxxxxx>
Date: 6 Oct 2004 04:39:17 -0000
  I am writing a sniffer in C++ , I have included the pcap.h header file .While compiling i get the following error 

/********************************************************************
In file included from test.cpp:2:
/usr/include/net/bpf.h:408: error: previous declaration of `u_int
   bpf_filter(bpf_insn*, u_char*, unsigned int, unsigned int)' with C++ linkage
/usr/include/pcap.h:201: error: conflicts with new declaration with C linkage
/usr/include/net/bpf.h:407: error: previous declaration of `int
   bpf_validate(bpf_insn*, int)' with C++ linkage
/usr/include/pcap.h:202: error: conflicts with new declaration with C linkage

*********************************************************************/