xref: /freebsd/sbin/ipf/common/pcap-ipf.h (revision e1c4c8dd8d2d10b6104f06856a77bd5b4813a801)
1 
2 /*
3  * Copyright (C) 2012 by Darren Reed.
4  *
5  * See the IPFILTER.LICENCE file for details on licencing.
6  *
7  */
8 /*
9  * This header file is constructed to match the version described by
10  * PCAP_VERSION_MAJ.
11  *
12  * The structure largely derives from libpcap which wouldn't include
13  * nicely without bpf.
14  */
15 typedef	struct	pcap_filehdr	{
16 	u_int	pc_id;
17 	u_short	pc_v_maj;
18 	u_short	pc_v_min;
19 	u_int	pc_zone;
20 	u_int	pc_sigfigs;
21 	u_int	pc_slen;
22 	u_int	pc_type;
23 } pcaphdr_t;
24 
25 #define	TCPDUMP_MAGIC		0xa1b2c3d4
26 
27 #define	PCAP_VERSION_MAJ	2
28 
29 typedef	struct	pcap_pkthdr	{
30 	struct	timeval	ph_ts;
31 	u_int	ph_clen;
32 	u_int	ph_len;
33 } pcappkt_t;
34 
35