request for member `caplen' in `packet_header', which is of
non-aggregate type `const pcap_pkthdr*'
我在程序里定义了pcap_pkthdr 类型的变量 packet_header
然后用packet_header.caplen时报上面的错误
/usr/local/include/pcap.h里是这样定义pcap_pkthdr的
struct pcap_pkthdr {
struct timeval ts; /* time stamp */
bpf_u_int32 caplen; /* length of portion present */
bpf_u_int32 len; /* length this packet (off wire) */
};
请指点一下到底是哪出了问题,谢谢
[ 此贴被XChinux在2006-05-24 17:35重新编辑 ]