Set the svn:eol-style property on all text files to "native", so that
[obnox/wireshark/wip.git] / wiretap / network_instruments.h
1 /*
2  * $Id$
3  */
4
5 /***************************************************************************
6                           NetworkInstruments.h  -  description
7                              -------------------
8     begin                : Wed Oct 29 2003
9     copyright            : (C) 2003 by root
10     email                : scotte[AT}netinst.com
11  ***************************************************************************/
12
13 /***************************************************************************
14  *                                                                         *
15  *   This program is free software; you can redistribute it and/or modify  *
16  *   it under the terms of the GNU General Public License as published by  *
17  *   the Free Software Foundation; either version 2 of the License, or     *
18  *   (at your option) any later version.                                   *
19  *                                                                         *
20  ***************************************************************************/
21
22 #ifndef __NETWORK_INSTRUMENTS_H__
23 #define __NETWORK_INSTRUMENTS_H__
24
25 int network_instruments_open(wtap *wth, int *err, gchar **err_info);
26 int network_instruments_dump_can_write_encap(int encap);
27 gboolean network_instruments_dump_open(wtap_dumper *wdh, gboolean cant_seek, int *err);
28
29 typedef struct capture_file_header
30 {
31         char    observer_version[32];
32         guint16 offset_to_first_packet;
33         char    probe_instance;
34         char    extra_information_present;
35 } capture_file_header;
36
37 typedef struct packet_entry_header
38 {
39         guint32 packet_magic;
40         guint32 network_speed;
41         guint16 captured_size;
42         guint16 network_size;
43         guint16 offset_to_frame;
44         guint16 offset_to_next_packet;
45         guint8 network_type;
46         guint8 flags;
47         guint8 extra_information;
48         guint8 packet_type;
49         guint16 errors;
50         guint16 reserved;
51         guint64 packet_number;
52         guint64 original_packet_number;
53         guint64 nano_seconds_since_2000;
54 } packet_entry_header;
55
56 typedef struct tlv_header
57 {
58         guint16 type;
59         guint16 length;
60 } tlv_header;
61
62 typedef struct tlv_alias_list
63 {
64         tlv_header header;
65         char alias_list[1];
66 } tlv_alias_list;
67
68 typedef struct tlv_user_commnent
69 {
70         tlv_header header;
71         char user_comment[1];
72 } tlv_user_comment;
73
74 typedef struct observer_time
75 {
76         guint64 ns_since2000;           /* given in packet_entry_header */
77
78         guint64 us_since2000;           /* Micro-Seconds since 1-1-2000 */
79         guint64 sec_since2000;          /* Seconds since 1-1-2000 */
80
81         time_t seconds_from_1970;
82         guint64 useconds_from_1970;
83
84 } observer_time;
85
86
87 #endif
88