This patch
[obnox/wireshark/wip.git] / wiretap / pcap-common.h
1 /* pcap-common.h
2  * Declarations for code common to libpcap and pcap-NG file formats
3  *
4  * $Id$
5  *
6  * Wiretap Library
7  * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
8  *
9  * File format support for pcap-ng file format
10  * Copyright (c) 2007 by Ulf Lamping <ulf.lamping@web.de>
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation; either version 2
15  * of the License, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25  */
26
27 extern int wtap_wtap_encap_to_pcap_encap(int encap);
28
29 extern int pcap_process_pseudo_header(wtap *wth, int encap, FILE_T fh, guint packet_size,
30     gboolean check_packet_size, struct wtap_pkthdr *phdr,
31     union wtap_pseudo_header *pseudo_header, int *err, gchar **err_info);
32
33 extern int pcap_get_phdr_size(int encap,
34     const union wtap_pseudo_header *pseudo_header);
35
36 extern gboolean pcap_write_phdr(wtap_dumper *wdh, int encap,
37     const union wtap_pseudo_header *pseudo_header, int *err);