dect
/
libpcap
Archived
13
0
Fork 0

Move "union thdr" to pcap-int.h, as we use it in pcap-int.h.

This commit is contained in:
Guy Harris 2009-03-25 08:48:57 -07:00
parent 54ef309e92
commit 64b88abf98
2 changed files with 8 additions and 6 deletions

View File

@ -109,6 +109,14 @@ struct pcap_sf {
u_char *base;
};
#ifdef linux
union thdr {
struct tpacket_hdr *h1;
struct tpacket2_hdr *h2;
void *raw;
};
#endif
/*
* Used when doing a live capture.
*/

View File

@ -245,12 +245,6 @@ static int pcap_setfilter_linux(pcap_t *, struct bpf_program *);
static int pcap_setdirection_linux(pcap_t *, pcap_direction_t);
static void pcap_cleanup_linux(pcap_t *);
union thdr {
struct tpacket_hdr *h1;
struct tpacket2_hdr *h2;
void *raw;
};
#ifdef HAVE_PACKET_RING
#define RING_GET_FRAME(h) (((union thdr **)h->buffer)[h->offset])