From Danny Breton: Property name time-synchronization-interval(204) is incorrectly...
[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 #ifdef HAVE_SYS_TIME_H
30 #include <sys/time.h>
31 #endif
32
33 #include <glib.h>
34
35 typedef struct {
36   time_t start_time;
37   time_t secs;
38   int usecs;
39   guint32 caplen;
40   guint32 len;
41 } ascend_pkthdr;
42
43 extern int at_eof;
44
45 extern const gchar *ascend_parse_error;
46
47 /*
48  * Pointer to the pseudo-header for the current packet.
49  */
50 extern struct ascend_phdr *pseudo_header;
51
52 /* Here we provide interfaces to make our scanner act and look like lex */
53 int ascendlex(void);
54
55 void init_parse_ascend(void);
56 void ascend_init_lexer(FILE_T fh);
57 typedef enum {
58     PARSED_RECORD,
59     PARSED_NONRECORD,
60     PARSE_FAILED
61 } parse_t;
62 parse_t parse_ascend(FILE_T fh, guint8 *pd, struct ascend_phdr *phdr,
63                 ascend_pkthdr *hdr, gint64 *start_of_data);
64
65 #endif /* ! __ASCEND_INT_H__ */