17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * Copyright (C) 1993-2001, 2003 by Darren Reed. 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * See the IPFILTER.LICENCE file for details on licencing. 57c478bd9Sstevel@tonic-gate * 67c478bd9Sstevel@tonic-gate * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 77c478bd9Sstevel@tonic-gate * Use is subject to license terms. 87c478bd9Sstevel@tonic-gate */ 97c478bd9Sstevel@tonic-gate 107c478bd9Sstevel@tonic-gate /* 117c478bd9Sstevel@tonic-gate * This header file is constructed to match the version described by 127c478bd9Sstevel@tonic-gate * PCAP_VERSION_MAJ. 137c478bd9Sstevel@tonic-gate * 147c478bd9Sstevel@tonic-gate * The structure largely derives from libpcap which wouldn't include 157c478bd9Sstevel@tonic-gate * nicely without bpf. 167c478bd9Sstevel@tonic-gate */ 177c478bd9Sstevel@tonic-gate typedef struct pcap_filehdr { 187c478bd9Sstevel@tonic-gate u_int pc_id; 197c478bd9Sstevel@tonic-gate u_short pc_v_maj; 207c478bd9Sstevel@tonic-gate u_short pc_v_min; 217c478bd9Sstevel@tonic-gate u_int pc_zone; 227c478bd9Sstevel@tonic-gate u_int pc_sigfigs; 237c478bd9Sstevel@tonic-gate u_int pc_slen; 247c478bd9Sstevel@tonic-gate u_int pc_type; 257c478bd9Sstevel@tonic-gate } pcaphdr_t; 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate #define TCPDUMP_MAGIC 0xa1b2c3d4 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate #define PCAP_VERSION_MAJ 2 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gate typedef struct pcap_pkthdr { 327c478bd9Sstevel@tonic-gate struct timeval ph_ts; 337c478bd9Sstevel@tonic-gate u_int ph_clen; 347c478bd9Sstevel@tonic-gate u_int ph_len; 357c478bd9Sstevel@tonic-gate } pcappkt_t; 367c478bd9Sstevel@tonic-gate 37