source: lib/pcap_open_dead.c @ e0184a5

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since e0184a5 was 916bba7, checked in by Perry Lorier <perry@…>, 15 years ago

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

  • Property mode set to 100644
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.