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