15#ifndef __NETWORK_INSTRUMENTS_H__
16#define __NETWORK_INSTRUMENTS_H__
21wtap_open_return_val observer_open(
wtap *wth,
int *err,
char **err_info);
30 char observer_version[31];
31 uint8_t offset_to_first_packet_high_byte;
32 uint16_t offset_to_first_packet;
34 uint8_t number_of_information_elements;
37#define CAPTURE_FILE_HEADER_FROM_LE_IN_PLACE(_capture_file_header) \
38 _capture_file_header.offset_to_first_packet = GUINT16_FROM_LE((_capture_file_header).offset_to_first_packet)
40#define CAPTURE_FILE_HEADER_TO_LE_IN_PLACE(_capture_file_header) \
41 _capture_file_header.offset_to_first_packet = GUINT16_TO_LE((_capture_file_header).offset_to_first_packet)
49#define TLV_HEADER_FROM_LE_IN_PLACE(_tlv_header) \
50 (_tlv_header).type = GUINT16_FROM_LE((_tlv_header).type); \
51 (_tlv_header).length = GUINT16_FROM_LE((_tlv_header).length)
53#define TLV_HEADER_TO_LE_IN_PLACE(_tlv_header) \
54 (_tlv_header).type = GUINT16_TO_LE((_tlv_header).type); \
55 (_tlv_header).length = GUINT16_TO_LE((_tlv_header).length)
93#define INFORMATION_TYPE_ALIAS_LIST 0x0001
94#define INFORMATION_TYPE_COMMENT 0x0002
95#define INFORMATION_TYPE_TIME_INFO 0x0004
96#define INFORMATION_TYPE_REMOTE_PROBE 0x0005
97#define INFORMATION_TYPE_NETWORK_LOAD 0x0100
98#define INFORMATION_TYPE_WIRELESS 0x0101
99#define INFORMATION_TYPE_CAPTURE_START_STOP 0x0104
111 uint32_t time_format;
117#define TIME_INFO_LOCAL 0
118#define TIME_INFO_GMT 1
120#define TLV_TIME_INFO_FROM_LE_IN_PLACE(_tlv_time_info) \
121 (_tlv_time_info).time_format = GUINT32_FROM_LE((_tlv_time_info).time_format)
123#define TLV_TIME_INFO_TO_LE_IN_PLACE(_tlv_time_info) \
124 (_tlv_time_info).time_format = GUINT32_TO_LE((_tlv_time_info).time_format)
132 uint32_t utilization;
135 uint32_t packets_per_second;
137 uint32_t bytes_per_second;
141#define TLV_NETWORK_LOAD_FROM_LE_IN_PLACE(_tlv_network_load) \
142 (_tlv_network_load).utilization = GUINT32_FROM_LE((_tlv_network_load).utilization); \
143 (_tlv_network_load).unknown1 = GUINT32_FROM_LE((_tlv_network_load).unknown1); \
144 (_tlv_network_load).unknown2 = GUINT32_FROM_LE((_tlv_network_load).unknown2); \
145 (_tlv_network_load).packets_per_second = GUINT32_FROM_LE((_tlv_network_load).packets_per_second); \
146 (_tlv_network_load).unknown3 = GUINT32_FROM_LE((_tlv_network_load).unknown3); \
147 (_tlv_network_load).bytes_per_second = GUINT32_FROM_LE((_tlv_network_load).bytes_per_second); \
148 (_tlv_network_load).unknown4 = GUINT32_FROM_LE((_tlv_network_load).unknown4) \
150#define TLV_NETWORK_LOAD_TO_LE_IN_PLACE(_tlv_network_load) \
151 (_tlv_network_load).utilization = GUINT32_TO_LE((_tlv_network_load).utilization); \
152 (_tlv_network_load).unknown1 = GUINT32_TO_LE((_tlv_network_load).unknown1); \
153 (_tlv_network_load).unknown2 = GUINT32_TO_LE((_tlv_network_load).unknown2); \
154 (_tlv_network_load).packets_per_second = GUINT32_TO_LE((_tlv_network_load).packets_per_second); \
155 (_tlv_network_load).unknown3 = GUINT32_TO_LE((_tlv_network_load).unknown3); \
156 (_tlv_network_load).bytes_per_second = GUINT32_TO_LE((_tlv_network_load).bytes_per_second); \
157 (_tlv_network_load).unknown4 = GUINT32_TO_LE((_tlv_network_load).unknown4) \
171 uint8_t signalStrength;
174 uint8_t qualityPercent;
175 uint8_t strengthPercent;
183#define WIRELESS_WEP_SUCCESS 0x80
192#define START_STOP_TYPE_STOP 0
193#define START_STOP_TYPE_START 1
197 uint32_t packet_magic;
198 uint32_t network_speed;
199 uint16_t captured_size;
200 uint16_t network_size;
201 uint16_t offset_to_frame;
202 uint16_t offset_to_next_packet;
203 uint8_t network_type;
205 uint8_t number_of_information_elements;
209 uint64_t packet_number;
210 uint64_t original_packet_number;
211 uint64_t nano_seconds_since_2000;
214#define PACKET_ENTRY_HEADER_FROM_LE_IN_PLACE(_packet_entry_header) \
215 (_packet_entry_header).packet_magic = GUINT32_FROM_LE((_packet_entry_header).packet_magic); \
216 (_packet_entry_header).network_speed = GUINT32_FROM_LE((_packet_entry_header).network_speed); \
217 (_packet_entry_header).captured_size = GUINT16_FROM_LE((_packet_entry_header).captured_size); \
218 (_packet_entry_header).network_size = GUINT16_FROM_LE((_packet_entry_header).network_size); \
219 (_packet_entry_header).offset_to_frame = GUINT16_FROM_LE((_packet_entry_header).offset_to_frame); \
220 (_packet_entry_header).offset_to_next_packet = GUINT16_FROM_LE((_packet_entry_header).offset_to_next_packet); \
221 (_packet_entry_header).errors = GUINT16_FROM_LE((_packet_entry_header).errors); \
222 (_packet_entry_header).reserved = GUINT16_FROM_LE((_packet_entry_header).reserved); \
223 (_packet_entry_header).packet_number = GUINT64_FROM_LE((_packet_entry_header).packet_number); \
224 (_packet_entry_header).original_packet_number = GUINT64_FROM_LE((_packet_entry_header).original_packet_number); \
225 (_packet_entry_header).nano_seconds_since_2000 = GUINT64_FROM_LE((_packet_entry_header).nano_seconds_since_2000)
227#define PACKET_ENTRY_HEADER_TO_LE_IN_PLACE(_packet_entry_header) \
228 (_packet_entry_header).packet_magic = GUINT32_TO_LE((_packet_entry_header).packet_magic); \
229 (_packet_entry_header).network_speed = GUINT32_TO_LE((_packet_entry_header).network_speed); \
230 (_packet_entry_header).captured_size = GUINT16_TO_LE((_packet_entry_header).captured_size); \
231 (_packet_entry_header).network_size = GUINT16_TO_LE((_packet_entry_header).network_size); \
232 (_packet_entry_header).offset_to_frame = GUINT16_TO_LE((_packet_entry_header).offset_to_frame); \
233 (_packet_entry_header).offset_to_next_packet = GUINT16_TO_LE((_packet_entry_header).offset_to_next_packet); \
234 (_packet_entry_header).errors = GUINT16_TO_LE((_packet_entry_header).errors); \
235 (_packet_entry_header).reserved = GUINT16_TO_LE((_packet_entry_header).reserved); \
236 (_packet_entry_header).packet_number = GUINT64_TO_LE((_packet_entry_header).packet_number); \
237 (_packet_entry_header).original_packet_number = GUINT64_TO_LE((_packet_entry_header).original_packet_number); \
238 (_packet_entry_header).nano_seconds_since_2000 = GUINT64_TO_LE((_packet_entry_header).nano_seconds_since_2000)
243#define OBSERVER_UNDEFINED 0xFF
244#define OBSERVER_ETHERNET 0x00
245#define OBSERVER_TOKENRING 0x01
246#define OBSERVER_FIBRE_CHANNEL 0x08
247#define OBSERVER_WIRELESS_802_11 0x09
252#define PACKET_TYPE_DATA_PACKET 0
253#define PACKET_TYPE_EXPERT_INFORMATION_PACKET 1
Definition observer.h:188
Definition observer.h:131
Definition observer.h:108
Definition observer.h:169