pcap-ipf.h revision 256281
1205147Sedwin/* $FreeBSD: stable/10/contrib/ipfilter/pcap-ipf.h 255332 2013-09-06 23:11:19Z cy $ */ 2205147Sedwin 3205147Sedwin/* 4205147Sedwin * Copyright (C) 2012 by Darren Reed. 5205147Sedwin * 6205147Sedwin * See the IPFILTER.LICENCE file for details on licencing. 7205147Sedwin * 8205147Sedwin */ 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