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