CyberPsychotic wrote:

> when I define a variable of type pcap_t, like:
> 
> #include <pcap.h>
> 
> void main() {
> pcap_t foo;
> }
> I get 'referencing to incomplete type' error.
> 
> I checked pcap.h file, which has it defined as
> 
> typedef struct pcap pcap_t;
> and pcap is not defined anywhere in this file nor files it includes. Doing
> some search I found that the structure is defined in pcap-int.h file

I would guess that `pcap_t' is intended to be an abstract type, and
shouldn't be accessed from within applications. The `-int' in
`pcap-int.h' presumably stands for `internal'.

You would still be able to declare variables of type `pcap_t *',
assign return values from libpcap functions to those variables, and
pass them as arguments to libpcap functions.

-- 
Glynn Clements <[EMAIL PROTECTED]>

Reply via email to