Get rid of the fd member of a wth structure; the FILE_T's in that
[obnox/wireshark/wip.git] / wiretap / ascend-int.h
1 /* ascend-int.h
2  * Definitions for routines common to multiple modules in the Lucent/Ascend
3  * capture file reading code code, but not used outside that code.
4  *
5  * $Id$
6  *
7  * Wireshark - Network traffic analyzer
8  * By Gerald Combs <gerald@wireshark.org>
9  * Copyright 1998 Gerald Combs
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24  */
25
26 #ifndef __ASCEND_INT_H__
27 #define __ASCEND_INT_H__
28
29 typedef struct {
30   time_t start_time;
31   time_t secs;
32   int usecs;
33   guint32 caplen;
34   guint32 len;
35 } ascend_pkthdr;
36
37 extern int at_eof;
38
39 extern const gchar *ascend_parse_error;
40
41 /*
42  * Pointer to the pseudo-header for the current packet.
43  */
44 extern struct ascend_phdr *pseudo_header;
45
46 /* Here we provide interfaces to make our scanner act and look like lex */
47 int ascendlex(void);
48
49 void init_parse_ascend(void);
50 void ascend_init_lexer(FILE_T fh);
51 typedef enum {
52     PARSED_RECORD,
53     PARSED_NONRECORD,
54     PARSE_FAILED
55 } parse_t;
56 parse_t parse_ascend(FILE_T fh, guint8 *pd, struct ascend_phdr *phdr,
57                 ascend_pkthdr *hdr, gint64 *start_of_data);
58
59 #endif /* ! __ASCEND_INT_H__ */