3 * Copyright 2002, Tazmen Technologies Inc
5 * Tazmen Sniffer Protocol for encapsulating the packets across a network
6 * from a remote packet sniffer. TZSP can encapsulate any other protocol.
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * SPDX-License-Identifier: GPL-2.0-or-later
17 #include <epan/packet.h>
19 #include <wsutil/array.h>
20 #include <wiretap/wtap.h>
25 * http://web.archive.org/web/20050404125022/http://www.networkchemistry.com/support/appnotes/an001_tzsp.html
27 * for a description of the protocol.
30 #define UDP_PORT_TZSP 0x9090 /* Not IANA registered */
32 void proto_register_tzsp(void);
33 void proto_reg_handoff_tzsp(void);
35 static int proto_tzsp
;
36 static int hf_tzsp_version
;
37 static int hf_tzsp_type
;
38 static int hf_tzsp_encap
;
40 static dissector_table_t tzsp_encap_table
;
42 static dissector_handle_t tzsp_handle
;
47 #define TZSP_RX_PACKET 0 /* Packet received from the sensor */
48 #define TZSP_TX_PACKET 1 /* Packet for the sensor to transmit */
49 #define TZSP_CONFIG 3 /* Configuration information for the sensor */
50 #define TZSP_NULL 4 /* Null frame, used as a keepalive */
51 #define TZSP_PORT 5 /* Port opener - opens a NAT tunnel */
53 static const value_string tzsp_type
[] = {
54 {TZSP_RX_PACKET
, "Received packet"},
55 {TZSP_TX_PACKET
, "Packet for transmit"},
56 {TZSP_CONFIG
, "Configuration"},
57 {TZSP_NULL
, "Keepalive"},
58 {TZSP_PORT
, "Port opener"},
62 /* ************************************************************************* */
63 /* Encapsulation type values */
64 /* Note that these are not all the same as DLT_ values */
65 /* ************************************************************************* */
67 #define TZSP_ENCAP_ETHERNET 1
68 #define TZSP_ENCAP_TOKEN_RING 2
69 #define TZSP_ENCAP_SLIP 3
70 #define TZSP_ENCAP_PPP 4
71 #define TZSP_ENCAP_FDDI 5
72 #define TZSP_ENCAP_RAW 7 /* "Raw UO", presumably meaning "Raw IP" */
73 #define TZSP_ENCAP_IEEE_802_11 18
74 #define TZSP_ENCAP_IEEE_802_11_PRISM 119
75 #define TZSP_ENCAP_IEEE_802_11_RADIOTAP 126
76 #define TZSP_ENCAP_IEEE_802_11_AVS 127
79 * Packet encapsulations.
81 static const value_string tzsp_encapsulation
[] = {
82 {TZSP_ENCAP_ETHERNET
, "Ethernet"},
83 {TZSP_ENCAP_TOKEN_RING
, "Token Ring"},
84 {TZSP_ENCAP_SLIP
, "SLIP"},
85 {TZSP_ENCAP_PPP
, "PPP"},
86 {TZSP_ENCAP_FDDI
, "FDDI"},
87 {TZSP_ENCAP_RAW
, "Raw IP"},
88 {TZSP_ENCAP_IEEE_802_11
, "IEEE 802.11"},
89 {TZSP_ENCAP_IEEE_802_11_PRISM
, "IEEE 802.11 with Prism headers"},
90 {TZSP_ENCAP_IEEE_802_11_RADIOTAP
, "IEEE 802.11 with radiotap headers"},
91 {TZSP_ENCAP_IEEE_802_11_AVS
, "IEEE 802.11 with AVS headers"},
98 /* ************************************************************************* */
99 /* WLAN radio header fields */
100 /* ************************************************************************* */
102 static int hf_option_tag
;
103 static int hf_option_length
;
104 /* static int hf_status_field; */
105 static int hf_status_msg_type
;
106 static int hf_status_pcf
;
107 /* static int hf_status_mac_port; */
108 static int hf_status_undecrypted
;
109 static int hf_status_fcs_error
;
112 static int hf_silence
;
113 static int hf_signal
;
115 static int hf_channel
;
116 static int hf_unknown
;
117 static int hf_original_length
;
118 static int hf_sensormac
;
120 static int hf_device_name
;
121 static int hf_capture_location
;
122 static int hf_capture_info
;
123 static int hf_capture_id
;
124 static int hf_time_stamp
;
125 static int hf_packet_id
;
129 /* ************************************************************************* */
130 /* Generic header options */
131 /* ************************************************************************* */
133 #define TZSP_HDR_PAD 0 /* Pad. */
134 #define TZSP_HDR_END 1 /* End of the list. */
135 #define TZSP_WLAN_STA 30 /* Station statistics */
136 #define TZSP_WLAN_PKT 31 /* Packet statistics */
137 #define TZSP_PACKET_ID 40 /* Unique ID of the packet */
138 #define TZSP_HDR_ORIGINAL_LENGTH 41 /* Length of the packet before slicing. 2 bytes. */
139 #define TZSP_HDR_SENSOR 60 /* Sensor MAC address packet was received on, 6 byte ethernet address.*/
141 #define TZSP_DEVICE_NAME 80
142 #define TZSP_CAPTURE_LOCATION 81
143 #define TZSP_TIME_STAMP 82
144 #define TZSP_INFO 83 /* Addition TZSP Information; String type*/
145 #define TZSP_CAPTURE_ID 84 /* Capture Instance ID; 32 bits unsigned integer */
150 /* ************************************************************************* */
151 /* Options for 802.11 radios */
152 /* ************************************************************************* */
154 #define WLAN_RADIO_HDR_SIGNAL 10 /* Signal strength in dBm, signed byte. */
155 #define WLAN_RADIO_HDR_NOISE 11 /* Noise level in dBm, signed byte. */
156 #define WLAN_RADIO_HDR_RATE 12 /* Data rate, unsigned byte. */
157 #define WLAN_RADIO_HDR_TIMESTAMP 13 /* Timestamp in us, unsigned 32-bits network byte order. */
158 #define WLAN_RADIO_HDR_MSG_TYPE 14 /* Packet type, unsigned byte. */
159 #define WLAN_RADIO_HDR_CF 15 /* Whether packet arrived during CF period, unsigned byte. */
160 #define WLAN_RADIO_HDR_UN_DECR 16 /* Whether packet could not be decrypted by MAC, unsigned byte. */
161 #define WLAN_RADIO_HDR_FCS_ERR 17 /* Whether packet contains an FCS error, unsigned byte. */
162 #define WLAN_RADIO_HDR_CHANNEL 18 /* Channel number packet was received on, unsigned byte.*/
164 static const value_string option_tag_vals
[] = {
165 {TZSP_HDR_PAD
, "Pad"},
166 {TZSP_HDR_END
, "End"},
167 {TZSP_PACKET_ID
, "packet ID"},
168 {TZSP_HDR_ORIGINAL_LENGTH
, "Original Length"},
169 {TZSP_DEVICE_NAME
, "Device Name"},
170 {TZSP_CAPTURE_LOCATION
, "Capture Location"},
171 {TZSP_TIME_STAMP
, "Time Stamp"},
172 {TZSP_INFO
, "Information"},
173 {TZSP_CAPTURE_ID
, "Capture ID"},
174 {WLAN_RADIO_HDR_SIGNAL
, "Signal"},
175 {WLAN_RADIO_HDR_NOISE
, "Silence"},
176 {WLAN_RADIO_HDR_RATE
, "Rate"},
177 {WLAN_RADIO_HDR_TIMESTAMP
, "Time"},
178 {WLAN_RADIO_HDR_MSG_TYPE
, "Message Type"},
179 {WLAN_RADIO_HDR_CF
, "Point Coordination Function"},
180 {WLAN_RADIO_HDR_UN_DECR
, "Undecrypted"},
181 {WLAN_RADIO_HDR_FCS_ERR
, "Frame check sequence"},
182 {WLAN_RADIO_HDR_CHANNEL
, "Channel"},
183 {TZSP_HDR_SENSOR
, "Sensor MAC"},
188 /* ************************************************************************* */
189 /* Add option information to the display */
190 /* ************************************************************************* */
193 add_option_info(tvbuff_t
*tvb
, int pos
, proto_tree
*tree
, proto_item
*ti
)
195 uint8_t tag
, length
, fcs_err
= 0, encr
= 0, seen_fcs_err
= 0;
196 proto_tree
*tag_tree
;
199 * Read all option tags in an endless loop. If the packet is malformed this
200 * loop might be a problem.
203 tag
= tvb_get_uint8(tvb
, pos
);
204 if ((tag
!= TZSP_HDR_PAD
) && (tag
!= TZSP_HDR_END
)) {
205 length
= tvb_get_uint8(tvb
, pos
+1);
206 tag_tree
= proto_tree_add_subtree(tree
, tvb
, pos
, 2+length
, ett_tag
, NULL
, val_to_str_const(tag
, option_tag_vals
, "Unknown"));
208 tag_tree
= proto_tree_add_subtree(tree
, tvb
, pos
, 1, ett_tag
, NULL
, val_to_str_const(tag
, option_tag_vals
, "Unknown"));
212 proto_tree_add_item(tag_tree
, hf_option_tag
, tvb
, pos
, 1, ENC_BIG_ENDIAN
);
214 if ((tag
!= TZSP_HDR_PAD
) && (tag
!= TZSP_HDR_END
)) {
215 proto_tree_add_item(tag_tree
, hf_option_length
, tvb
, pos
, 1, ENC_BIG_ENDIAN
);
224 /* Fill in header with information from other tags. */
226 proto_item_append_text(ti
,"%s", fcs_err
?"FCS Error":(encr
?"Encrypted":"Good"));
231 proto_tree_add_item(tag_tree
, hf_packet_id
, tvb
, pos
, 4, ENC_BIG_ENDIAN
);
234 case TZSP_HDR_ORIGINAL_LENGTH
:
235 proto_tree_add_item(tag_tree
, hf_original_length
, tvb
, pos
, 2, ENC_BIG_ENDIAN
);
238 case TZSP_DEVICE_NAME
:
239 proto_tree_add_item(tag_tree
, hf_device_name
, tvb
, pos
, length
, ENC_ASCII
);
242 case TZSP_CAPTURE_LOCATION
:
243 proto_tree_add_item(tag_tree
, hf_capture_location
, tvb
, pos
, length
, ENC_ASCII
);
247 proto_tree_add_item(tag_tree
, hf_capture_info
, tvb
, pos
, length
, ENC_ASCII
);
250 case TZSP_CAPTURE_ID
:
251 proto_tree_add_item(tag_tree
, hf_capture_id
, tvb
, pos
, 4, ENC_BIG_ENDIAN
);
254 case TZSP_TIME_STAMP
:
255 proto_tree_add_item(tag_tree
, hf_time_stamp
, tvb
, pos
, length
, ENC_TIME_SECS_NSECS
|ENC_BIG_ENDIAN
);
259 case WLAN_RADIO_HDR_SIGNAL
:
260 proto_tree_add_item(tag_tree
, hf_signal
, tvb
, pos
, 1, ENC_BIG_ENDIAN
);
263 case WLAN_RADIO_HDR_NOISE
:
264 proto_tree_add_item(tag_tree
, hf_silence
, tvb
, pos
, 1, ENC_BIG_ENDIAN
);
267 case WLAN_RADIO_HDR_RATE
:
268 proto_tree_add_item(tag_tree
, hf_rate
, tvb
, pos
, 1, ENC_BIG_ENDIAN
);
271 case WLAN_RADIO_HDR_TIMESTAMP
:
272 proto_tree_add_item(tag_tree
, hf_time
, tvb
, pos
, 4, ENC_BIG_ENDIAN
);
275 case WLAN_RADIO_HDR_MSG_TYPE
:
276 proto_tree_add_item(tag_tree
, hf_status_msg_type
, tvb
, pos
, 1, ENC_BIG_ENDIAN
);
279 case WLAN_RADIO_HDR_CF
:
280 proto_tree_add_item(tag_tree
, hf_status_pcf
, tvb
, pos
, 1, ENC_NA
);
283 case WLAN_RADIO_HDR_UN_DECR
:
284 proto_tree_add_item(tag_tree
, hf_status_undecrypted
, tvb
, pos
, 1, ENC_NA
);
285 encr
= tvb_get_uint8(tvb
, pos
);
288 case WLAN_RADIO_HDR_FCS_ERR
:
290 proto_tree_add_item(tag_tree
, hf_status_fcs_error
, tvb
, pos
, 1, ENC_NA
);
291 fcs_err
= tvb_get_uint8(tvb
, pos
);
294 case WLAN_RADIO_HDR_CHANNEL
:
295 proto_tree_add_item(tag_tree
, hf_channel
, tvb
, pos
, length
, ENC_BIG_ENDIAN
);
298 case TZSP_HDR_SENSOR
:
299 proto_tree_add_item(tag_tree
, hf_sensormac
, tvb
, pos
, 6, ENC_NA
);
303 proto_tree_add_item(tag_tree
, hf_unknown
, tvb
, pos
, length
, ENC_NA
);
311 /* ************************************************************************* */
312 /* Dissect a TZSP packet */
313 /* ************************************************************************* */
316 dissect_tzsp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
318 proto_tree
*tzsp_tree
= NULL
;
319 proto_item
*ti
= NULL
;
322 uint16_t encapsulation
= 0;
326 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "TZSP");
327 col_clear(pinfo
->cinfo
, COL_INFO
);
329 type
= tvb_get_uint8(tvb
, 1);
331 /* Find the encapsulation. */
332 encapsulation
= tvb_get_ntohs(tvb
, 2);
333 info
= val_to_str(encapsulation
, tzsp_encapsulation
, "Unknown (%u)");
335 col_add_str(pinfo
->cinfo
, COL_INFO
, info
);
338 /* Adding TZSP item and subtree */
339 ti
= proto_tree_add_protocol_format(tree
, proto_tzsp
, tvb
, 0,
340 -1, "TZSP: %s ", info
);
341 tzsp_tree
= proto_item_add_subtree(ti
, ett_tzsp
);
343 proto_tree_add_item (tzsp_tree
, hf_tzsp_version
, tvb
, 0, 1,
345 proto_tree_add_uint (tzsp_tree
, hf_tzsp_type
, tvb
, 1, 1,
347 proto_tree_add_uint (tzsp_tree
, hf_tzsp_encap
, tvb
, 2, 2,
352 * XXX - what about TZSP_CONFIG frames?
356 * http://web.archive.org/web/20021221195733/http://www.networkchemistry.com/support/appnotes/SENSOR-MIB
358 * seems to indicate that you can configure the probe using SNMP;
359 * does TZSP_CONFIG also support that? An old version of Kismet
360 * included code to control a Network Chemistry WSP100 sensor:
362 * https://www.kismetwireless.net/code-old/svn/tags/kismet-2004-02-R1/wsp100source.cc
364 * and it used SNMP to configure the probe.
366 if ((type
!= TZSP_NULL
) && (type
!= TZSP_PORT
)) {
367 pos
= add_option_info(tvb
, 4, tzsp_tree
, ti
);
370 proto_item_set_end(ti
, tvb
, pos
);
371 next_tvb
= tvb_new_subset_remaining(tvb
, pos
);
372 if (dissector_try_uint(tzsp_encap_table
, encapsulation
, next_tvb
, pinfo
, tree
) == 0) {
373 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "UNKNOWN");
374 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "TZSP_ENCAP = %u",
376 call_data_dissector(next_tvb
, pinfo
, tree
);
380 return tvb_captured_length(tvb
);
383 /* ************************************************************************* */
384 /* Register the TZSP dissector */
385 /* ************************************************************************* */
388 proto_register_tzsp(void)
390 static const value_string msg_type
[] = {
392 {1, "RFC1042 encoded"},
393 {2, "Bridge-tunnel encoded"},
394 {4, "802.11 management frame"},
398 static const true_false_string pcf_flag
= {
399 "CF: Frame received during CF period",
403 static const true_false_string undecr_flag
= {
404 "Encrypted frame could not be decrypted",
408 static const true_false_string fcs_err_flag
= {
409 "FCS error, frame is corrupted",
413 static const value_string channels
[] = {
415 { 1, "1 (2.412 GHz)"},
416 { 2, "2 (2.417 GHz)"},
417 { 3, "3 (2.422 GHz)"},
418 { 4, "4 (2.427 GHz)"},
419 { 5, "5 (2.432 GHz)"},
420 { 6, "6 (2.437 GHz)"},
421 { 7, "7 (2.442 GHz)"},
422 { 8, "8 (2.447 GHz)"},
423 { 9, "9 (2.452 GHz)"},
424 { 10, "10 (2.457 GHz)"},
425 { 11, "11 (2.462 GHz)"},
426 { 12, "12 (2.467 GHz)"},
427 { 13, "13 (2.472 GHz)"},
428 { 14, "14 (2.484 GHz)"},
430 { 36, "36 (5.180 GHz)"},
431 { 40, "40 (5.200 GHz)"},
432 { 44, "44 (5.220 GHz)"},
433 { 48, "48 (5.240 GHz)"},
434 { 52, "52 (5.260 GHz)"},
435 { 56, "56 (5.280 GHz)"},
436 { 60, "60 (5.300 GHz)"},
437 { 64, "64 (5.320 GHz)"},
438 {149, "149 (5.745 GHz)"},
439 {153, "153 (5.765 GHz)"},
440 {157, "157 (5.785 GHz)"},
441 {161, "161 (5.805 GHz)"},
443 {191, "191 (5.955 GHz)"},
444 {195, "195 (5.975 GHz)"},
445 {199, "199 (5.995 GHz)"},
446 {203, "203 (6.015 GHz)"},
447 {207, "207 (6.035 GHz)"},
448 {211, "211 (6.055 GHz)"},
449 {215, "215 (6.075 GHz)"},
450 {219, "219 (6.095 GHz)"},
451 {223, "223 (6.115 GHz)"},
452 {227, "227 (6.135 GHz)"},
453 {231, "231 (6.155 GHz)"},
454 {235, "235 (6.175 GHz)"},
455 {239, "239 (6.195 GHz)"},
456 {243, "243 (6.215 GHz)"},
457 {247, "247 (6.235 GHz)"},
458 {251, "251 (6.255 GHz)"},
459 {255, "255 (6.275 GHz)"},
460 {259, "259 (6.295 GHz)"},
461 {263, "263 (6.315 GHz)"},
462 {267, "267 (6.335 GHz)"},
463 {271, "271 (6.355 GHz)"},
464 {275, "275 (6.375 GHz)"},
465 {279, "279 (6.395 GHz)"},
466 {283, "283 (6.415 GHz)"},
467 {287, "287 (6.435 GHz)"},
468 {291, "291 (6.455 GHz)"},
469 {295, "295 (6.475 GHz)"},
470 {299, "299 (6.495 GHz)"},
471 {303, "303 (6.515 GHz)"},
472 {307, "307 (6.535 GHz)"},
473 {311, "311 (6.555 GHz)"},
474 {315, "315 (6.575 GHz)"},
475 {319, "319 (6.595 GHz)"},
476 {323, "323 (6.615 GHz)"},
477 {327, "327 (6.635 GHz)"},
478 {331, "331 (6.655 GHz)"},
479 {335, "335 (6.675 GHz)"},
480 {339, "339 (6.695 GHz)"},
481 {343, "343 (6.715 GHz)"},
482 {347, "347 (6.735 GHz)"},
483 {351, "351 (6.755 GHz)"},
484 {355, "355 (6.775 GHz)"},
485 {359, "359 (6.795 GHz)"},
486 {363, "363 (6.815 GHz)"},
487 {367, "367 (6.835 GHz)"},
488 {371, "371 (6.855 GHz)"},
489 {375, "375 (6.875 GHz)"},
490 {379, "379 (6.895 GHz)"},
491 {383, "383 (6.915 GHz)"},
492 {387, "387 (6.935 GHz)"},
493 {391, "391 (6.955 GHz)"},
494 {395, "395 (6.975 GHz)"},
495 {399, "399 (6.995 GHz)"},
496 {403, "403 (7.015 GHz)"},
497 {407, "407 (7.035 GHz)"},
498 {411, "411 (7.055 GHz)"},
499 {415, "415 (7.075 GHz)"},
500 {419, "419 (7.095 GHz)"},
501 {423, "423 (7.115 GHz)"},
505 static const value_string rates
[] = {
506 /* Old PRISM rates */
509 {0x37, "5.5 Mbit/s"},
527 static hf_register_info hf
[] = {
528 { &hf_tzsp_version
, {
529 "Version", "tzsp.version", FT_UINT8
, BASE_DEC
,
530 NULL
, 0, NULL
, HFILL
}},
532 "Type", "tzsp.type", FT_UINT8
, BASE_DEC
,
533 VALS(tzsp_type
), 0, NULL
, HFILL
}},
535 "Encapsulation", "tzsp.encap", FT_UINT16
, BASE_DEC
,
536 VALS(tzsp_encapsulation
), 0, NULL
, HFILL
}},
539 "Option Tag", "tzsp.option_tag", FT_UINT8
, BASE_DEC
,
540 VALS(option_tag_vals
), 0, NULL
, HFILL
}},
541 { &hf_option_length
, {
542 "Option Length", "tzsp.option_length", FT_UINT8
, BASE_DEC
,
543 NULL
, 0, NULL
, HFILL
}},
545 { &hf_status_field
, {
546 "Status", "tzsp.wlan.status", FT_UINT16
, BASE_HEX
,
547 NULL
, 0, NULL
, HFILL
}},
549 { &hf_status_msg_type
, {
550 "Type", "tzsp.wlan.status.msg_type", FT_UINT8
, BASE_HEX
,
551 VALS(msg_type
), 0, "Message type", HFILL
}},
553 { &hf_status_mac_port
, {
554 "Port", "tzsp.wlan.status.mac_port", FT_UINT8
, BASE_DEC
,
555 NULL
, 0, "MAC port", HFILL
}},
558 "PCF", "tzsp.wlan.status.pcf", FT_BOOLEAN
, BASE_NONE
,
559 TFS (&pcf_flag
), 0x0, "Point Coordination Function", HFILL
}},
560 { &hf_status_undecrypted
, {
561 "Undecrypted", "tzsp.wlan.status.undecrypted", FT_BOOLEAN
, BASE_NONE
,
562 TFS (&undecr_flag
), 0x0, NULL
, HFILL
}},
563 { &hf_status_fcs_error
, {
564 "FCS", "tzsp.wlan.status.fcs_err", FT_BOOLEAN
, BASE_NONE
,
565 TFS (&fcs_err_flag
), 0x0, "Frame check sequence", HFILL
}},
567 "Time", "tzsp.wlan.time", FT_UINT32
, BASE_HEX
,
568 NULL
, 0, NULL
, HFILL
}},
570 "Silence", "tzsp.wlan.silence", FT_INT8
, BASE_DEC
,
571 NULL
, 0, NULL
, HFILL
}},
572 { &hf_original_length
, {
573 "Original Length", "tzsp.original_length", FT_INT16
, BASE_DEC
,
574 NULL
, 0, "OrigLength", HFILL
}},
576 "Signal", "tzsp.wlan.signal", FT_INT8
, BASE_DEC
,
577 NULL
, 0, NULL
, HFILL
}},
579 "Rate", "tzsp.wlan.rate", FT_UINT8
, BASE_DEC
,
580 VALS(rates
), 0, NULL
, HFILL
}},
582 "Channel", "tzsp.wlan.channel", FT_UINT16
, BASE_DEC
,
583 VALS(channels
), 0, NULL
, HFILL
}},
585 "Unknown tag", "tzsp.unknown", FT_BYTES
, BASE_NONE
,
586 NULL
, 0, NULL
, HFILL
}},
588 "Sensor Address", "tzsp.sensormac", FT_ETHER
, BASE_NONE
,
589 NULL
, 0, "Sensor MAC", HFILL
}},
592 "Device Name", "tzsp.device_name", FT_STRING
, BASE_NONE
,
593 NULL
, 0, "DeviceName", HFILL
}},
595 { &hf_capture_location
, {
596 "Capture Location", "tzsp.capture_location", FT_STRING
, BASE_NONE
,
597 NULL
, 0, "CaptureLocation", HFILL
}},
599 { &hf_capture_info
, {
600 "Capture Information", "tzsp.device_info", FT_STRING
, BASE_NONE
,
601 NULL
, 0, "CaptureInformation", HFILL
}},
604 "Capture Id", "tzsp.device_id", FT_UINT32
, BASE_DEC
,
605 NULL
, 0, "CaptureID", HFILL
}},
608 "Time Stamp", "tzsp.time_stamp",
609 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, NULL
, 0x0,
610 "TimeStamp", HFILL
}},
613 "Packet Id", "tzsp.packet_id", FT_UINT32
, BASE_DEC
,
614 NULL
, 0, "PacketId", HFILL
}}
617 static int *ett
[] = {
622 proto_tzsp
= proto_register_protocol("Tazmen Sniffer Protocol", "TZSP", "tzsp");
623 proto_register_field_array(proto_tzsp
, hf
, array_length(hf
));
624 proto_register_subtree_array(ett
, array_length(ett
));
626 tzsp_handle
= register_dissector("tzsp", dissect_tzsp
, proto_tzsp
);
628 tzsp_encap_table
= register_dissector_table("tzsp.encap", "TZSP Encapsulation Type",
629 proto_tzsp
, FT_UINT16
, BASE_DEC
);
633 proto_reg_handoff_tzsp(void)
635 dissector_add_uint_with_preference("udp.port", UDP_PORT_TZSP
, tzsp_handle
);
637 /* Get the data dissector for handling various encapsulation types. */
638 dissector_add_uint("tzsp.encap", TZSP_ENCAP_ETHERNET
, find_dissector("eth_maybefcs"));
639 dissector_add_uint("tzsp.encap", TZSP_ENCAP_TOKEN_RING
, find_dissector("tr"));
640 dissector_add_uint("tzsp.encap", TZSP_ENCAP_PPP
, find_dissector("ppp_hdlc"));
641 dissector_add_uint("tzsp.encap", TZSP_ENCAP_FDDI
, find_dissector("fddi"));
642 dissector_add_uint("tzsp.encap", TZSP_ENCAP_RAW
, find_dissector("raw_ip"));
643 dissector_add_uint("tzsp.encap", TZSP_ENCAP_IEEE_802_11
, find_dissector("wlan"));
644 dissector_add_uint("tzsp.encap", TZSP_ENCAP_IEEE_802_11_PRISM
, find_dissector("prism"));
645 dissector_add_uint("tzsp.encap", TZSP_ENCAP_IEEE_802_11_AVS
, find_dissector("wlancap"));
646 dissector_add_uint("tzsp.encap", TZSP_ENCAP_IEEE_802_11_RADIOTAP
, find_dissector("radiotap"));
648 /* Register this protocol as an encapsulation type. */
649 dissector_add_uint("wtap_encap", WTAP_ENCAP_TZSP
, tzsp_handle
);
653 * Editor modelines - https://www.wireshark.org/tools/modelines.html
658 * indent-tabs-mode: nil
661 * vi: set shiftwidth=4 tabstop=8 expandtab:
662 * :indentSize=4:tabSize=8:noTabs=true: