Name
pcap_findalldevs — Prototype: int pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
Synopsis
Purpose: pcap_findalldevs
finds all usable (active
and supported by libpcap) interfaces for use
with pcap_open_live
. If successful, the function
returns 0
and alldevsp
points
to a linked list of pcap_if_t
structures with
interface details. If not successful, the function returns
-1
and errbuf
is populated with
a human-readable error message. You can find an example of utilizing
the information returned by pcap_findalldevs
in
the Section 10.2.2
section earlier in this chapter.
Get Network Security Tools now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.