pcap-ipf.h revision 255332
1145519Sdarrenr/* $FreeBSD: head/contrib/ipfilter/pcap-ipf.h 255332 2013-09-06 23:11:19Z cy $ */ 2145510Sdarrenr 3145510Sdarrenr/* 4255332Scy * Copyright (C) 2012 by Darren Reed. 5145510Sdarrenr * 6145510Sdarrenr * See the IPFILTER.LICENCE file for details on licencing. 7145510Sdarrenr * 8145510Sdarrenr */ 9145510Sdarrenr/* 10145510Sdarrenr * This header file is constructed to match the version described by 11145510Sdarrenr * PCAP_VERSION_MAJ. 12145510Sdarrenr * 13145510Sdarrenr * The structure largely derives from libpcap which wouldn't include 14145510Sdarrenr * nicely without bpf. 15145510Sdarrenr */ 16145510Sdarrenrtypedef struct pcap_filehdr { 17145510Sdarrenr u_int pc_id; 18145510Sdarrenr u_short pc_v_maj; 19145510Sdarrenr u_short pc_v_min; 20145510Sdarrenr u_int pc_zone; 21145510Sdarrenr u_int pc_sigfigs; 22145510Sdarrenr u_int pc_slen; 23145510Sdarrenr u_int pc_type; 24145510Sdarrenr} pcaphdr_t; 25145510Sdarrenr 26145510Sdarrenr#define TCPDUMP_MAGIC 0xa1b2c3d4 27145510Sdarrenr 28145510Sdarrenr#define PCAP_VERSION_MAJ 2 29145510Sdarrenr 30145510Sdarrenrtypedef struct pcap_pkthdr { 31145510Sdarrenr struct timeval ph_ts; 32145510Sdarrenr u_int ph_clen; 33145510Sdarrenr u_int ph_len; 34145510Sdarrenr} pcappkt_t; 35145510Sdarrenr 36