April 2005
Intermediate to advanced
344 pages
11h 59m
English
pcap_next — Prototype: const u_char *pcap_next(pcap_t *p, struct pcap_pkthdr *h)
Purpose: pcap_next reads the next packet available
on the buffer. This is a wrapper to pcap_dispatch
called with a cnt of 1. If
successful, pcap_next returns a pointer to the
captured packet. If the read was not successful for any reason, no
packet was available due to a timeout, or no packets passed a filter,
pcap_next returns NULL. No
packet header information is returned for this function. Because no
error messages are returned by pcap_next, it is
more suited to simple uses and for reading from dump files. Use
pcap_next_ex if you need error handling.
Read now
Unlock full access