1*41edb306SCy Schubert /* $FreeBSD$ */ 2*41edb306SCy Schubert 3*41edb306SCy Schubert /* 4*41edb306SCy Schubert * Copyright (C) 2012 by Darren Reed. 5*41edb306SCy Schubert * 6*41edb306SCy Schubert * See the IPFILTER.LICENCE file for details on licencing. 7*41edb306SCy Schubert * 8*41edb306SCy Schubert */ 9*41edb306SCy Schubert /* 10*41edb306SCy Schubert * This header file is constructed to match the version described by 11*41edb306SCy Schubert * PCAP_VERSION_MAJ. 12*41edb306SCy Schubert * 13*41edb306SCy Schubert * The structure largely derives from libpcap which wouldn't include 14*41edb306SCy Schubert * nicely without bpf. 15*41edb306SCy Schubert */ 16*41edb306SCy Schubert typedef struct pcap_filehdr { 17*41edb306SCy Schubert u_int pc_id; 18*41edb306SCy Schubert u_short pc_v_maj; 19*41edb306SCy Schubert u_short pc_v_min; 20*41edb306SCy Schubert u_int pc_zone; 21*41edb306SCy Schubert u_int pc_sigfigs; 22*41edb306SCy Schubert u_int pc_slen; 23*41edb306SCy Schubert u_int pc_type; 24*41edb306SCy Schubert } pcaphdr_t; 25*41edb306SCy Schubert 26*41edb306SCy Schubert #define TCPDUMP_MAGIC 0xa1b2c3d4 27*41edb306SCy Schubert 28*41edb306SCy Schubert #define PCAP_VERSION_MAJ 2 29*41edb306SCy Schubert 30*41edb306SCy Schubert typedef struct pcap_pkthdr { 31*41edb306SCy Schubert struct timeval ph_ts; 32*41edb306SCy Schubert u_int ph_clen; 33*41edb306SCy Schubert u_int ph_len; 34*41edb306SCy Schubert } pcappkt_t; 35*41edb306SCy Schubert 36