source: trunk/lib/pcap_open_dead.c @ 977

Last change on this file since 977 was 977, checked in by perry, 7 years ago

If we are included, and we're not using pcap then just skip the entire file

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 510 bytes
Line 
1#ifdef HAVE_PCAP
2#include "config.h"
3
4#ifndef HAVE_PCAP_OPEN_DEAD
5#include <stdio.h>
6#include <pcap.h>
7#ifdef HAVE_PCAP_INT_H
8# include <pcap-int.h>
9#else
10# error "Need pcap-int.h for declaration of pcap_t"
11#endif
12#include <string.h>
13
14pcap_t *pcap_open_dead(int linktype, int snaplen) {
15    pcap_t *p = NULL;
16
17    p = (pcap_t *)malloc(sizeof(*p));
18    if (p == NULL)
19        return NULL;   
20  //  memset (p, 0, sizeof(*p));
21    p->snapshot = snaplen;
22    p->linktype = linktype;
23    return p;
24}
25#endif
26#endif
Note: See TracBrowser for help on using the repository browser.