Dear sir,

I am a user of libpcap library and have two questions.

I find that the default directory to install the library is
/usr/include/pcap, but the manual show that

PCAP(3)                                                   PCAP(3)

NAME
       pcap - Packet Capture library

SYNOPSIS
       #include <pcap.h>
            ...

as well as the 42nd line of the file 'pcap.h' being
"#include <net/bpf.h>".

Then some errors will be reported while a file with
#include "pcap.h" compiled.

A second question is that
I see only one line about 'pcap_dumper' in the library.

[yanya@cpt libpcap-0.4]$ find . -type f | xargs grep 'pcap_dumper '
./pcap.h:typedef struct pcap_dumper pcap_dumper_t;

And no declaration or definition for struct pcap_dumper.
The following is what I confront to compile file ttt_pcap.c

[yanya@cpt libpcap-0.4]$ more VERSION
0.4
[yanya@cpt libpcap-0.4]$ more ttt_pcap.c
#include <pcap/pcap.h>

int main(void){
    pcap_t  *p, p1;
    pcap_dumper_t *pdt, pdt1;

    exit (0);
}

[yanya@cpt libpcap-0.4]$ gcc ttt_pcap.c -lpcap
ttt_pcap.c: In function `main':
ttt_pcap.c:4: storage size of `p1' isn't known
ttt_pcap.c:5: storage size of `pdt1' isn't known
[yanya@cpt libpcap-0.4]$

Are them bugs or my own faults to use the library?

Many thanks!
Best regards!

Y.A. Yan



-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe

Reply via email to