source: lib/pcap_open_dead.c @ a21af3d

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

Kill dead (commented out) code

  • Property mode set to 100644
File size: 477 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    p->snapshot = snaplen;
21    p->linktype = linktype;
22    return p;
23}
24#endif
25#endif
Note: See TracBrowser for help on using the repository browser.