xref: /illumos-gate/usr/src/cmd/ipf/lib/pcap-ipf.h (revision f3ac6781)
1 /*
2  * Copyright (C) 1993-2001, 2003 by Darren Reed.
3  *
4  * See the IPFILTER.LICENCE file for details on licencing.
5  *
6  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
7  * Use is subject to license terms.
8  */
9 
10 /*
11  * This header file is constructed to match the version described by
12  * PCAP_VERSION_MAJ.
13  *
14  * The structure largely derives from libpcap which wouldn't include
15  * nicely without bpf.
16  */
17 typedef	struct	pcap_filehdr	{
18 	u_int	pc_id;
19 	u_short	pc_v_maj;
20 	u_short	pc_v_min;
21 	u_int	pc_zone;
22 	u_int	pc_sigfigs;
23 	u_int	pc_slen;
24 	u_int	pc_type;
25 } pcaphdr_t;
26 
27 #define	TCPDUMP_MAGIC		0xa1b2c3d4
28 
29 #define	PCAP_VERSION_MAJ	2
30 
31 typedef	struct	pcap_pkthdr	{
32 	struct	timeval	ph_ts;
33 	u_int	ph_clen;
34 	u_int	ph_len;
35 } pcappkt_t;
36 
37