1*d56f51eaSDavid van Moolenbroek /* $NetBSD: sf-pcap.h,v 1.2 2014/11/19 19:33:30 christos Exp $ */ 2*d56f51eaSDavid van Moolenbroek 3*d56f51eaSDavid van Moolenbroek /* 4*d56f51eaSDavid van Moolenbroek * Copyright (c) 1993, 1994, 1995, 1996, 1997 5*d56f51eaSDavid van Moolenbroek * The Regents of the University of California. All rights reserved. 6*d56f51eaSDavid van Moolenbroek * 7*d56f51eaSDavid van Moolenbroek * Redistribution and use in source and binary forms, with or without 8*d56f51eaSDavid van Moolenbroek * modification, are permitted provided that: (1) source code distributions 9*d56f51eaSDavid van Moolenbroek * retain the above copyright notice and this paragraph in its entirety, (2) 10*d56f51eaSDavid van Moolenbroek * distributions including binary code include the above copyright notice and 11*d56f51eaSDavid van Moolenbroek * this paragraph in its entirety in the documentation or other materials 12*d56f51eaSDavid van Moolenbroek * provided with the distribution, and (3) all advertising materials mentioning 13*d56f51eaSDavid van Moolenbroek * features or use of this software display the following acknowledgement: 14*d56f51eaSDavid van Moolenbroek * ``This product includes software developed by the University of California, 15*d56f51eaSDavid van Moolenbroek * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 16*d56f51eaSDavid van Moolenbroek * the University nor the names of its contributors may be used to endorse 17*d56f51eaSDavid van Moolenbroek * or promote products derived from this software without specific prior 18*d56f51eaSDavid van Moolenbroek * written permission. 19*d56f51eaSDavid van Moolenbroek * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 20*d56f51eaSDavid van Moolenbroek * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 21*d56f51eaSDavid van Moolenbroek * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 22*d56f51eaSDavid van Moolenbroek * 23*d56f51eaSDavid van Moolenbroek * sf-pcap.h - libpcap-file-format-specific routines 24*d56f51eaSDavid van Moolenbroek * Extraction/creation by Jeffrey Mogul, DECWRL 25*d56f51eaSDavid van Moolenbroek * Modified by Steve McCanne, LBL. 26*d56f51eaSDavid van Moolenbroek * 27*d56f51eaSDavid van Moolenbroek * Used to save the received packet headers, after filtering, to 28*d56f51eaSDavid van Moolenbroek * a file, and then read them later. 29*d56f51eaSDavid van Moolenbroek * The first record in the file contains saved values for the machine 30*d56f51eaSDavid van Moolenbroek * dependent values so we can print the dump file on any architecture. 31*d56f51eaSDavid van Moolenbroek */ 32*d56f51eaSDavid van Moolenbroek 33*d56f51eaSDavid van Moolenbroek #ifndef sf_pcap_h 34*d56f51eaSDavid van Moolenbroek #define sf_pcap_h 35*d56f51eaSDavid van Moolenbroek 36*d56f51eaSDavid van Moolenbroek extern pcap_t *pcap_check_header(bpf_u_int32 magic, FILE *fp, 37*d56f51eaSDavid van Moolenbroek u_int precision, char *errbuf, int *err); 38*d56f51eaSDavid van Moolenbroek 39*d56f51eaSDavid van Moolenbroek #endif 40