pcap-ipf.h revision 145519
1139749Simp/*	$FreeBSD: head/contrib/ipfilter/pcap-ipf.h 145519 2005-04-25 18:20:15Z darrenr $	*/
2158078Smarcel
3158078Smarcel/*
4158078Smarcel * Copyright (C) 1993-2001 by Darren Reed.
5119815Smarcel *
6119815Smarcel * See the IPFILTER.LICENCE file for details on licencing.
7119815Smarcel *
8119815Smarcel */
9119815Smarcel/*
10119815Smarcel * This header file is constructed to match the version described by
11119815Smarcel * PCAP_VERSION_MAJ.
12119815Smarcel *
13119815Smarcel * The structure largely derives from libpcap which wouldn't include
14119815Smarcel * nicely without bpf.
15119815Smarcel */
16119815Smarceltypedef	struct	pcap_filehdr	{
17119815Smarcel	u_int	pc_id;
18119815Smarcel	u_short	pc_v_maj;
19119815Smarcel	u_short	pc_v_min;
20119815Smarcel	u_int	pc_zone;
21119815Smarcel	u_int	pc_sigfigs;
22119815Smarcel	u_int	pc_slen;
23119815Smarcel	u_int	pc_type;
24119815Smarcel} pcaphdr_t;
25119815Smarcel
26119815Smarcel#define	TCPDUMP_MAGIC		0xa1b2c3d4
27119815Smarcel
28119815Smarcel#define	PCAP_VERSION_MAJ	2
29119815Smarcel
30119815Smarceltypedef	struct	pcap_pkthdr	{
31119815Smarcel	struct	timeval	ph_ts;
32119815Smarcel	u_int	ph_clen;
33119815Smarcel	u_int	ph_len;
34119815Smarcel} pcappkt_t;
35119815Smarcel
36119815Smarcel