#ifdef HAVE_PCAP #include "config.h" #ifndef HAVE_PCAP_OPEN_DEAD #include #include #ifdef HAVE_PCAP_INT_H # include #else # error "Need pcap-int.h for declaration of pcap_t" #endif #include pcap_t *pcap_open_dead(int linktype, int snaplen) { pcap_t *p = NULL; p = (pcap_t *)malloc(sizeof(*p)); if (p == NULL) return NULL; p->snapshot = snaplen; p->linktype = linktype; return p; } #endif #endif