Add Windows version info resource.
[obnox/wireshark/wip.git] / pcapio.h
1 /* pcapio.h
2  * Declarations of our own routins for writing libpcap files.
3  *
4  * $Id$
5  *
6  * Wireshark - Network traffic analyzer
7  * By Gerald Combs <gerald@wireshark.org>
8  * Copyright 1998 Gerald Combs
9  *
10  * Derived from code in the Wiretap Library
11  * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
26  */
27
28 /* Returns a FILE * to write to on success, NULL on failure; sets "*err" to
29    an error code, or 0 for a short write, on failure */
30 extern FILE *
31 libpcap_fdopen(int fd, int linktype, int snaplen, long *bytes_written,
32     int *err);
33
34 /* Write a record for a packet to a dump file.
35    Returns TRUE on success, FALSE on failure. */
36 extern gboolean
37 libpcap_write_packet(FILE *fp, const struct pcap_pkthdr *phdr, const u_char *pd,
38     long *bytes_written, int *err);
39
40 extern gboolean
41 libpcap_dump_flush(FILE *pd, int *err);
42
43 extern gboolean
44 libpcap_dump_close(FILE *pd, int *err);