summaryrefslogtreecommitdiffstats
path: root/test cases/frameworks/19 pcap/pcap_prog.c
blob: 0fca16cca04deca905498b8f4ddb50f3d69a448f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <pcap/pcap.h>

int
main()
{
    char errbuf[PCAP_ERRBUF_SIZE];
#ifdef __APPLE__
    // source = NULL for "any" doesn't work on macOS (linux only?)
    char *source = "en0";
#else
    char *source = NULL;
#endif
    pcap_t *p = pcap_create(source, errbuf);
    return p == NULL;
}