2 * Routines for Token-Ring Media Access Control
3 * Gilbert Ramirez <gram@alumni.rice.edu>
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
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.
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.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
30 #include <epan/packet.h>
31 #include <epan/to_str.h>
32 #include <epan/expert.h>
34 static int proto_trmac
= -1;
35 static int hf_trmac_mv
= -1;
36 static int hf_trmac_length
= -1;
37 static int hf_trmac_srcclass
= -1;
38 static int hf_trmac_dstclass
= -1;
39 static int hf_trmac_sv_len
= -1;
40 static int hf_trmac_sv_id
= -1;
41 static int hf_trmac_errors_iso
= -1;
42 static int hf_trmac_errors_line
= -1;
43 static int hf_trmac_errors_internal
= -1;
44 static int hf_trmac_errors_burst
= -1;
45 static int hf_trmac_errors_ac
= -1;
46 static int hf_trmac_errors_abort
= -1;
47 static int hf_trmac_errors_noniso
= -1;
48 static int hf_trmac_errors_lost
= -1;
49 static int hf_trmac_errors_congestion
= -1;
50 static int hf_trmac_errors_fc
= -1;
51 static int hf_trmac_errors_freq
= -1;
52 static int hf_trmac_errors_token
= -1;
53 static int hf_trmac_naun
= -1;
54 static int hf_trmac_beacon_type
= -1;
55 /* Generated from convert_proto_tree_add_text.pl */
56 static int hf_trmac_assign_physical_drop_number
= -1;
57 static int hf_trmac_error_code
= -1;
58 static int hf_trmac_group_address32
= -1;
59 static int hf_trmac_transmit_status_code
= -1;
60 static int hf_trmac_station_identifier
= -1;
61 static int hf_trmac_sa_of_last_amp_or_smp_frame
= -1;
62 static int hf_trmac_error_report_timer_value
= -1;
63 static int hf_trmac_individual_address_count
= -1;
64 static int hf_trmac_correlator
= -1;
65 static int hf_trmac_group_address_ether
= -1;
66 static int hf_trmac_authorized_access_priority
= -1;
67 static int hf_trmac_physical_drop_number
= -1;
68 static int hf_trmac_authorized_function_classes
= -1;
69 static int hf_trmac_local_ring_number
= -1;
70 static int hf_trmac_functional_addresses
= -1;
72 static gint ett_tr_mac
= -1;
73 static gint ett_tr_sv
= -1;
74 static gint ett_tr_ierr_cnt
= -1;
75 static gint ett_tr_nerr_cnt
= -1;
77 static expert_field ei_trmac_sv_len
= EI_INIT
;
80 static const value_string major_vector_vs
[] = {
83 { 0x03, "Claim Token" },
84 { 0x04, "Ring Purge" },
85 { 0x05, "Active Monitor Present" },
86 { 0x06, "Standby Monitor Present" },
87 { 0x07, "Duplicate Address Test" },
88 { 0x09, "Transmit Forward" },
89 { 0x0B, "Remove Ring Station" },
90 { 0x0C, "Change Parameters" },
91 { 0x0D, "Initialize Ring Station" },
92 { 0x0E, "Request Ring Station Address" },
93 { 0x0F, "Request Ring Station Address" },
94 { 0x10, "Request Ring Station Attachments" },
95 { 0x20, "Request Initialization" },
96 { 0x22, "Report Ring Station Address" },
97 { 0x23, "Report Ring Station State" },
98 { 0x24, "Report Ring Station Attachments" },
99 { 0x25, "Report New Active Monitor" },
100 { 0x26, "Report NAUN Change" },
101 { 0x27, "Report Poll Error" },
102 { 0x28, "Report Monitor Errors" },
103 { 0x29, "Report Error" },
104 { 0x2A, "Report Transmit Forward" },
108 /* Src. and Dest. Classes */
109 static const value_string classes_vs
[] = {
110 { 0x00, "Ring Station" },
111 { 0x01, "LLC Manager" },
112 { 0x04, "Configuration Report Server" },
113 { 0x05, "Ring Parameter Server" },
114 { 0x06, "Ring Error Monitor" },
118 static const value_string subvector_vs
[] = {
119 { 0x01, "Beacon Type" },
120 { 0x02, "Upstream Neighbor's Address" },
121 { 0x03, "Local Ring Number" },
122 { 0x04, "Assign Physical Drop Number" },
123 { 0x05, "Error Report Timer Value" },
124 { 0x06, "Authorized Function Classes" },
125 { 0x07, "Authorized Access Priority" },
126 { 0x09, "Correlator" },
127 { 0x0A, "SA of Last AMP or SMP Frame" },
128 { 0x0B, "Physical Drop Number" },
129 { 0x20, "Response Code" },
130 { 0x21, "Individual Address Count" },
131 { 0x22, "Product Instance ID" },
132 { 0x23, "Ring Station Version Number" },
133 { 0x26, "Wrap Data" },
134 { 0x27, "Frame Forward" },
135 { 0x28, "Station Identifier" },
136 { 0x29, "Ring Station Status" },
137 { 0x2A, "Transmit Forward Status Code" },
138 { 0x2B, "Group Addresses" },
139 { 0x2C, "Functional Addresses" },
140 { 0x2D, "Isolating Error Counts" },
141 { 0x2E, "Non-Isolating Error Counts" },
142 { 0x2F, "Function Request ID" },
143 { 0x30, "Error Code" },
147 static const value_string beacon_vs
[] = {
148 { 0x00, "Recovery mode set" },
149 { 0x01, "Signal loss error" },
150 { 0x02, "Streaming signal not Claim Token MAC frame" },
151 { 0x03, "Streaming signal, Claim Token MAC frame" },
157 sv_text(tvbuff_t
*tvb
, int svoff
, packet_info
*pinfo
, proto_tree
*tree
)
159 guint sv_length
, sv_id
;
160 guint16 beacon_type
, ring
;
161 guint32 error_report_timer_value
;
163 proto_tree
*sv_tree
, *sv_subtree
;
164 proto_item
*sv_item
, *len_item
, *ti
;
166 guchar errors
[6]; /* isolating or non-isolating */
168 sv_item
= proto_tree_add_text(tree
, tvb
, svoff
+0, 1, "Subvector");
169 sv_tree
= proto_item_add_subtree(sv_item
, ett_tr_sv
);
171 sv_length
= tvb_get_guint8(tvb
, svoff
+0);
172 len_item
= proto_tree_add_item(sv_tree
, hf_trmac_sv_len
, tvb
, svoff
+0, 1, ENC_NA
);
174 /* Check the SV length; it must be at least 2, to include
175 the subvector length and indicator. */
177 expert_add_info_format(pinfo
, len_item
, &ei_trmac_sv_len
,
178 "Invalid subvector: length < 2");
179 return 0; /* tells our caller to give up */
182 sv_id
= tvb_get_guint8(tvb
, svoff
+1);
183 proto_tree_add_item(sv_tree
, hf_trmac_sv_id
, tvb
, svoff
+1, 1, ENC_NA
);
184 proto_item_append_text(sv_item
, " (%s)", val_to_str(sv_id
, subvector_vs
, "Unknown subvector ID 0x%02X"));
187 case 0x01: /* Beacon Type */
188 if (sv_length
!= 4) {
189 expert_add_info_format(pinfo
, len_item
, &ei_trmac_sv_len
,
190 "Subvector length is != 4");
193 beacon_type
= tvb_get_ntohs(tvb
, svoff
+2);
194 proto_tree_add_uint_format_value(sv_tree
, hf_trmac_beacon_type
, tvb
, svoff
+2, sv_length
-2,
195 beacon_type
, "%s", val_to_str(beacon_type
, beacon_vs
, "Illegal value: %d"));
196 proto_item_append_text(sv_item
,
197 ": %s", val_to_str(beacon_type
, beacon_vs
, "Illegal value: %d"));
200 case 0x02: /* Upstream Neighbor's Address */
201 if (sv_length
!= 8) {
202 expert_add_info_format(pinfo
, len_item
, &ei_trmac_sv_len
,
203 "Subvector length is != 8");
206 proto_tree_add_item(sv_tree
, hf_trmac_naun
, tvb
, svoff
+2, sv_length
-2, ENC_NA
);
207 proto_item_append_text(sv_item
, ": %s",
208 tvb_ether_to_str(tvb
, svoff
+2));
211 case 0x03: /* Local Ring Number */
212 if (sv_length
!= 4) {
213 expert_add_info_format(pinfo
, len_item
, &ei_trmac_sv_len
,
214 "Subvector length is != 4");
217 ring
= tvb_get_ntohs(tvb
, svoff
+2);
218 proto_tree_add_item(sv_tree
, hf_trmac_local_ring_number
, tvb
, svoff
+2, sv_length
-2, ENC_BIG_ENDIAN
);
219 proto_item_append_text(sv_item
,
220 ": 0x%04X (%d)", ring
, ring
);
223 case 0x04: /* Assign Physical Drop Number */
224 if (sv_length
!= 6) {
225 expert_add_info_format(pinfo
, len_item
, &ei_trmac_sv_len
,
226 "Subvector length is != 6");
229 proto_tree_add_item(sv_tree
, hf_trmac_assign_physical_drop_number
, tvb
, svoff
+2, sv_length
-2, ENC_BIG_ENDIAN
);
230 proto_item_append_text(sv_item
,
231 ": 0x%08X", tvb_get_ntohl(tvb
, svoff
+2) );
234 case 0x05: /* Error Report Timer Value */
235 if (sv_length
!= 4) {
236 expert_add_info_format(pinfo
, len_item
, &ei_trmac_sv_len
,
237 "Subvector length is != 4");
241 error_report_timer_value
= 10 * tvb_get_ntohs(tvb
, svoff
+2);
242 proto_tree_add_uint_format_value(sv_tree
, hf_trmac_error_report_timer_value
, tvb
, svoff
+2, sv_length
-2,
243 error_report_timer_value
, "%d ms", error_report_timer_value
);
244 proto_item_append_text(sv_item
,
245 ": %d ms", error_report_timer_value
);
248 case 0x06: /* Authorized Function Classes */
249 if (sv_length
!= 4) {
250 expert_add_info_format(pinfo
, len_item
, &ei_trmac_sv_len
,
251 "Subvector length is != 4");
254 proto_tree_add_item(sv_tree
, hf_trmac_authorized_function_classes
, tvb
, svoff
+2, sv_length
-2, ENC_BIG_ENDIAN
);
255 proto_item_append_text(sv_item
,
256 ": %04X", tvb_get_ntohs(tvb
, svoff
+2) );
259 case 0x07: /* Authorized Access Priority */
260 if (sv_length
!= 4) {
261 expert_add_info_format(pinfo
, len_item
, &ei_trmac_sv_len
,
262 "Subvector length is != 4");
265 proto_tree_add_item(sv_tree
, hf_trmac_authorized_access_priority
, tvb
, svoff
+2, sv_length
-2, ENC_BIG_ENDIAN
);
266 proto_item_append_text(sv_item
,
267 ": %04X", tvb_get_ntohs(tvb
, svoff
+2) );
270 case 0x09: /* Correlator */
271 if (sv_length
!= 4) {
272 expert_add_info_format(pinfo
, len_item
, &ei_trmac_sv_len
,
273 "Subvector length is != 4");
276 proto_tree_add_item(sv_tree
, hf_trmac_correlator
, tvb
, svoff
+2, sv_length
-2, ENC_BIG_ENDIAN
);
277 proto_item_append_text(sv_item
,
278 ": %04X", tvb_get_ntohs(tvb
, svoff
+2) );
281 case 0x0A: /* SA of Last AMP or SMP Frame */
282 if (sv_length
!= 8) {
283 expert_add_info_format(pinfo
, len_item
, &ei_trmac_sv_len
,
284 "Subvector length is != 8");
287 proto_tree_add_item(sv_tree
, hf_trmac_sa_of_last_amp_or_smp_frame
, tvb
, svoff
+2, sv_length
-2, ENC_NA
);
288 proto_item_append_text(sv_item
,
290 tvb_ether_to_str(tvb
, svoff
+2));
293 case 0x0B: /* Physical Drop Number */
294 if (sv_length
!= 6) {
295 expert_add_info_format(pinfo
, len_item
, &ei_trmac_sv_len
,
296 "Subvector length is != 6");
299 proto_tree_add_item(sv_tree
, hf_trmac_physical_drop_number
, tvb
, svoff
+2, sv_length
-2, ENC_BIG_ENDIAN
);
300 proto_item_append_text(sv_item
,
301 ": 0x%08X", tvb_get_ntohl(tvb
, svoff
+2) );
304 case 0x20: /* Response Code */
305 if (sv_length
!= 4 && sv_length
!= 6) {
306 expert_add_info_format(pinfo
, len_item
, &ei_trmac_sv_len
,
307 "Subvector length is != 4 and != 6");
310 if (sv_length
== 4) {
311 proto_tree_add_text(sv_tree
, tvb
, svoff
+2, sv_length
-2,
312 "Response Code: 0x%04X 0x%02X 0x%02x",
313 tvb_get_ntohs(tvb
, svoff
+2),
314 tvb_get_guint8(tvb
, svoff
+4),
315 tvb_get_guint8(tvb
, svoff
+5));
316 proto_item_append_text(sv_item
,
317 ": 0x%04X 0x%02X 0x%02x",
318 tvb_get_ntohs(tvb
, svoff
+2),
319 tvb_get_guint8(tvb
, svoff
+4),
320 tvb_get_guint8(tvb
, svoff
+5));
322 proto_tree_add_text(sv_tree
, tvb
, svoff
+2, sv_length
-2,
323 "Response Code: 0x%04X 0x%02X 0x%06X",
324 tvb_get_ntohs(tvb
, svoff
+2),
325 tvb_get_guint8(tvb
, svoff
+4),
326 tvb_get_ntoh24(tvb
, svoff
+5));
327 proto_item_append_text(sv_item
,
328 ": 0x%04X 0x%02X 0x%06X",
329 tvb_get_ntohs(tvb
, svoff
+2),
330 tvb_get_guint8(tvb
, svoff
+4),
331 tvb_get_ntoh24(tvb
, svoff
+5));
335 case 0x21: /* Individual Address Count */
336 if (sv_length
!= 4) {
337 expert_add_info_format(pinfo
, len_item
, &ei_trmac_sv_len
,
338 "Subvector length is != 4");
341 proto_tree_add_item(sv_tree
, hf_trmac_individual_address_count
, tvb
, svoff
+2, sv_length
-2, ENC_BIG_ENDIAN
);
342 proto_item_append_text(sv_item
,
343 ": %u", tvb_get_ntohs(tvb
, svoff
+2) );
346 case 0x22: /* Product Instance ID */
347 proto_tree_add_text(sv_tree
, tvb
, svoff
+2, sv_length
-2,
348 "Product Instance ID: ...");
351 case 0x23: /* Ring Station Version Number */
352 proto_tree_add_text(sv_tree
, tvb
, svoff
+2, sv_length
-2,
353 "Ring Station Version Number: ...");
356 case 0x26: /* Wrap data */
357 proto_tree_add_text(sv_tree
, tvb
, svoff
+2, sv_length
-2,
358 "Wrap Data: ... (%u bytes)", sv_length
- 2);
361 case 0x27: /* Frame Forward */
362 proto_tree_add_text(sv_tree
, tvb
, svoff
+2, sv_length
-2,
363 "Frame Forward: ... (%d bytes)", sv_length
- 2);
366 case 0x28: /* Station Identifier */
367 if (sv_length
!= 8) {
368 expert_add_info_format(pinfo
, len_item
, &ei_trmac_sv_len
,
369 "Subvector length is != 8");
372 proto_tree_add_item(sv_tree
, hf_trmac_station_identifier
, tvb
, svoff
+2, sv_length
-2, ENC_NA
);
373 proto_item_append_text(sv_item
,
375 tvb_ether_to_str(tvb
, svoff
+2));
378 case 0x29: /* Ring Station Status */
379 proto_tree_add_text(sv_tree
, tvb
, svoff
+2, sv_length
-2,
380 "Ring Station Status: ...");
383 case 0x2A: /* Transmit Status Code */
384 if (sv_length
!= 4) {
385 expert_add_info_format(pinfo
, len_item
, &ei_trmac_sv_len
,
386 "Subvector length is != 4");
389 proto_tree_add_item(sv_tree
, hf_trmac_transmit_status_code
, tvb
, svoff
+2, sv_length
-2, ENC_BIG_ENDIAN
);
390 proto_item_append_text(sv_item
,
391 ": %04X", tvb_get_ntohs(tvb
, svoff
+2) );
394 case 0x2B: /* Group Address */
395 if (sv_length
!= 6 && sv_length
!= 8) {
396 expert_add_info_format(pinfo
, len_item
, &ei_trmac_sv_len
,
397 "Subvector length is != 6 and != 8");
400 if (sv_length
== 6) {
401 proto_tree_add_item(sv_tree
, hf_trmac_group_address32
, tvb
, svoff
+2, sv_length
-2, ENC_BIG_ENDIAN
);
402 proto_item_append_text(sv_item
,
403 ": %08X", tvb_get_ntohl(tvb
, svoff
+2) );
405 proto_tree_add_item(sv_tree
, hf_trmac_group_address_ether
, tvb
, svoff
+2, sv_length
-2, ENC_NA
);
406 proto_item_append_text(sv_item
,
408 tvb_ether_to_str(tvb
, svoff
+2));
412 case 0x2C: /* Functional Addresses */
413 if (sv_length
!= 6) {
414 expert_add_info_format(pinfo
, len_item
, &ei_trmac_sv_len
,
415 "Subvector length is != 6");
418 proto_tree_add_item(sv_tree
, hf_trmac_functional_addresses
, tvb
, svoff
+2, sv_length
-2, ENC_BIG_ENDIAN
);
419 proto_item_append_text(sv_item
,
420 ": %08X", tvb_get_ntohl(tvb
, svoff
+2) );
423 case 0x2D: /* Isolating Error Counts */
424 if (sv_length
!= 8) {
425 expert_add_info_format(pinfo
, len_item
, &ei_trmac_sv_len
,
426 "Subvector length is != 8");
429 tvb_memcpy(tvb
, errors
, svoff
+2, 6);
430 ti
= proto_tree_add_uint(sv_tree
, hf_trmac_errors_iso
, tvb
, svoff
+2, sv_length
-2,
431 errors
[0] + errors
[1] + errors
[2] + errors
[3] + errors
[4]);
432 sv_subtree
= proto_item_add_subtree(ti
, ett_tr_ierr_cnt
);
434 proto_tree_add_uint(sv_subtree
, hf_trmac_errors_line
, tvb
, svoff
+2, 1, errors
[0]);
435 proto_tree_add_uint(sv_subtree
, hf_trmac_errors_internal
, tvb
, svoff
+3, 1, errors
[1]);
436 proto_tree_add_uint(sv_subtree
, hf_trmac_errors_burst
, tvb
, svoff
+4, 1, errors
[2]);
437 proto_tree_add_uint(sv_subtree
, hf_trmac_errors_ac
, tvb
, svoff
+5, 1, errors
[3]);
438 proto_tree_add_uint(sv_subtree
, hf_trmac_errors_abort
, tvb
, svoff
+6, 1, errors
[4]);
442 case 0x2E: /* Non-Isolating Error Counts */
443 if (sv_length
!= 8) {
444 expert_add_info_format(pinfo
, len_item
, &ei_trmac_sv_len
,
445 "Subvector length is != 8");
448 tvb_memcpy(tvb
, errors
, svoff
+2, 6);
449 ti
= proto_tree_add_uint(sv_tree
, hf_trmac_errors_noniso
, tvb
, svoff
+2, sv_length
-2,
450 errors
[0] + errors
[1] + errors
[2] + errors
[3] + errors
[4]);
451 sv_subtree
= proto_item_add_subtree(ti
, ett_tr_nerr_cnt
);
453 proto_tree_add_uint(sv_subtree
, hf_trmac_errors_lost
, tvb
, svoff
+2, 1, errors
[0]);
454 proto_tree_add_uint(sv_subtree
, hf_trmac_errors_congestion
, tvb
, svoff
+3, 1, errors
[1]);
455 proto_tree_add_uint(sv_subtree
, hf_trmac_errors_fc
, tvb
, svoff
+4, 1, errors
[2]);
456 proto_tree_add_uint(sv_subtree
, hf_trmac_errors_freq
, tvb
, svoff
+5, 1, errors
[3]);
457 proto_tree_add_uint(sv_subtree
, hf_trmac_errors_token
, tvb
, svoff
+6, 1, errors
[4]);
460 case 0x30: /* Error Code */
461 if (sv_length
!= 4) {
462 expert_add_info_format(pinfo
, len_item
, &ei_trmac_sv_len
,
463 "Subvector length is != 4");
466 proto_tree_add_item(sv_tree
, hf_trmac_error_code
, tvb
, svoff
+2, sv_length
-2, ENC_BIG_ENDIAN
);
467 proto_item_append_text(sv_item
,
468 ": %04X", tvb_get_ntohs(tvb
, svoff
+2) );
471 default: /* Unknown */
472 proto_tree_add_text(sv_tree
, tvb
, svoff
+2, sv_length
-2,
473 "Unknown Subvector");
480 dissect_trmac(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
482 proto_tree
*mac_tree
= NULL
;
484 int mv_length
, sv_offset
, sv_additional
;
487 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "TR MAC");
488 col_clear(pinfo
->cinfo
, COL_INFO
);
490 mv_val
= tvb_get_guint8(tvb
, 3);
492 /* Interpret the major vector */
493 col_add_str(pinfo
->cinfo
, COL_INFO
,
494 val_to_str(mv_val
, major_vector_vs
, "Unknown Major Vector: %u"));
497 mv_length
= tvb_get_ntohs(tvb
, 0);
498 ti
= proto_tree_add_item(tree
, proto_trmac
, tvb
, 0, mv_length
, ENC_NA
);
499 mac_tree
= proto_item_add_subtree(ti
, ett_tr_mac
);
501 proto_tree_add_uint(mac_tree
, hf_trmac_mv
, tvb
, 3, 1, mv_val
);
502 proto_tree_add_uint_format_value(mac_tree
, hf_trmac_length
, tvb
, 0, 2, mv_length
,
503 "%d bytes", mv_length
);
504 proto_tree_add_uint(mac_tree
, hf_trmac_srcclass
, tvb
, 2, 1, tvb_get_guint8(tvb
, 2) & 0x0f);
505 proto_tree_add_uint(mac_tree
, hf_trmac_dstclass
, tvb
, 2, 1, tvb_get_guint8(tvb
, 2) >> 4 );
507 /* interpret the subvectors */
509 while (sv_offset
< mv_length
) {
510 sv_additional
= sv_text(tvb
, sv_offset
, pinfo
, mac_tree
);
512 /* if this is a bad packet, we could get a 0-length added here,
514 if (sv_additional
> 0)
515 sv_offset
+= sv_additional
;
523 proto_register_trmac(void)
525 static hf_register_info hf
[] = {
527 { "Major Vector", "trmac.mvec", FT_UINT8
, BASE_HEX
, major_vector_vs
, 0x0,
531 { "Total Length", "trmac.length", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
534 { &hf_trmac_srcclass
,
535 { "Source Class", "trmac.srcclass", FT_UINT8
, BASE_HEX
, classes_vs
, 0x0,
538 { &hf_trmac_dstclass
,
539 { "Destination Class", "trmac.dstclass", FT_UINT8
, BASE_HEX
, classes_vs
, 0x0,
543 { "Subvector Length", "trmac.svec.len", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
547 { "Subvector Identifier", "trmac.svec.id", FT_UINT8
, BASE_HEX
, VALS(subvector_vs
), 0x0,
550 { &hf_trmac_errors_iso
,
551 { "Isolating Errors", "trmac.errors.iso", FT_UINT16
, BASE_DEC
, NULL
, 0x0,
554 { &hf_trmac_errors_line
,
555 { "Line Errors", "trmac.errors.line", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
558 { &hf_trmac_errors_internal
,
559 { "Internal Errors", "trmac.errors.internal", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
562 { &hf_trmac_errors_burst
,
563 { "Burst Errors", "trmac.errors.burst", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
566 { &hf_trmac_errors_ac
,
567 { "A/C Errors", "trmac.errors.ac", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
570 { &hf_trmac_errors_abort
,
571 { "Abort Delimiter Transmitted Errors", "trmac.errors.abort", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
574 { &hf_trmac_errors_noniso
,
575 { "Non-Isolating Errors", "trmac.errors.noniso", FT_UINT16
, BASE_DEC
, NULL
, 0x0,
578 { &hf_trmac_errors_lost
,
579 { "Lost Frame Errors", "trmac.errors.lost", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
582 { &hf_trmac_errors_congestion
,
583 { "Receiver Congestion Errors", "trmac.errors.congestion", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
586 { &hf_trmac_errors_fc
,
587 { "Frame-Copied Errors", "trmac.errors.fc", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
590 { &hf_trmac_errors_freq
,
591 { "Frequency Errors", "trmac.errors.freq", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
594 { &hf_trmac_errors_token
,
595 { "Token Errors", "trmac.errors.token", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
599 { "Upstream Neighbor's Address", "trmac.naun", FT_ETHER
, BASE_NONE
, NULL
, 0x0,
602 { &hf_trmac_beacon_type
,
603 { "Beacon Type", "trmac.beacon_type", FT_UINT16
, BASE_DEC
, VALS(beacon_vs
), 0x0,
606 /* Generated from convert_proto_tree_add_text.pl */
607 { &hf_trmac_local_ring_number
, { "Local Ring Number", "trmac.local_ring_number", FT_UINT16
, BASE_HEX_DEC
, NULL
, 0x0, NULL
, HFILL
}},
608 { &hf_trmac_assign_physical_drop_number
, { "Assign Physical Drop Number", "trmac.assign_physical_drop_number", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
609 { &hf_trmac_error_report_timer_value
, { "Error Report Timer Value", "trmac.error_report_timer_value", FT_INT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
610 { &hf_trmac_authorized_function_classes
, { "Authorized Function Classes", "trmac.authorized_function_classes", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
611 { &hf_trmac_authorized_access_priority
, { "Authorized Access Priority", "trmac.authorized_access_priority", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
612 { &hf_trmac_correlator
, { "Correlator", "trmac.correlator", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
613 { &hf_trmac_sa_of_last_amp_or_smp_frame
, { "SA of Last AMP or SMP Frame", "trmac.sa_of_last_amp_or_smp_frame", FT_ETHER
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
614 { &hf_trmac_physical_drop_number
, { "Physical Drop Number", "trmac.physical_drop_number", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
615 { &hf_trmac_individual_address_count
, { "Individual Address Count", "trmac.individual_address_count", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
616 { &hf_trmac_station_identifier
, { "Station Identifier", "trmac.station_identifier", FT_ETHER
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
617 { &hf_trmac_transmit_status_code
, { "Transmit Status Code", "trmac.transmit_status_code", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
618 { &hf_trmac_group_address32
, { "Group Address", "trmac.group_address", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
619 { &hf_trmac_group_address_ether
, { "Group Address", "trmac.group_address", FT_ETHER
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
620 { &hf_trmac_functional_addresses
, { "Functional Addresses", "trmac.functional_addresses", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
621 { &hf_trmac_error_code
, { "Error Code", "trmac.error_code", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
624 static gint
*ett
[] = {
631 static ei_register_info ei
[] = {
632 { &ei_trmac_sv_len
, { "trmac.svec.len.invalid", PI_MALFORMED
, PI_ERROR
, "Invalid length", EXPFILL
}},
635 expert_module_t
* expert_trmac
;
637 proto_trmac
= proto_register_protocol("Token-Ring Media Access Control", "TR MAC", "trmac");
638 proto_register_field_array(proto_trmac
, hf
, array_length(hf
));
639 proto_register_subtree_array(ett
, array_length(ett
));
640 expert_trmac
= expert_register_protocol(proto_trmac
);
641 expert_register_field_array(expert_trmac
, ei
, array_length(ei
));
643 register_dissector("trmac", dissect_trmac
, proto_trmac
);