5 /***************************************************************************
6 NetworkInstruments.h - description
8 begin : Wed Oct 29 2003
9 copyright : (C) 2003 by root
10 email : scotte[AT}netinst.com
11 ***************************************************************************/
13 /***************************************************************************
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. *
20 ***************************************************************************/
22 #ifndef __NETWORK_INSTRUMENTS_H__
23 #define __NETWORK_INSTRUMENTS_H__
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, int *err);
29 typedef struct capture_file_header
31 char observer_version[32];
32 guint16 offset_to_first_packet;
34 guint8 number_of_information_elements; /* number of TLVs in the header */
35 } capture_file_header;
37 typedef struct tlv_header
40 guint16 length; /* includes the length of the TLV header */
46 #define INFORMATION_TYPE_ALIAS_LIST 0x01
47 #define INFORMATION_TYPE_COMMENT 0x02 /* ASCII text */
49 typedef struct packet_entry_header
52 guint32 network_speed;
53 guint16 captured_size;
55 guint16 offset_to_frame;
56 guint16 offset_to_next_packet;
59 guint8 number_of_information_elements; /* number of TLVs in the header */
63 guint64 packet_number;
64 guint64 original_packet_number;
65 guint64 nano_seconds_since_2000;
66 } packet_entry_header;
69 * Network type values.
71 #define OBSERVER_UNDEFINED 0xFF
72 #define OBSERVER_ETHERNET 0x00
73 #define OBSERVER_TOKENRING 0x01
74 #define OBSERVER_FDDI 0x02
79 #define PACKET_TYPE_DATA_PACKET 0
80 #define PACKET_TYPE_EXPERT_INFORMATION_PACKET 1
83 * The Observer document indicates that the types of expert information
86 * Network Load (markers used by Expert Time Interval and What If
89 * Start/Stop Packet Capture marker frames (with time stamps when
90 * captures start and stop)
92 * Wireless Channel Change (markers showing what channel was being
93 * currently listened to)
95 * That information appears to be contained in TLVs.
101 #define INFORMATION_TYPE_NETWORK_LOAD 0x0100
102 #define INFORMATION_TYPE_CAPTURE_START_STOP 0x0104
105 * Might some of these be broadcast and multicast packet counts?
107 typedef struct tlv_network_load
109 guint32 utilization; /* network utilization, in .1% units */
112 guint32 packets_per_second;
114 guint32 bytes_per_second;
118 typedef struct tlv_capture_start_stop
121 } tlv_capture_start_stop;
123 #define START_STOP_TYPE_STOP 0
124 #define START_STOP_TYPE_START 1