xref: /illumos-gate/usr/src/cmd/ipf/lib/common/pcap-ipf.h (revision 7c478bd9)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
11 
12 /*
13  * This header file is constructed to match the version described by
14  * PCAP_VERSION_MAJ.
15  *
16  * The structure largely derives from libpcap which wouldn't include
17  * nicely without bpf.
18  */
19 typedef	struct	pcap_filehdr	{
20 	u_int	pc_id;
21 	u_short	pc_v_maj;
22 	u_short	pc_v_min;
23 	u_int	pc_zone;
24 	u_int	pc_sigfigs;
25 	u_int	pc_slen;
26 	u_int	pc_type;
27 } pcaphdr_t;
28 
29 #define	TCPDUMP_MAGIC		0xa1b2c3d4
30 
31 #define	PCAP_VERSION_MAJ	2
32 
33 typedef	struct	pcap_pkthdr	{
34 	struct	timeval	ph_ts;
35 	u_int	ph_clen;
36 	u_int	ph_len;
37 } pcappkt_t;
38 
39