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