1PCAP_LOOKUPDEV(3PCAP) PCAP_LOOKUPDEV(3PCAP)
2
3
4
6 pcap_lookupdev - find the default device on which to capture
7
9 #include <pcap/pcap.h>
10
11 char errbuf[PCAP_ERRBUF_SIZE];
12
13 char *pcap_lookupdev(char *errbuf);
14
16 pcap_lookupdev() returns a pointer to a string giving the name of a
17 network device suitable for use with pcap_create() and pcap_activate(),
18 or with pcap_open_live(), and with pcap_lookupnet(). If there is an
19 error, NULL is returned and errbuf is filled in with an appropriate
20 error message. errbuf is assumed to be able to hold at least
21 PCAP_ERRBUF_SIZE chars.
22
24 pcap(3PCAP), pcap_create(3PCAP), pcap_activate(3PCAP),
25 pcap_open_live(3PCAP), pcap_lookupnet(3PCAP)
26
27
28
29 5 April 2008 PCAP_LOOKUPDEV(3PCAP)