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