April 2005
Intermediate to advanced
344 pages
11h 59m
English
pcap_next_ex — Prototype: int
pcap_next_ex(pcap_t
*p, struct
pcap_pkthdr
**pkt_header, const
u_char
**pkt_data)
Purpose: pcap_next_ex returns the next packet
available on the buffer. If successful, the function returns
1, and pkt_header and
pkt_data point to the captured
packet’s libpcap capture
information header and the packet, respectively. If not successful,
the function returns 0 if the timeout expired,
-1 if an error occurred reading the packet, or
-2 if the packet is being read from a saved file
and there are no more packets to read.
Read now
Unlock full access