Add (missing) "mime" entry to encap_table_base[].
[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 #ifndef __W_PCAP_COMMON_H__
28 #define __W_PCAP_COMMON_H__
29
30 #include <glib.h>
31 #include <wtap.h>
32
33 extern int pcap_process_pseudo_header(FILE_T fh, int file_type, int wtap_encap,
34     guint packet_size, gboolean check_packet_size, struct wtap_pkthdr *phdr,
35     union wtap_pseudo_header *pseudo_header, int *err, gchar **err_info);
36
37 extern void pcap_read_post_process(int file_type, int wtap_encap,
38     union wtap_pseudo_header *pseudo_header,
39     guint8 *pd, guint packet_size, gboolean bytes_swapped, int fcs_len);
40
41 extern int pcap_get_phdr_size(int encap,
42     const union wtap_pseudo_header *pseudo_header);
43
44 extern gboolean pcap_write_phdr(wtap_dumper *wdh, int wtap_encap,
45     const union wtap_pseudo_header *pseudo_header, int *err);
46
47 #endif