1 /* packet-slowprotocols.c
2 * Routines for EtherType (0x8809) Slow Protocols disassembly.
6 * Copyright 2002 Steve Housley <steve_housley@3com.com>
7 * Copyright 2005 Dominique Bastien <dbastien@accedian.com>
8 * Copyright 2009 Artem Tamazov <artem.tamazov@telllabs.com>
9 * Copyright 2010 Roberto Morro <roberto.morro[AT]tilab.com>
11 * Wireshark - Network traffic analyzer
12 * By Gerald Combs <gerald@wireshark.org>
13 * Copyright 1998 Gerald Combs
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
34 #include <epan/packet.h>
35 #include <epan/etypes.h>
36 #include <epan/llcsaps.h>
37 #include <epan/ppptypes.h>
38 #include <epan/addr_resolv.h>
39 #include <epan/expert.h>
41 /* General declarations */
43 #define SLOW_PROTO_SUBTYPE 0
45 #define LACP_SUBTYPE 0x1
46 #define MARKER_SUBTYPE 0x2
47 #define OAM_SUBTYPE 0x3
48 #define OSSP_SUBTYPE 0xa /* IEEE 802.3 Annex 57A*/
51 /* Offsets of fields within a LACPDU */
53 #define LACPDU_VERSION_NUMBER 1
55 #define LACPDU_ACTOR_TYPE 2
56 #define LACPDU_ACTOR_INFO_LEN 3
57 #define LACPDU_ACTOR_SYS_PRIORITY 4
58 #define LACPDU_ACTOR_SYSTEM 6
59 #define LACPDU_ACTOR_KEY 12
60 #define LACPDU_ACTOR_PORT_PRIORITY 14
61 #define LACPDU_ACTOR_PORT 16
62 #define LACPDU_ACTOR_STATE 18
63 #define LACPDU_ACTOR_RESERVED 19
65 #define LACPDU_PARTNER_TYPE 22
66 #define LACPDU_PARTNER_INFO_LEN 23
67 #define LACPDU_PARTNER_SYS_PRIORITY 24
68 #define LACPDU_PARTNER_SYSTEM 26
69 #define LACPDU_PARTNER_KEY 32
70 #define LACPDU_PARTNER_PORT_PRIORITY 34
71 #define LACPDU_PARTNER_PORT 36
72 #define LACPDU_PARTNER_STATE 38
73 #define LACPDU_PARTNER_RESERVED 39
75 #define LACPDU_COLL_TYPE 42
76 #define LACPDU_COLL_INFO_LEN 43
77 #define LACPDU_COLL_MAX_DELAY 44
78 #define LACPDU_COLL_RESERVED 46
80 #define LACPDU_TERM_TYPE 58
81 #define LACPDU_TERM_LEN 59
82 #define LACPDU_TERM_RESERVED 60
84 /* Actor and Partner Flag bits */
85 #define LACPDU_FLAGS_ACTIVITY 0x01
86 #define LACPDU_FLAGS_TIMEOUT 0x02
87 #define LACPDU_FLAGS_AGGREGATION 0x04
88 #define LACPDU_FLAGS_SYNC 0x08
89 #define LACPDU_FLAGS_COLLECTING 0x10
90 #define LACPDU_FLAGS_DISTRIB 0x20
91 #define LACPDU_FLAGS_DEFAULTED 0x40
92 #define LACPDU_FLAGS_EXPIRED 0x80
95 /* MARKER TLVs subtype */
96 #define MARKERPDU_END_MARKER 0x0
97 #define MARKERPDU_MARKER_INFO 0x1
98 #define MARKERPDU_MARKER_RESPONSE 0x2
101 /* Offsets of fields within a OAMPDU */
102 #define OAMPDU_FLAGS 1
103 #define OAMPDU_CODE 3
105 #define OAMPDU_HEADER_SIZE 4
107 /* OAMPDU Flag bits */
108 #define OAMPDU_FLAGS_LINK_FAULT 0x01
109 #define OAMPDU_FLAGS_DYING_GASP 0x02
110 #define OAMPDU_FLAGS_CRITICAL_EVENT 0x04
111 #define OAMPDU_FLAGS_LOCAL_EVAL 0x08
112 #define OAMPDU_FLAGS_LOCAL_STABLE 0x10
113 #define OAMPDU_FLAGS_REMOTE_EVAL 0x20
114 #define OAMPDU_FLAGS_REMOTE_STABLE 0x40
117 #define OAMPDU_INFORMATION 0x0
118 #define OAMPDU_EVENT_NOTIFICATION 0x1
119 #define OAMPDU_VAR_REQUEST 0x2
120 #define OAMPDU_VAR_RESPONSE 0x3
121 #define OAMPDU_LOOPBACK_CTRL 0x4
122 #define OAMPDU_VENDOR_SPECIFIC 0xFE
124 /* Information Type */
125 #define OAMPDU_INFO_TYPE_ENDMARKER 0x0
126 #define OAMPDU_INFO_TYPE_LOCAL 0x1
127 #define OAMPDU_INFO_TYPE_REMOTE 0x2
128 #define OAMPDU_INFO_TYPE_ORG 0xFE
130 /* Size of fields within a OAMPDU Information */
131 #define OAMPDU_INFO_TYPE_SZ 1
132 #define OAMPDU_INFO_LENGTH_SZ 1
133 #define OAMPDU_INFO_VERSION_SZ 1
134 #define OAMPDU_INFO_REVISION_SZ 2
135 #define OAMPDU_INFO_STATE_SZ 1
136 #define OAMPDU_INFO_OAM_CONFIG_SZ 1
137 #define OAMPDU_INFO_OAMPDU_CONFIG_SZ 2
138 #define OAMPDU_INFO_OUI_SZ 3
139 #define OAMPDU_INFO_VENDOR_SPECIFIC_SZ 4
141 /* OAM configuration bits */
143 #define OAMPDU_INFO_CONFIG_MODE 0x01
144 #define OAMPDU_INFO_CONFIG_UNI 0x02
145 #define OAMPDU_INFO_CONFIG_LPBK 0x04
146 #define OAMPDU_INFO_CONFIG_EVENT 0x08
147 #define OAMPDU_INFO_CONFIG_VAR 0x10
150 #define OAMPDU_EVENT_TYPE_END 0x0
151 #define OAMPDU_EVENT_TYPE_ESPE 0x1
152 #define OAMPDU_EVENT_TYPE_EFE 0x2
153 #define OAMPDU_EVENT_TYPE_EFPE 0x3
154 #define OAMPDU_EVENT_TYPE_EFSSE 0x4
155 #define OAMPDU_EVENT_TYPE_OSE 0xFE
157 /* Size of fields within a OAMPDU Event notification */
158 #define OAMPDU_EVENT_SEQUENCE_SZ 2
159 #define OAMPDU_EVENT_TYPE_SZ 1
160 #define OAMPDU_EVENT_LENGTH_SZ 1
161 #define OAMPDU_EVENT_TIMESTAMP_SZ 2
163 /* Size of fields within a OAMPDU ESPE: Errored Symbol Period Event TLV */
164 #define OAMPDU_ESPE_WINDOW_SZ 8
165 #define OAMPDU_ESPE_THRESHOLD_SZ 8
166 #define OAMPDU_ESPE_ERRORS_SZ 8
167 #define OAMPDU_ESPE_ERR_TOTAL_SZ 8
168 #define OAMPDU_ESPE_TOTAL_SZ 4
170 /* Size of fields within a OAMPDU EFE: Errored Frame Event TLV */
171 #define OAMPDU_EFE_WINDOW_SZ 2
172 #define OAMPDU_EFE_THRESHOLD_SZ 4
173 #define OAMPDU_EFE_ERRORS_SZ 4
174 #define OAMPDU_EFE_ERR_TOTAL_SZ 8
175 #define OAMPDU_EFE_TOTAL_SZ 4
177 /* Size of fields within a OAMPDU EFPE: Errored Frame Period Event TLV */
178 #define OAMPDU_EFPE_WINDOW_SZ 4
179 #define OAMPDU_EFPE_THRESHOLD_SZ 4
180 #define OAMPDU_EFPE_ERRORS_SZ 4
181 #define OAMPDU_EFPE_ERR_TOTAL_SZ 8
182 #define OAMPDU_EFPE_TOTAL_SZ 4
184 /* Size of fields within a OAMPDU EFSSE: Errored Frame Seconds Summary Event TLV */
185 #define OAMPDU_EFSSE_WINDOW_SZ 2
186 #define OAMPDU_EFSSE_THRESHOLD_SZ 2
187 #define OAMPDU_EFSSE_ERRORS_SZ 2
188 #define OAMPDU_EFSSE_ERR_TOTAL_SZ 4
189 #define OAMPDU_EFSSE_TOTAL_SZ 4
191 /* Variable Branch Type */
192 #define OAMPDU_VARS_OBJECT 0x3
193 #define OAMPDU_VARS_PACKAGE 0x4
194 #define OAMPDU_VARS_BINDING 0x6
195 #define OAMPDU_VARS_ATTRIBUTE 0x7
197 /* OAMPDU Loopback Control bits */
198 #define OAMPDU_LPBK_ENABLE 0x01
199 #define OAMPDU_LPBK_DISABLE 0x02
202 static const value_string subtype_vals
[] = {
203 { LACP_SUBTYPE
, "LACP" },
204 { MARKER_SUBTYPE
, "Marker Protocol" },
205 { OAM_SUBTYPE
, "OAM" },
206 { OSSP_SUBTYPE
, "Organization Specific Slow Protocol" },
210 static const value_string marker_vals
[] = {
211 { 1, "Marker Information" },
212 { 2, "Marker Response Information" },
216 /* see IEEE802.3, table 57-4 */
217 static const value_string code_vals
[] = {
218 { 0 , "Information" },
219 { 1 , "Event Notification" },
220 { 2 , "Variable Request" },
221 { 3 , "Variable Response" },
222 { 4 , "Loopback Control"},
223 { 0xFE , "Organization Specific" },
227 /* see IEEE802.3, table 57-6 */
228 static const value_string info_type_vals
[] = {
229 { 0 , "End of TLV marker" },
230 { 1 , "Local Information TLV" },
231 { 2 , "Remote Information TLV" },
232 { 0xFE , "Organization Specific Information TLV" },
236 /* see IEEE802.3, table 57-12 */
237 static const value_string event_type_vals
[] = {
238 { 0 , "End of TLV marker" },
239 { 1 , "Errored Symbol Period Event" },
240 { 2 , "Errored Frame Event" },
241 { 3 , "Errored Frame Period Event" },
242 { 4 , "Errored Frame Seconds Summary Event" },
243 { 0xFE , "Organization Specific Event TLV" },
249 * In the OAM protocol the {iso(1) member-body(2) us(840) ieee802dot3(10006)
250 * csmacdmgt(30)} prefix for the objects is pre-define. Only the
251 * managedObjectClass(3) is put in the branch and the leaf is one of the
254 static const value_string object_vals
[] = {
255 { 1, "macObjectClass" },
256 { 2, "phyObjectClass"},
257 { 3, "repeaterObjectClass"},
258 { 4, "groupObjectClass"},
259 { 5, "repeaterPortObjectClass"},
260 { 6, "mauObjectClass"},
261 { 7, "autoNegObjectClass"},
262 { 8, "macControlObjectClass"},
263 { 9, "macControlFunctionObjectClass"},
264 { 10, "oAggregator"},
265 { 11, "oAggregationPort"},
266 { 12, "oAggPortStats"},
267 { 13, "oAggPortDebugInformation" },
268 { 15, "pseObjectClass"},
269 { 17, "midSpanObjectClass"},
270 { 18, "midSpanGroupObjectClass"},
271 { 19, "ompObjectClass"},
272 { 20, "oamObjectClass" },
273 { 21, "mpcpObjectClass" },
274 { 24, "pafObjectClass" },
275 { 25, "pmeObjectClass"},
280 * In the OAM protocol the {iso(1) member-body(2) us(840) ieee802dot3(10006)
281 * csmacdmgt(30)} prefix for the objects is pre-defined. Only the
282 * package(4) is put in the branch and the leaf is one of the
285 static const value_string package_vals
[] = {
286 { 1, "macMandatoryPkg" },
287 { 2, "macRecommendedPkg" },
288 { 3, "macOptionalPkg" },
289 { 4, "macarrayPkg" },
290 { 5, "macExcessiveDeferralPkg" },
291 { 6, "phyRecommendedPkg" },
292 { 7, "phyMultiplePhyPkg" },
293 { 8, "phy100MbpsMonitor" },
294 { 9, "repeaterPerfMonitorPkg"},
295 { 10, "portPerfMonitorPkg"},
296 { 11, "portAddrTrackPkg"},
297 { 12, "port100MbpsMonitor"},
298 { 13, "mauControlPkg"},
299 { 14, "mediaLossTrackingPkg"},
300 { 15, "broadbandMAUPkg"},
301 { 16, "mau100MbpsMonitor"},
302 { 17, "macControlRecommendedPkg" },
304 { 19, "pAggregatorMandatory"},
305 { 20, "pAggregatorRecommended"},
306 { 21, "pAggregatorOptional"},
307 { 22, "pAggregationPortMandatory"},
308 { 23, "pAggPortStats"},
309 { 24, "pAggPortDebugInformation"},
311 { 27, "pseRecommendedPkg"},
316 { 38, "pafAggregation"},
321 * In the OAM protocol the {iso(1) member-body(2) us(840) ieee802dot3(10006)
322 * csmacdmgt(30)} prefix for the objects is pre-defined. Only the
323 * nameBinding(6) is put in the branch and the leaf is one of the
326 static const value_string binding_vals
[] = {
327 { 26, "repeaterPortName"},
332 * In the OAM protocol the {iso(1) member-body(2) us(840) ieee802dot3(10006)
333 * csmacdmgt(30)} prefix for the objects is pre-defined. Only the
334 * attribute(7) is put in the branch and the leaf is one of the
337 static const value_string attribute_vals
[] = {
339 { 2, "aFramesTransmittedOK" },
340 { 3, "aSingleCollisionFrames" },
341 { 4, "aMultipleCollisionFrames" },
342 { 5, "aFramesReceivedOK" },
343 { 6, "aFrameCheckSequenceErrors" },
344 { 7, "aAlignmentErrors" },
345 { 8, "aOctetsTransmittedOK" },
346 { 9, "aFramesWithDeferredXmissions" },
347 { 10, "aLateCollisions" },
348 { 11, "aFramesAbortedDueToXSColls" },
349 { 12, "aFramesLostDueToIntMACXmitError" },
350 { 13, "aCarrierSenseErrors" },
351 { 14, "aOctetsReceivedOK" },
352 { 15, "aFramesLostDueToIntMACRcvError" },
353 { 16, "aPromiscuousStatus" },
354 { 17, "aReadMulticastAddressList" },
355 { 18, "aMulticastFramesXmittedOK" },
356 { 19, "aBroadcastFramesXmittedOK" },
357 { 20, "aFramesWithExcessiveDeferral" },
358 { 21, "aMulticastFramesReceivedOK" },
359 { 22, "aBroadcastFramesReceivedOK" },
360 { 23, "aInRangeLengthErrors" },
361 { 24, "aOutOfRangeLengthField" },
362 { 25, "aFrameTooLongErrors" },
363 { 26, "aMACEnableStatus" },
364 { 27, "aTransmitEnableStatus" },
365 { 28, "aMulticastReceiveStatus" },
366 { 29, "aReadWriteMACAddress" },
367 { 30, "aCollisionFrames" },
370 { 33, "aPHYTypeList" },
371 { 34, "aSQETestErrors" },
372 { 35, "aSymbolErrorDuringCarrier" },
373 { 36, "aMIIDetect" },
374 { 37, "aPHYAdminState" },
375 { 38, "aRepeaterID" },
376 { 39, "aRepeaterType" },
377 { 40, "aRepeaterGroupCapacity" },
379 { 42, "aRepeaterHealthState" },
380 { 43, "aRepeaterHealthText" },
381 { 44, "aRepeaterHealthData" },
382 { 45, "aTransmitCollisions" }, /* XXX: was: 44 */
384 { 47, "aGroupPortCapacity" },
387 { 50, "aPortAdminState" },
388 { 51, "aAutoPartitionState" },
389 { 52, "aReadableFrames" },
390 { 53, "aReadableOctets" },
391 { 54, "aFrameCheckSequenceErrors" },
392 { 55, "aAlignmentErrors" },
393 { 56, "aFramesTooLong" },
394 { 57, "aShortEvents" },
396 { 59, "aCollisions" },
397 { 60, "aLateEvents" },
398 { 61, "aVeryLongEvents" },
399 { 62, "aDataRateMismatches" },
400 { 63, "aAutoPartitions" },
402 { 65, "aSymbolErrorDuringPacket" },
403 { 66, "aLastSourceAddress" },
404 { 67, "aSourceAddressChanges" },
407 { 70, "aMAUTypeList" },
408 { 71, "aMediaAvailable" },
409 { 72, "aLoseMediaCounter" },
411 { 74, "aMAUAdminState" },
412 { 75, "aBbMAUXmitRcvSplitType" },
413 { 76, "aBroadbandFrequencies" },
414 { 77, "aFalseCarriers" },
415 { 78, "aAutoNegID" },
416 { 79, "aAutoNegAdminState" },
417 { 80, "aAutoNegRemoteSignaling" },
418 { 81, "aAutoNegAutoConfig" },
419 { 82, "aAutoNegLocalTechnologyAbility" },
420 { 83, "aAutoNegAdvertisedTechnologyAbility" },
421 { 84, "aAutoNegReceivedTechnologyAbility" },
422 { 85, "aAutoNegLocalSelectorAbility" },
423 { 86, "aAutoNegAdvertisedSelectorAbility" },
424 { 87, "aAutoNegReceivedSelectorAbility" },
426 { 89, "aMACCapabilities" },
427 { 90, "aDuplexStatus" },
428 { 91, "aIdleErrorCount"},
429 { 92, "aMACControlID" },
430 { 93, "aMACControlFunctionsSupported" },
431 { 94, "aMACControlFramesTransmitted" },
432 { 95, "aMACControlFramesReceived" },
433 { 96, "aUnsupportedOpcodesReceived" },
434 { 97, "aPAUSELinkDelayAllowance" },
435 { 98, "aPAUSEMACCtrlFramesTransmitted" },
436 { 99, "aPAUSEMACCtrlFramesReceived" },
439 { 102, "aAggDescription" },
441 { 104, "aAggActorSystemID" },
442 { 105, "aAggActorSystemPriority" },
443 { 106, "aAggAggregateOrIndividual" },
444 { 107, "aAggActorAdminKey" },
445 { 108, "aAggActorOperKey" },
446 { 109, "aAggMACAddress" },
447 { 110, "aAggPartnerSystemID" },
448 { 111, "aAggPartnerSystemPriority" },
449 { 112, "aAggPartnerOperKey" },
450 { 113, "aAggAdminState" },
451 { 114, "aAggOperState" },
452 { 115, "aAggTimeOfLastOperChange" },
453 { 116, "aAggDataRate" },
454 { 117, "aAggOctetsTxOK" },
455 { 118, "aAggOctetsRxOK" },
456 { 119, "aAggFramesTxOK" },
457 { 120, "aAggFramesRxOK" },
458 { 121, "aAggMulticastFramesTxOK" },
459 { 122, "aAggMulticastFramesRxOK" },
460 { 123, "aAggBroadcastFramesTxOK" },
461 { 124, "aAggBroadcastFramesRxOK" },
462 { 125, "aAggFramesDiscardedOnTx" },
463 { 126, "aAggFramesDiscardedOnRx" },
464 { 127, "aAggFramesWithTxErrors" },
465 { 128, "aAggFramesWithRxErrors" },
466 { 129, "aAggUnknownProtocolFrames" },
467 { 130, "aAggLinkUpDownNotificationEnable" },
468 { 131, "aAggPortList" },
469 { 132, "aAggCollectorMaxDelay" },
470 { 133, "aAggPortID" },
471 { 134, "aAggPortActorSystemPriority" },
472 { 135, "aAggPortActorSystemID" },
473 { 136, "aAggPortActorAdminKey" },
474 { 137, "aAggPortActorOperKey" },
475 { 138, "aAggPortPartnerAdminSystemPriority" },
476 { 139, "aAggPortPartnerOperSystemPriority" },
477 { 140, "aAggPortPartnerAdminSystemID" },
478 { 141, "aAggPortPartnerOperSystemID" },
479 { 142, "aAggPortPartnerAdminKey" },
480 { 143, "aAggPortPartnerOperKey" },
481 { 144, "aAggPortSelectedAggID" },
482 { 145, "aAggPortAttachedAggID" },
483 { 146, "aAggPortActorPort" },
484 { 147, "aAggPortActorPortPriority" },
485 { 148, "aAggPortPartnerAdminPort" },
486 { 149, "aAggPortPartnerOperPort" },
487 { 150, "aAggPortPartnerAdminPortPriority" },
488 { 151, "aAggPortPartnerOperPortPriority" },
489 { 152, "aAggPortActorAdminState" },
490 { 153, "aAggPortActorOperState" },
491 { 154, "aAggPortPartnerAdminState" },
492 { 155, "aAggPortPartnerOperState" },
493 { 156, "aAggPortAggregateOrIndividual" },
494 { 157, "aAggPortStatsID" },
495 { 158, "aAggPortStatsLACPDUsRx" },
496 { 159, "aAggPortStatsMarkerPDUsRx" },
497 { 160, "aAggPortStatsMarkerResponsePDUsRx" },
498 { 161, "aAggPortStatsUnknownRx" },
499 { 162, "aAggPortStatsIllegalRx" },
500 { 163, "aAggPortStatsLACPDUsTx" },
501 { 164, "aAggPortStatsMarkerPDUsTx" },
502 { 165, "aAggPortStatsMarkerResponsePDUsTx" },
503 { 166, "aAggPortDebugInformationID" },
504 { 167, "aAggPortDebugRxState" },
505 { 168, "aAggPortDebugLastRxTime" },
506 { 169, "aAggPortDebugMuxState" },
507 { 170, "aAggPortDebugMuxReason" },
508 { 171, "aAggPortDebugActorChurnState" },
509 { 172, "aAggPortDebugPartnerChurnState" },
510 { 173, "aAggPortDebugActorChurnCount" },
511 { 174, "aAggPortDebugPartnerChurnCount" },
512 { 175, "aAggPortDebugActorSyncTransitionCount" },
513 { 176, "aAggPortDebugPartnerSyncTransitionCount" },
514 { 177, "aAggPortDebugActorChangeCount" },
515 { 178, "aAggPortDebugPartnerChangeCount" },
519 { 237, "aOAMAdminState" },
521 { 239, "aOAMRemoteMACAddress" },
522 { 240, "aOAMRemoteConfiguration" },
523 { 241, "aOAMRemotePDUConfiguration" },
524 { 242, "aOAMLocalFlagsField" },
525 { 243, "aOAMRemoteFlagsField" },
526 { 244, "aOAMRemoteRevision" },
527 { 245, "aOAMRemoteState" },
528 { 246, "aOAMRemoteVendorOUI" },
529 { 247, "aOAMRemoteVendorSpecificInfo" },
531 { 250, "aOAMUnsupportedCodesRx" },
532 { 251, "aOAMInformationTx" },
533 { 252, "aOAMInformationRx" },
535 { 254, "aOAMUniqueEventNotificationRx" },
536 { 255, "aOAMDuplicateEventNotificationRx" },
537 { 256, "aOAMLoopbackControlTx" },
538 { 257, "aOAMLoopbackControlRx" },
539 { 258, "aOAMVariableRequestTx" },
540 { 259, "aOAMVariableRequestRx" },
541 { 260, "aOAMVariableResponseTx" },
542 { 261, "aOAMVariableResponseRx" },
543 { 262, "aOAMOrganizationSpecificTx" },
544 { 263, "aOAMOrganizationSpecificRx" },
545 { 264, "aOAMLocalErrSymPeriodConfig" },
546 { 265, "aOAMLocalErrSymPeriodEvent" },
547 { 266, "aOAMLocalErrFrameConfig" },
548 { 267, "aOAMLocalErrFrameEvent" },
549 { 268, "aOAMLocalErrFramePeriodConfig" },
550 { 269, "aOAMLocalErrFramePeriodEvent" },
551 { 270, "aOAMLocalErrFrameSecsSummaryConfig" },
552 { 271, "aOAMLocalErrFrameSecsSummaryEvent" },
553 { 272, "aOAMRemoteErrSymPeriodEvent" },
554 { 273, "aOAMRemoteErrFrameEvent" },
555 { 274, "aOAMRemoteErrFramePeriodEvent" },
556 { 275, "aOAMRemoteErrFrameSecsSummaryEvent" },
557 { 276, "aFramesLostDueToOAMError" },
559 { 333, "aOAMDiscoveryState"},
560 { 334, "aOAMLocalConfiguration"},
561 { 335, "aOAMLocalPDUConfiguration"},
562 { 336, "aOAMLocalRevision"},
563 { 337, "aOAMLocalState"},
564 { 338, "aOAMUnsupportedCodesTx" },
565 { 339, "aOAMUniqueEventNotificationTx" },
566 { 340, "aOAMDuplicateEventNotificationTx" },
569 static value_string_ext attribute_vals_ext
= VALUE_STRING_EXT_INIT(attribute_vals
);
572 * In the OAM protocol the {iso(1) member-body(2) us(840) ieee802dot3(10006)
573 * csmacdmgt(30)} prefix for the objects is pre-defined. Only the
574 * package(4) is put in the branch and the leaf is one of the
577 static const value_string indication_vals
[] = {
578 { 0x01, "Variable Container(s) exceeded OAMPDU data field" },
580 { 0x20, "Attribute->Unable to return due to an undetermined error" },
581 { 0x21, "Attribute->Unable to return because it is not supported" },
582 { 0x22, "Attribute->May have been corrupted due to reset" },
583 { 0x23, "Attribute->Unable to return due to a hardware failure" },
584 { 0x24, "Attribute->Experience an overflow error" },
586 { 0x40, "Object->End of object indication" },
587 { 0x41, "Object->Unable to return due to an undetermined error" },
588 { 0x42, "Object->Unable to return because it is not supported" },
589 { 0x43, "Object->May have been corrupted due to reset" },
590 { 0x44, "Object->Unable to return due to a hardware failure" },
592 { 0x60, "Package->End of package indication" },
593 { 0x61, "Package->Unable to return due to an undetermined error" },
594 { 0x62, "Package->Unable to return because it is not supported" },
595 { 0x63, "Package->May have been corrupted due to reset" },
596 { 0x64, "Package->Unable to return due to a hardware failure" },
600 static const value_string status_vals
[] _U_
= {
601 { 0x00, "Unsatisfied, can't complete" },
602 { 0x01, "Discovery in process" },
603 { 0x02, "Satisfied, Discovery complete" },
604 { 0x10, "Satisfied, Discovery complete" },
605 { 0x20, "Discovery in process" },
606 { 0x40, "Satisfied, Discovery complete" },
607 { 0x50, "BUG Satisfied, Discovery complete" },
608 { 0x80, "Discovery in process" },
613 static const value_string branch_vals
[] = {
616 { 6, "nameBinding" },
621 static const value_string parser_vals
[] = {
622 { 0, "Forward non-OAMPDUs to higher sublayer" },
623 { 1, "Loopback non-OAMPDUs to the lower sublayer" },
624 { 2, "Discarding non-OAMPDUs" },
629 static const true_false_string mux
= {
630 "Discard non-OAMPDUs",
631 "Forward non-OAMPDUs to lower sublayer"
634 static const true_false_string oam_mode
= {
635 "DTE configured in Active mode",
636 "DTE configured in Passive mode"
639 static const true_false_string oam_uni
= {
640 "DTE is capable of sending OAMPDUs when rcv path is down",
641 "DTE is not capable of sending OAMPDUs when rcv path is down"
644 static const true_false_string oam_lpbk
= {
645 "DTE is capable of OAM remote loopback mode",
646 "DTE is not capable of OAM remote loopback mode"
649 static const true_false_string oam_event
= {
650 "DTE supports interpreting Link Events",
651 "DTE does not support interpreting Link Events"
654 static const true_false_string oam_var
= {
655 "DTE supports sending Variable Response",
656 "DTE does not support sending Variable Response"
662 #define ITU_OUI_0 0x00
663 #define ITU_OUI_1 0x19
664 #define ITU_OUI_2 0xa7
666 #define ESMC_ITU_SUBTYPE 0x0001
667 #define ESMC_VERSION_1 0x01
668 #define ESMC_QL_TLV_TYPE 0x01
669 #define ESMC_QL_TLV_LENGTH 0x04
670 #define ESMC_TIMESTAMP_TLV_TYPE 0x02
671 #define ESMC_TIMESTAMP_TLV_LENGTH 0x08
673 static const value_string esmc_event_flag_vals
[] = {
674 { 0, "Information ESMC PDU" },
675 { 1, "Time-critical Event ESMC PDU" },
679 static const value_string esmc_tlv_type_vals
[] = {
680 { 1, "Quality Level" },
685 static const value_string esmc_timestamp_valid_flag_vals
[] = {
686 { 0, "Not set. Do not use Timestamp value even if Timestamp TLV present" },
687 { 1, "Set. Timestamp TLV Present" },
691 /* G.781 5.5.1.1 Option I SDH (same in G.707) */
692 static const value_string esmc_quality_level_opt_1_vals
[] = {
693 { 2, "QL-PRC, Primary reference clock (G.811)" },
694 { 4, "QL-SSU-A, Type I or V SSU clock (G.812), 'transit node clock'" },
695 { 8, "QL-SSU-B, Type VI SSU clock (G.812), 'local node clock'" },
696 { 11, "QL-SEC, SEC clock (G.813, Option I) or QL-EEC1 (G.8262)" },
697 { 15, "QL-DNU, 'Do Not Use'" },
701 static const value_string esmc_quality_level_opt_1_vals_short
[] = {
710 #if 0 /*not used yet*/
711 /* G.781 5.5.1.2 Option II SDH synchronization networking */
712 static const value_string esmc_quality_level_opt_2_vals
[] = {
713 { 0, "QL-STU, unknown - signal does not carry the QL message of the source" },
714 { 1, "QL-PRS, PRS clock (G.811) / ST1, Stratum 1 Traceable" },
715 { 4, "QL-TNC, Transit Node Clock (G.812, Type V)" },
716 { 7, "QL-ST2, Stratum 2 clock (G.812, Type II)" },
717 { 10, "QL-ST3, Stratum 3 clock (G.812, Type IV) or QL-EEC2 (G.8262)" },
718 { 12, "QL-SMC, SONET self timed clock (G.813, Option II) / SMC 20 ppm Clock Traceable" },
719 { 13, "QL-ST3E, Stratum 3E clock (G.812, Type III)" },
720 { 14, "QL-PROV, provisionable by the network operator / Reserved for Network Synchronization" },
721 { 15, "QL-DUS, shall not be used for synchronization" },
725 static const value_string esmc_quality_level_opt_2_short
[] = {
739 static const value_string esmc_quality_level_invalid_vals
[] = {
759 /* Initialise the protocol and registered fields */
760 static int proto_slow
= -1;
762 static int hf_slow_subtype
= -1;
764 static int hf_lacpdu_version_number
= -1;
765 static int hf_lacpdu_actor_type
= -1;
766 static int hf_lacpdu_actor_info_len
= -1;
767 static int hf_lacpdu_actor_sys_priority
= -1;
768 static int hf_lacpdu_actor_sys
= -1;
769 static int hf_lacpdu_actor_key
= -1;
770 static int hf_lacpdu_actor_port_priority
= -1;
771 static int hf_lacpdu_actor_port
= -1;
772 static int hf_lacpdu_actor_state
= -1;
773 static int hf_lacpdu_flags_a_activity
= -1;
774 static int hf_lacpdu_flags_a_timeout
= -1;
775 static int hf_lacpdu_flags_a_aggregation
= -1;
776 static int hf_lacpdu_flags_a_sync
= -1;
777 static int hf_lacpdu_flags_a_collecting
= -1;
778 static int hf_lacpdu_flags_a_distrib
= -1;
779 static int hf_lacpdu_flags_a_defaulted
= -1;
780 static int hf_lacpdu_flags_a_expired
= -1;
781 static int hf_lacpdu_actor_reserved
= -1;
783 static int hf_lacpdu_partner_type
= -1;
784 static int hf_lacpdu_partner_info_len
= -1;
785 static int hf_lacpdu_partner_sys_priority
= -1;
786 static int hf_lacpdu_partner_sys
= -1;
787 static int hf_lacpdu_partner_key
= -1;
788 static int hf_lacpdu_partner_port_priority
= -1;
789 static int hf_lacpdu_partner_port
= -1;
790 static int hf_lacpdu_partner_state
= -1;
791 static int hf_lacpdu_flags_p_activity
= -1;
792 static int hf_lacpdu_flags_p_timeout
= -1;
793 static int hf_lacpdu_flags_p_aggregation
= -1;
794 static int hf_lacpdu_flags_p_sync
= -1;
795 static int hf_lacpdu_flags_p_collecting
= -1;
796 static int hf_lacpdu_flags_p_distrib
= -1;
797 static int hf_lacpdu_flags_p_defaulted
= -1;
798 static int hf_lacpdu_flags_p_expired
= -1;
799 static int hf_lacpdu_partner_reserved
= -1;
801 static int hf_lacpdu_coll_type
= -1;
802 static int hf_lacpdu_coll_info_len
= -1;
803 static int hf_lacpdu_coll_max_delay
= -1;
804 static int hf_lacpdu_coll_reserved
= -1;
806 static int hf_lacpdu_term_type
= -1;
807 static int hf_lacpdu_term_len
= -1;
808 static int hf_lacpdu_term_reserved
= -1;
811 static int hf_ossp_oui
= -1;
812 static int hf_itu_subtype
= -1;
813 static int hf_esmc_version
= -1;
814 static int hf_esmc_event_flag
= -1;
815 static int hf_esmc_timestamp_valid_flag
= -1;
816 static int hf_esmc_reserved_32
= -1;
817 static int hf_esmc_tlv
= -1;
818 static int hf_esmc_tlv_type
= -1;
819 static int hf_esmc_tlv_length
= -1;
820 static int hf_esmc_tlv_ql_unused
= -1;
821 static int hf_esmc_tlv_ts_reserved
= -1;
822 static int hf_esmc_quality_level_opt_1
= -1;
823 #if 0 /*not used yet*/
824 static int hf_esmc_quality_level_opt_2
= -1;
826 static int hf_esmc_quality_level_invalid
= -1;
827 static int hf_esmc_timestamp
= -1;
828 static int hf_esmc_padding
= -1;
831 * The Timestamp TLV and Timestamp Valid Flag fields
832 * are proposed in WD56 document for G.8264.
833 * WD56 is not accepted at this moment (June 2009).
835 * The following variable controls dissection of Timestamp fields.
836 * Implementation is not fully complete yet -- in this version
837 * Timestamp dissection is always enabled.
839 * I expect that when WD56 proposal for G.8264 will be accepted,
840 * ESMC Version would be used to control Timestamp dissection.
841 * In this case this variable will be eliminated (replaced).
843 * Until that, a preference which controls Timestamp
844 * dissection may be added, if such need arise.
845 * At the moment this is not practical as nobody needs this.
847 static gboolean pref_decode_esmc_timestamp
= TRUE
;
850 static int hf_marker_version_number
= -1;
851 static int hf_marker_tlv_type
= -1;
852 static int hf_marker_tlv_length
= -1;
853 static int hf_marker_req_port
= -1;
854 static int hf_marker_req_system
= -1;
855 static int hf_marker_req_trans_id
= -1;
858 static int hf_oampdu_flags
= -1;
859 static int hf_oampdu_flags_link_fault
= -1;
860 static int hf_oampdu_flags_dying_gasp
= -1;
861 static int hf_oampdu_flags_critical_event
= -1;
862 static int hf_oampdu_flags_local_evaluating
= -1;
863 static int hf_oampdu_flags_local_stable
= -1;
864 static int hf_oampdu_flags_remote_evaluating
= -1;
865 static int hf_oampdu_flags_remote_stable
= -1;
866 static int hf_oampdu_code
= -1;
868 static int hf_oampdu_info_type
= -1;
869 static int hf_oampdu_info_len
= -1;
870 static int hf_oampdu_info_version
= -1;
871 static int hf_oampdu_info_revision
= -1;
872 static int hf_oampdu_info_state
= -1;
873 static int hf_oampdu_info_oamConfig
= -1;
874 static int hf_oampdu_info_oampduConfig
= -1;
875 static int hf_oampdu_info_oui
= -1;
876 static int hf_oampdu_info_vendor
= -1;
878 static int hf_oampdu_info_state_parser
= -1;
879 static int hf_oampdu_info_state_mux
= -1;
881 static int hf_oampdu_info_oamConfig_mode
= -1;
882 static int hf_oampdu_info_oamConfig_uni
= -1;
883 static int hf_oampdu_info_oamConfig_lpbk
= -1;
884 static int hf_oampdu_info_oamConfig_event
= -1;
885 static int hf_oampdu_info_oamConfig_var
= -1;
887 static int hf_oampdu_event_type
= -1;
888 static int hf_oampdu_event_sequence
= -1;
889 static int hf_oampdu_event_length
= -1;
890 static int hf_oampdu_event_timeStamp
= -1;
892 static int hf_oampdu_event_espeWindow
= -1;
893 static int hf_oampdu_event_espeThreshold
= -1;
894 static int hf_oampdu_event_espeErrors
= -1;
895 static int hf_oampdu_event_espeTotalErrors
= -1;
896 static int hf_oampdu_event_espeTotalEvents
= -1;
898 static int hf_oampdu_event_efeWindow
= -1;
899 static int hf_oampdu_event_efeThreshold
= -1;
900 static int hf_oampdu_event_efeErrors
= -1;
901 static int hf_oampdu_event_efeTotalErrors
= -1;
902 static int hf_oampdu_event_efeTotalEvents
= -1;
904 static int hf_oampdu_event_efpeWindow
= -1;
905 static int hf_oampdu_event_efpeThreshold
= -1;
906 static int hf_oampdu_event_efpeErrors
= -1;
907 static int hf_oampdu_event_efpeTotalErrors
= -1;
908 static int hf_oampdu_event_efpeTotalEvents
= -1;
910 static int hf_oampdu_event_efsseWindow
= -1;
911 static int hf_oampdu_event_efsseThreshold
= -1;
912 static int hf_oampdu_event_efsseErrors
= -1;
913 static int hf_oampdu_event_efsseTotalErrors
= -1;
914 static int hf_oampdu_event_efsseTotalEvents
= -1;
916 static int hf_oampdu_variable_branch
= -1;
917 static int hf_oampdu_variable_object
= -1;
918 static int hf_oampdu_variable_package
= -1;
919 static int hf_oampdu_variable_binding
= -1;
920 static int hf_oampdu_variable_attribute
= -1;
921 static int hf_oampdu_variable_width
= -1;
922 static int hf_oampdu_variable_indication
= -1;
923 static int hf_oampdu_variable_value
= -1;
925 static int hf_oampdu_lpbk
= -1;
926 static int hf_oampdu_lpbk_enable
= -1;
927 static int hf_oampdu_lpbk_disable
= -1;
930 /* Initialise the subtree pointers */
932 static gint ett_pdu
= -1;
934 static gint ett_lacpdu
= -1;
935 static gint ett_lacpdu_a_flags
= -1;
936 static gint ett_lacpdu_p_flags
= -1;
938 static gint ett_marker
= -1;
939 static gint ett_esmc
= -1;
941 static gint ett_oampdu
= -1;
942 static gint ett_oampdu_flags
= -1;
944 static gint ett_oampdu_local_info
= -1;
945 static gint ett_oampdu_local_info_state
= -1;
946 static gint ett_oampdu_local_info_config
= -1;
947 static gint ett_oampdu_remote_info
= -1;
948 static gint ett_oampdu_remote_info_state
= -1;
949 static gint ett_oampdu_remote_info_config
= -1;
950 static gint ett_oampdu_org_info
= -1;
952 static gint ett_oampdu_event_espe
= -1;
953 static gint ett_oampdu_event_efe
= -1;
954 static gint ett_oampdu_event_efpe
= -1;
955 static gint ett_oampdu_event_efsse
= -1;
956 static gint ett_oampdu_event_ose
= -1;
958 static gint ett_oampdu_lpbk_ctrl
= -1;
960 static gint ett_ossppdu
= -1;
961 static gint ett_itu_ossp
= -1;
963 static expert_field ei_esmc_tlv_type_ql_type_not_first
= EI_INIT
;
964 static expert_field ei_esmc_tlv_type_not_timestamp
= EI_INIT
;
965 static expert_field ei_esmc_quality_level_invalid
= EI_INIT
;
966 static expert_field ei_esmc_tlv_ql_unused_not_zero
= EI_INIT
;
967 static expert_field ei_esmc_tlv_type_decoded_as_timestamp
= EI_INIT
;
968 static expert_field ei_esmc_tlv_type_decoded_as_ql_type
= EI_INIT
;
969 static expert_field ei_esmc_version_compliance
= EI_INIT
;
970 static expert_field ei_oampdu_event_length_bad
= EI_INIT
;
971 static expert_field ei_esmc_tlv_length_bad
= EI_INIT
;
972 static expert_field ei_esmc_reserved_not_zero
= EI_INIT
;
974 static const char initial_sep
[] = " (";
975 static const char cont_sep
[] = ", ";
977 static dissector_handle_t dh_data
;
979 #define APPEND_BOOLEAN_FLAG(flag, item, string) \
982 proto_item_append_text(item, string, sep); \
987 #define APPEND_OUI_NAME(item, string, tvb, offset) \
989 string = tvb_get_manuf_name(tvb, offset); \
990 proto_item_append_text(item, " ("); \
991 proto_item_append_text(item, "%s", string); \
992 proto_item_append_text(item, ")"); \
996 dissect_lacp_pdu(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
);
999 dissect_marker_pdu(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
);
1002 dissect_ossp_pdu(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
);
1005 dissect_oampdu(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
);
1008 dissect_oampdu_information(tvbuff_t
*tvb
, proto_tree
*tree
);
1011 dissect_oampdu_event_notification(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
);
1014 dissect_oampdu_variable_request(tvbuff_t
*tvb
, proto_tree
*tree
);
1017 dissect_oampdu_variable_response(tvbuff_t
*tvb
, proto_tree
*tree
);
1020 dissect_oampdu_loopback_control(tvbuff_t
*tvb
, proto_tree
*tree
);
1023 dissect_oampdu_vendor_specific(tvbuff_t
*tvb
, proto_tree
*tree
);
1026 dissect_esmc_pdu(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*treex
);
1029 dissect_itu_ossp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
);
1032 * Name: dissect_slow_protocols
1035 * This function is used to dissect the slow protocols defined in IEEE802.3
1036 * CSMA/CD. The current slow protocols subtypes are define in ANNEX 43B of
1037 * the 802.3 document. In case of an unsupported slow protocol, we only
1038 * fill the protocol and info columns.
1041 * tvb: buffer associated with the rcv packet (see tvbuff.h).
1042 * pinfo: structure associated with the rcv packet (see packet_info.h).
1043 * tree: the protocol tree associated with the rcv packet (see proto.h).
1049 * Dominique Bastien (dbastien@accedian.com)
1050 * + add support for OAM slow protocol (defined in clause 57).
1051 * + add support for Marker slow protocol (defined in clause 43).
1052 * Artem Tamazov (artem.tamazov@telllabs.com)
1053 * + add support for ESMC (Ethernet Synchronization Messaging Channel),
1054 * (defined in G.8264/Y.1364 clause 11).
1057 dissect_slow_protocols(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
1060 proto_tree
*pdu_tree
;
1061 proto_item
*pdu_item
;
1063 subtype
= tvb_get_guint8(tvb
, 0);
1068 dissect_lacp_pdu(tvb
, pinfo
, tree
);
1070 case MARKER_SUBTYPE
:
1071 dissect_marker_pdu(tvb
, pinfo
, tree
);
1074 dissect_oampdu(tvb
, pinfo
, tree
);
1077 dissect_ossp_pdu(tvb
, pinfo
, tree
);
1081 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "Slow Protocols");
1082 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Unknown Subtype = %u.", subtype
);
1086 pdu_item
= proto_tree_add_item(tree
, proto_slow
, tvb
,
1088 pdu_tree
= proto_item_add_subtree(pdu_item
, ett_pdu
);
1091 proto_tree_add_item(pdu_tree
, hf_slow_subtype
, tvb
,
1092 0, 1, ENC_BIG_ENDIAN
);
1101 * Name: dissect_lacp_pdu
1104 * This function is used to dissect the Link Aggregation Control Protocol
1105 * slow protocols defined in IEEE802.3 clause 43.3.
1108 * tvb: buffer associated with the rcv packet (see tvbuff.h).
1109 * pinfo: structure associated with the rcv packet (see packet_info.h).
1110 * tree: the protocol tree associated with the rcv packet (see proto.h).
1112 * Return Values: None
1117 dissect_lacp_pdu(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
1124 proto_tree
*lacpdu_tree
;
1125 proto_item
*lacpdu_item
;
1126 proto_tree
*actor_flags_tree
;
1127 proto_item
*actor_flags_item
;
1128 proto_tree
*partner_flags_tree
;
1129 proto_item
*partner_flags_item
;
1134 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "LACP");
1135 col_set_str(pinfo
->cinfo
, COL_INFO
, "Link Aggregation Control Protocol");
1139 /* Add LACP Heading */
1140 lacpdu_item
= proto_tree_add_protocol_format(tree
, proto_slow
, tvb
,
1141 0, -1, "Link Aggregation Control Protocol");
1142 lacpdu_tree
= proto_item_add_subtree(lacpdu_item
, ett_lacpdu
);
1145 proto_tree_add_item(lacpdu_tree
, hf_slow_subtype
, tvb
,
1146 0, 1, ENC_BIG_ENDIAN
);
1148 /* Version Number */
1149 raw_octet
= tvb_get_guint8(tvb
, LACPDU_VERSION_NUMBER
);
1150 proto_tree_add_uint(lacpdu_tree
, hf_lacpdu_version_number
, tvb
,
1151 LACPDU_VERSION_NUMBER
, 1, raw_octet
);
1153 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Version %d. ", raw_octet
);
1156 raw_octet
= tvb_get_guint8(tvb
, LACPDU_ACTOR_TYPE
);
1157 proto_tree_add_uint(lacpdu_tree
, hf_lacpdu_actor_type
, tvb
,
1158 LACPDU_ACTOR_TYPE
, 1, raw_octet
);
1160 /* Actor Info Length */
1161 raw_octet
= tvb_get_guint8(tvb
, LACPDU_ACTOR_INFO_LEN
);
1162 proto_tree_add_uint(lacpdu_tree
, hf_lacpdu_actor_info_len
, tvb
,
1163 LACPDU_ACTOR_INFO_LEN
, 1, raw_octet
);
1165 /* Actor System Priority */
1167 raw_word
= tvb_get_ntohs(tvb
, LACPDU_ACTOR_SYS_PRIORITY
);
1168 proto_tree_add_uint(lacpdu_tree
, hf_lacpdu_actor_sys_priority
, tvb
,
1169 LACPDU_ACTOR_SYS_PRIORITY
, 2, raw_word
);
1172 proto_tree_add_item(lacpdu_tree
, hf_lacpdu_actor_sys
, tvb
,
1173 LACPDU_ACTOR_SYSTEM
, 6, ENC_NA
);
1177 raw_word
= tvb_get_ntohs(tvb
, LACPDU_ACTOR_KEY
);
1178 proto_tree_add_uint(lacpdu_tree
, hf_lacpdu_actor_key
, tvb
,
1179 LACPDU_ACTOR_KEY
, 2, raw_word
);
1181 /* Actor Port Priority */
1183 raw_word
= tvb_get_ntohs(tvb
, LACPDU_ACTOR_PORT_PRIORITY
);
1184 proto_tree_add_uint(lacpdu_tree
, hf_lacpdu_actor_port_priority
, tvb
,
1185 LACPDU_ACTOR_PORT_PRIORITY
, 2, raw_word
);
1189 raw_word
= tvb_get_ntohs(tvb
, LACPDU_ACTOR_PORT
);
1190 proto_tree_add_uint(lacpdu_tree
, hf_lacpdu_actor_port
, tvb
,
1191 LACPDU_ACTOR_PORT
, 2, raw_word
);
1193 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Actor Port = %d ", raw_word
);
1197 flags
= tvb_get_guint8(tvb
, LACPDU_ACTOR_STATE
);
1198 actor_flags_item
= proto_tree_add_uint(lacpdu_tree
, hf_lacpdu_actor_state
, tvb
,
1199 LACPDU_ACTOR_STATE
, 1, flags
);
1200 actor_flags_tree
= proto_item_add_subtree(actor_flags_item
, ett_lacpdu_a_flags
);
1206 APPEND_BOOLEAN_FLAG(flags
& LACPDU_FLAGS_ACTIVITY
, actor_flags_item
,
1208 proto_tree_add_boolean(actor_flags_tree
, hf_lacpdu_flags_a_activity
, tvb
,
1209 LACPDU_ACTOR_STATE
, 1, flags
);
1213 APPEND_BOOLEAN_FLAG(flags
& LACPDU_FLAGS_TIMEOUT
, actor_flags_item
,
1215 proto_tree_add_boolean(actor_flags_tree
, hf_lacpdu_flags_a_timeout
, tvb
,
1216 LACPDU_ACTOR_STATE
, 1, flags
);
1218 /* Aggregation Flag */
1220 APPEND_BOOLEAN_FLAG(flags
& LACPDU_FLAGS_AGGREGATION
, actor_flags_item
,
1222 proto_tree_add_boolean(actor_flags_tree
, hf_lacpdu_flags_a_aggregation
, tvb
,
1223 LACPDU_ACTOR_STATE
, 1, flags
);
1225 /* Synchronization Flag */
1227 APPEND_BOOLEAN_FLAG(flags
& LACPDU_FLAGS_SYNC
, actor_flags_item
,
1228 "%sSynchronization");
1229 proto_tree_add_boolean(actor_flags_tree
, hf_lacpdu_flags_a_sync
, tvb
,
1230 LACPDU_ACTOR_STATE
, 1, flags
);
1232 /* Collecting Flag */
1234 APPEND_BOOLEAN_FLAG(flags
& LACPDU_FLAGS_COLLECTING
, actor_flags_item
,
1236 proto_tree_add_boolean(actor_flags_tree
, hf_lacpdu_flags_a_collecting
, tvb
,
1237 LACPDU_ACTOR_STATE
, 1, flags
);
1240 /* Distributing Flag */
1242 APPEND_BOOLEAN_FLAG(flags
& LACPDU_FLAGS_DISTRIB
, actor_flags_item
,
1244 proto_tree_add_boolean(actor_flags_tree
, hf_lacpdu_flags_a_distrib
, tvb
,
1245 LACPDU_ACTOR_STATE
, 1, flags
);
1247 /* Defaulted Flag */
1249 APPEND_BOOLEAN_FLAG(flags
& LACPDU_FLAGS_DEFAULTED
, actor_flags_item
,
1251 proto_tree_add_boolean(actor_flags_tree
, hf_lacpdu_flags_a_defaulted
, tvb
,
1252 LACPDU_ACTOR_STATE
, 1, flags
);
1256 APPEND_BOOLEAN_FLAG(flags
& LACPDU_FLAGS_EXPIRED
, actor_flags_item
,
1258 proto_tree_add_boolean(actor_flags_tree
, hf_lacpdu_flags_a_expired
, tvb
,
1259 LACPDU_ACTOR_STATE
, 1, flags
);
1261 if (sep
!= initial_sep
)
1263 /* We put something in; put in the terminating ")" */
1264 proto_item_append_text(actor_flags_item
, ")");
1267 /* Actor Reserved */
1269 proto_tree_add_item(lacpdu_tree
, hf_lacpdu_actor_reserved
, tvb
,
1270 LACPDU_ACTOR_RESERVED
, 3, ENC_NA
);
1274 raw_octet
= tvb_get_guint8(tvb
, LACPDU_PARTNER_TYPE
);
1275 proto_tree_add_uint(lacpdu_tree
, hf_lacpdu_partner_type
, tvb
,
1276 LACPDU_PARTNER_TYPE
, 1, raw_octet
);
1278 /* Partner Info Length */
1279 raw_octet
= tvb_get_guint8(tvb
, LACPDU_PARTNER_INFO_LEN
);
1280 proto_tree_add_uint(lacpdu_tree
, hf_lacpdu_partner_info_len
, tvb
,
1281 LACPDU_PARTNER_INFO_LEN
, 1, raw_octet
);
1283 /* Partner System Priority */
1285 raw_word
= tvb_get_ntohs(tvb
, LACPDU_PARTNER_SYS_PRIORITY
);
1286 proto_tree_add_uint(lacpdu_tree
, hf_lacpdu_partner_sys_priority
, tvb
,
1287 LACPDU_PARTNER_SYS_PRIORITY
, 2, raw_word
);
1289 /* Partner System */
1291 proto_tree_add_item(lacpdu_tree
, hf_lacpdu_partner_sys
, tvb
,
1292 LACPDU_PARTNER_SYSTEM
, 6, ENC_NA
);
1296 raw_word
= tvb_get_ntohs(tvb
, LACPDU_PARTNER_KEY
);
1297 proto_tree_add_uint(lacpdu_tree
, hf_lacpdu_partner_key
, tvb
,
1298 LACPDU_PARTNER_KEY
, 2, raw_word
);
1300 /* Partner Port Priority */
1302 raw_word
= tvb_get_ntohs(tvb
, LACPDU_PARTNER_PORT_PRIORITY
);
1303 proto_tree_add_uint(lacpdu_tree
, hf_lacpdu_partner_port_priority
, tvb
,
1304 LACPDU_PARTNER_PORT_PRIORITY
, 2, raw_word
);
1308 raw_word
= tvb_get_ntohs(tvb
, LACPDU_PARTNER_PORT
);
1309 proto_tree_add_uint(lacpdu_tree
, hf_lacpdu_partner_port
, tvb
,
1310 LACPDU_PARTNER_PORT
, 2, raw_word
);
1312 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Partner Port = %d ", raw_word
);
1316 flags
= tvb_get_guint8(tvb
, LACPDU_PARTNER_STATE
);
1317 partner_flags_item
= proto_tree_add_uint(lacpdu_tree
, hf_lacpdu_partner_state
, tvb
,
1318 LACPDU_PARTNER_STATE
, 1, flags
);
1319 partner_flags_tree
= proto_item_add_subtree(partner_flags_item
, ett_lacpdu_p_flags
);
1325 APPEND_BOOLEAN_FLAG(flags
& LACPDU_FLAGS_ACTIVITY
, partner_flags_item
,
1327 proto_tree_add_boolean(partner_flags_tree
, hf_lacpdu_flags_p_activity
, tvb
,
1328 LACPDU_PARTNER_STATE
, 1, flags
);
1332 APPEND_BOOLEAN_FLAG(flags
& LACPDU_FLAGS_TIMEOUT
, partner_flags_item
,
1334 proto_tree_add_boolean(partner_flags_tree
, hf_lacpdu_flags_p_timeout
, tvb
,
1335 LACPDU_PARTNER_STATE
, 1, flags
);
1337 /* Aggregation Flag */
1339 APPEND_BOOLEAN_FLAG(flags
& LACPDU_FLAGS_AGGREGATION
, partner_flags_item
,
1341 proto_tree_add_boolean(partner_flags_tree
, hf_lacpdu_flags_p_aggregation
, tvb
,
1342 LACPDU_PARTNER_STATE
, 1, flags
);
1344 /* Synchronization Flag */
1346 APPEND_BOOLEAN_FLAG(flags
& LACPDU_FLAGS_SYNC
, partner_flags_item
,
1347 "%sSynchronization");
1348 proto_tree_add_boolean(partner_flags_tree
, hf_lacpdu_flags_p_sync
, tvb
,
1349 LACPDU_PARTNER_STATE
, 1, flags
);
1351 /* Collecting Flag */
1353 APPEND_BOOLEAN_FLAG(flags
& LACPDU_FLAGS_COLLECTING
, partner_flags_item
,
1355 proto_tree_add_boolean(partner_flags_tree
, hf_lacpdu_flags_p_collecting
, tvb
,
1356 LACPDU_PARTNER_STATE
, 1, flags
);
1359 /* Distributing Flag */
1361 APPEND_BOOLEAN_FLAG(flags
& LACPDU_FLAGS_DISTRIB
, partner_flags_item
,
1363 proto_tree_add_boolean(partner_flags_tree
, hf_lacpdu_flags_p_distrib
, tvb
,
1364 LACPDU_PARTNER_STATE
, 1, flags
);
1366 /* Defaulted Flag */
1368 APPEND_BOOLEAN_FLAG(flags
& LACPDU_FLAGS_DEFAULTED
, partner_flags_item
,
1370 proto_tree_add_boolean(partner_flags_tree
, hf_lacpdu_flags_p_defaulted
, tvb
,
1371 LACPDU_PARTNER_STATE
, 1, flags
);
1375 APPEND_BOOLEAN_FLAG(flags
& LACPDU_FLAGS_EXPIRED
, partner_flags_item
,
1377 proto_tree_add_boolean(partner_flags_tree
, hf_lacpdu_flags_p_expired
, tvb
,
1378 LACPDU_PARTNER_STATE
, 1, flags
);
1380 if (sep
!= initial_sep
)
1382 /* We put something in; put in the terminating ")" */
1383 proto_item_append_text(partner_flags_item
, ")");
1386 /* Partner Reserved */
1388 proto_tree_add_item(lacpdu_tree
, hf_lacpdu_partner_reserved
, tvb
,
1389 LACPDU_PARTNER_RESERVED
, 3, ENC_NA
);
1392 /* Collector Type */
1393 raw_octet
= tvb_get_guint8(tvb
, LACPDU_COLL_TYPE
);
1394 proto_tree_add_uint(lacpdu_tree
, hf_lacpdu_coll_type
, tvb
,
1395 LACPDU_COLL_TYPE
, 1, raw_octet
);
1397 /* Collector Info Length */
1398 raw_octet
= tvb_get_guint8(tvb
, LACPDU_COLL_INFO_LEN
);
1399 proto_tree_add_uint(lacpdu_tree
, hf_lacpdu_coll_info_len
, tvb
,
1400 LACPDU_COLL_INFO_LEN
, 1, raw_octet
);
1402 /* Collector Max Delay */
1404 raw_word
= tvb_get_ntohs(tvb
, LACPDU_COLL_MAX_DELAY
);
1405 proto_tree_add_uint(lacpdu_tree
, hf_lacpdu_coll_max_delay
, tvb
,
1406 LACPDU_COLL_MAX_DELAY
, 2, raw_word
);
1408 /* Collector Reserved */
1410 proto_tree_add_item(lacpdu_tree
, hf_lacpdu_coll_reserved
, tvb
,
1411 LACPDU_COLL_RESERVED
, 12, ENC_NA
);
1413 /* Terminator Type */
1414 raw_octet
= tvb_get_guint8(tvb
, LACPDU_TERM_TYPE
);
1415 proto_tree_add_uint(lacpdu_tree
, hf_lacpdu_term_type
, tvb
,
1416 LACPDU_TERM_TYPE
, 1, raw_octet
);
1418 /* Terminator Info Length */
1419 raw_octet
= tvb_get_guint8(tvb
, LACPDU_TERM_LEN
);
1420 proto_tree_add_uint(lacpdu_tree
, hf_lacpdu_term_len
, tvb
,
1421 LACPDU_TERM_LEN
, 1, raw_octet
);
1423 /* Terminator Reserved */
1425 proto_tree_add_item(lacpdu_tree
, hf_lacpdu_term_reserved
, tvb
,
1426 LACPDU_TERM_RESERVED
, 50, ENC_NA
);
1431 * Name: dissect_marker_pdu
1434 * This function is used to dissect the Link Aggregation Marker Protocol
1435 * slow protocols defined in IEEE802.3 clause 43.5 (The PDUs are defined
1436 * in section 43.5.3.2). The TLV types are 0x01 for a marker TLV and 0x02
1437 * for a marker response. A value of 0x00 indicates an end of message.
1440 * tvb: buffer associated with the rcv packet (see tvbuff.h).
1441 * pinfo: structure associated with the rcv packet (see packet_info.h).
1442 * tree: the protocol tree associated with the rcv packet (see proto.h).
1444 * Return Values: None
1447 * Dominique Bastien (dbastien@accedian.com)
1448 * + add support for MARKER and MARKER Response PDUs.
1451 dissect_marker_pdu(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
1458 proto_tree
*marker_tree
;
1459 proto_item
*marker_item
;
1462 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "MARKER");
1463 col_set_str(pinfo
->cinfo
, COL_INFO
, "Marker Protocol");
1467 marker_item
= proto_tree_add_protocol_format(tree
, proto_slow
, tvb
,
1468 0, -1, "Marker Protocol");
1469 marker_tree
= proto_item_add_subtree(marker_item
, ett_marker
);
1472 proto_tree_add_item(marker_tree
, hf_slow_subtype
, tvb
,
1473 0, 1, ENC_BIG_ENDIAN
);
1477 /* Version Number */
1478 raw_octet
= tvb_get_guint8(tvb
, offset
);
1479 proto_tree_add_uint(marker_tree
, hf_marker_version_number
, tvb
,
1480 offset
, 1, raw_octet
);
1487 raw_octet
= tvb_get_guint8(tvb
, offset
);
1489 if (raw_octet
==0) break;
1491 proto_tree_add_uint(marker_tree
, hf_marker_tlv_type
, tvb
,
1492 offset
, 1, raw_octet
);
1497 raw_octet
= tvb_get_guint8(tvb
, offset
);
1498 proto_tree_add_uint(marker_tree
, hf_marker_tlv_length
, tvb
,
1499 offset
, 1, raw_octet
);
1502 /* Requester Port */
1503 raw_word
= tvb_get_ntohs(tvb
, offset
);
1504 proto_tree_add_uint(marker_tree
, hf_marker_req_port
, tvb
,
1505 offset
, 2, raw_word
);
1508 /* Requester System */
1509 proto_tree_add_item(marker_tree
, hf_marker_req_system
, tvb
,
1513 /* Requester Transaction ID */
1514 dword
= tvb_get_ntohl(tvb
, offset
);
1515 proto_tree_add_uint(marker_tree
, hf_marker_req_trans_id
, tvb
,
1526 * Name: dissect_ossp_pdu
1529 * This function is used to dissect the Organization Specific Slow
1530 * Protocol defined in IEEE 802.3 Annex 57B. Currently only the ESMC
1531 * slow protocol as defined in ITU-T G.8264 is implemented
1534 * tvb: buffer associated with the rcv packet (see tvbuff.h).
1535 * pinfo: structure associated with the rcv packet (see packet_info.h).
1536 * tree: the protocol tree associated with the rcv packet (see proto.h).
1538 * Return Values: None
1541 * Roberto Morro (roberto.morro[AT]tilab.com)
1544 dissect_ossp_pdu(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
1548 proto_item
*oui_item
, *ossp_item
;
1549 proto_tree
*ossp_tree
;
1551 const guint8 itu_oui
[] = {ITU_OUI_0
, ITU_OUI_1
, ITU_OUI_2
};
1553 /* OUI of the organization defining the protocol */
1554 str
= tvb_get_manuf_name(tvb
, offset
+1);
1556 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "OSSP");
1557 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "OUI: %s", str
);
1559 ossp_item
= proto_tree_add_protocol_format(tree
, proto_slow
, tvb
, 0, -1,
1560 "Organization Specific Slow Protocol");
1561 ossp_tree
= proto_item_add_subtree(ossp_item
, ett_ossppdu
);
1563 /* Slow Protocol Subtype */
1564 proto_tree_add_item(ossp_tree
, hf_slow_subtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1567 oui_item
= proto_tree_add_item(ossp_tree
, hf_ossp_oui
,
1568 tvb
, offset
, OUI_SIZE
, ENC_NA
);
1569 proto_item_append_text(oui_item
, " (%s)", str
);
1572 ossp_tvb
= tvb_new_subset_remaining(tvb
, offset
);
1573 if (tvb_memeql(tvb
, 1, itu_oui
, OUI_SIZE
) == 0)
1575 dissect_itu_ossp(ossp_tvb
, pinfo
, ossp_tree
);
1577 /* new Organization Specific Slow Protocols go hereafter */
1579 else if (tvb_memeql(tvb
, 1, xxx_oui
, OUI_SIZE
) == 0)
1581 dissect_xxx_ossp(ossp_tvb
, pinfo
, ossp_tree
);
1583 else if (tvb_memeql(tvb
, 1, yyy_oui
, OUI_SIZE
) == 0)
1585 dissect_yyy_ossp(ossp_tvb
, pinfo
, ossp_tree
);
1590 proto_item_append_text(oui_item
, " (Unknown OSSP organization)");
1596 * Name: dissect_itu_ossp
1599 * This function is used to dissect the ITU-T OSSP (Organization Specific
1600 * Slow Protocol). Currently only the Ethernet Synchronization
1601 * Messaging Channel (ESMC) slow protocol as defined in ITU-T G.8264
1605 * tvb: buffer associated with the rcv packet (see tvbuff.h).
1606 * pinfo: structure associated with the rcv packet (see packet_info.h).
1607 * tree: the protocol tree associated with the rcv packet (see proto.h).
1608 * subtype: the protocol subtype (according to IEEE802.3 annex 57B)
1610 * Return Values: None
1613 * Roberto Morro (roberto.morro[AT]tilab.com)
1617 dissect_itu_ossp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
1620 proto_tree
*itu_ossp_tree
, *ti
;
1622 /* ITU-T OSSP Subtype */
1623 subtype
= tvb_get_ntohs(tvb
, 0);
1624 ti
= proto_tree_add_item(tree
, hf_itu_subtype
, tvb
, 0, 2, ENC_BIG_ENDIAN
);
1626 itu_ossp_tree
= proto_item_add_subtree(ti
, ett_itu_ossp
);
1630 case ESMC_ITU_SUBTYPE
:
1631 dissect_esmc_pdu(tvb
, pinfo
, itu_ossp_tree
);
1634 /* Other ITU-T defined slow protocols go hereafter */
1636 case XXXX_ITU_SUBTYPE
:
1637 dissect_xxxx_pdu(tvb
, pinfo
, itu_ossp_tree
);
1641 proto_item_append_text(itu_ossp_tree
, " (Unknown)");
1646 * This function is used to dissect ESMC PDU defined G.8264/Y.1364 clause 11.3.1.1.
1648 * Added: TimeStamp TLV as per WD56 proposal for G.8264,
1649 * "TLVs for ESMC and Querying Capability".
1652 dissect_esmc_pdu(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*treex
)
1654 gint offset
= 2; /*starting from ESMC Version */
1655 gboolean event_flag
;
1656 gboolean malformed
= FALSE
;
1657 gint ql
= -1; /*negative means unknown:*/
1658 gboolean timestamp_valid_flag
= FALSE
; /*set if timestamp valid*/
1659 gint32 timestamp
= -1; /*nanoseconds*/
1661 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "ESMC");
1663 proto_item_append_text(treex
, ": ESMC");
1666 tree_a
= proto_item_add_subtree(treex
, ett_esmc
);
1670 item_b
= proto_tree_add_item(tree_a
, hf_esmc_version
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1671 if ((tvb_get_guint8(tvb
, offset
) >> 4) != ESMC_VERSION_1
)
1674 expert_add_info_format(pinfo
, item_b
, &ei_esmc_version_compliance
, "Version must be 0x%.1x claim compliance with Version 1 of this protocol", ESMC_VERSION_1
);
1676 /*stay at the same octet in tvb*/
1679 event_flag
= ((tvb_get_guint8(tvb
, offset
) & 0x08) != 0);
1680 proto_tree_add_item(tree_a
, hf_esmc_event_flag
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1681 /*stay at the same octet in tvb*/
1683 if (pref_decode_esmc_timestamp
)
1684 { /* timestamp valid flag */
1685 timestamp_valid_flag
= ((tvb_get_guint8(tvb
, offset
) & 0x04) != 0);
1686 proto_tree_add_item(tree_a
, hf_esmc_timestamp_valid_flag
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1687 /*stay at the same octet in tvb*/
1689 { /* reserved bits */
1692 reserved
= tvb_get_ntohl(tvb
, offset
)
1693 & (pref_decode_esmc_timestamp
? 0x3ffffff : 0x7ffffff);
1694 item_b
= proto_tree_add_uint_format_value(tree_a
, hf_esmc_reserved_32
, tvb
, offset
, 4
1695 , reserved
, "0x%.7x", reserved
);
1696 if (reserved
!= 0x0)
1699 expert_add_info_format(pinfo
, item_b
, &ei_esmc_reserved_not_zero
, "Reserved bits must be set to all zero on transmitter");
1703 proto_item_append_text(treex
, ", Event:%s", event_flag
?
1704 "Time-critical" : "Information");
1707 * Quality Level TLV is mandatory at fixed location.
1712 item_b
= proto_tree_add_item(tree_a
, hf_esmc_tlv
, tvb
, offset
, 4, ENC_NA
);
1715 tree_b
= proto_item_add_subtree(item_b
, ett_esmc
);
1722 type
= tvb_get_guint8(tvb
, offset
);
1723 item_c
= proto_tree_add_item(tree_b
, hf_esmc_tlv_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1724 if (type
!= ESMC_QL_TLV_TYPE
)
1727 expert_add_info_format(pinfo
, item_c
, &ei_esmc_tlv_type_ql_type_not_first
, "TLV Type must be == 0x%.2x (QL) because QL TLV must be first in the ESMC PDU", ESMC_QL_TLV_TYPE
);
1728 expert_add_info(pinfo
, item_c
, &ei_esmc_tlv_type_decoded_as_ql_type
);
1733 length
= tvb_get_ntohs(tvb
, offset
);
1734 item_c
= proto_tree_add_item(tree_b
, hf_esmc_tlv_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1735 if (length
!= ESMC_QL_TLV_LENGTH
)
1738 expert_add_info_format(pinfo
, item_c
, &ei_esmc_tlv_length_bad
, "QL TLV Length must be == 0x%.4x", ESMC_QL_TLV_LENGTH
);
1739 expert_add_info_format(pinfo
, item_c
, &ei_esmc_tlv_type_decoded_as_ql_type
, "Let's decode this TLV as if Length has valid value");
1744 unused
= tvb_get_guint8(tvb
, offset
); /*as temp var*/
1747 item_c
= proto_tree_add_item(tree_b
, hf_esmc_tlv_ql_unused
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1751 expert_add_info(pinfo
, item_c
, &ei_esmc_tlv_ql_unused_not_zero
);
1753 if (NULL
!= try_val_to_str(ql
, esmc_quality_level_opt_1_vals
))
1755 proto_tree_add_item(tree_b
, hf_esmc_quality_level_opt_1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1759 item_c
= proto_tree_add_item(tree_b
, hf_esmc_quality_level_invalid
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1760 expert_add_info(pinfo
, item_c
, &ei_esmc_quality_level_invalid
);
1765 proto_item_append_text(item_b
, ", %s"
1766 , val_to_str(ql
, esmc_quality_level_opt_1_vals_short
, "QL-INV%d"));
1768 proto_item_append_text(treex
, ", %s"
1769 , val_to_str(ql
, esmc_quality_level_opt_1_vals_short
, "QL-INV%d"));
1771 if (pref_decode_esmc_timestamp
)
1774 * Timestamp TLV is optional at fixed location.
1775 * Decode it if Timestamp Valid flag is set,
1776 * or if type of next TLV is 0x02.
1779 type
= tvb_get_guint8(tvb
, offset
);
1781 if (timestamp_valid_flag
|| type
== ESMC_TIMESTAMP_TLV_TYPE
)
1784 item_b
= proto_tree_add_item(tree_a
, hf_esmc_tlv
, tvb
, offset
, 8, ENC_NA
);
1787 tree_b
= proto_item_add_subtree(item_b
, ett_esmc
);
1794 item_c
= proto_tree_add_item(tree_b
, hf_esmc_tlv_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1795 if (type
!= ESMC_TIMESTAMP_TLV_TYPE
)
1798 expert_add_info_format(pinfo
, item_c
, &ei_esmc_tlv_type_not_timestamp
, "TLV Type must be == 0x%.2x (Timestamp) because Timestamp Valid Flag is set", ESMC_TIMESTAMP_TLV_TYPE
);
1799 expert_add_info(pinfo
, item_c
, &ei_esmc_tlv_type_decoded_as_timestamp
);
1804 length
= tvb_get_ntohs(tvb
, offset
);
1805 item_c
= proto_tree_add_item(tree_b
, hf_esmc_tlv_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1806 if (length
!= ESMC_TIMESTAMP_TLV_LENGTH
)
1809 expert_add_info_format(pinfo
, item_c
, &ei_esmc_tlv_length_bad
, "Timestamp TLV Length must be == 0x%.4x", ESMC_TIMESTAMP_TLV_LENGTH
);
1810 expert_add_info_format(pinfo
, item_c
, &ei_esmc_tlv_type_decoded_as_timestamp
, "Let's decode this TLV as if Length has valid value");
1815 timestamp
= (gint32
)tvb_get_ntohl(tvb
, offset
);
1816 item_c
= proto_tree_add_item(tree_b
, hf_esmc_timestamp
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1817 if (!timestamp_valid_flag
) proto_item_append_text(item_c
, " [invalid]");
1821 reserved
= tvb_get_guint8(tvb
, offset
);
1822 item_c
= proto_tree_add_item(tree_b
, hf_esmc_tlv_ts_reserved
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1823 if (reserved
!= 0x0)
1825 expert_add_info(pinfo
, item_c
, &ei_esmc_reserved_not_zero
);
1830 proto_item_append_text(item_b
, ", Timestamp: %d ns", timestamp
);
1831 if (!timestamp_valid_flag
) proto_item_append_text(item_b
, " [invalid]");
1834 if (timestamp_valid_flag
)
1836 proto_item_append_text(treex
, ", Timestamp:%d", timestamp
);
1842 padding_size
= tvb_length_remaining(tvb
, offset
);
1843 if (0 != padding_size
)
1846 tree_a
= proto_item_add_subtree(treex
, ett_esmc
);
1850 tvb_next
= tvb_new_subset(tvb
, offset
, padding_size
, -1);
1851 item_b
= proto_tree_add_item(tree_a
, hf_esmc_padding
, tvb_next
, 0, -1, ENC_NA
);
1852 proto_item_append_text(item_b
, ", %d %s%s", padding_size
1853 , "octet", plurality(padding_size
,"","s"));
1856 tree_b
= proto_item_add_subtree(item_b
, ett_esmc
);
1857 call_dissector(dh_data
, tvb_next
, pinfo
, tree_b
);
1863 /* append summary info */
1864 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Event:%s", event_flag
?
1865 "Time-critical" : "Information");
1868 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", %s"
1869 , val_to_str(ql
, esmc_quality_level_opt_1_vals_short
, "QL-INVALID-%d"));
1871 if (timestamp_valid_flag
)
1873 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", TS:%d", timestamp
);
1877 col_append_str(pinfo
->cinfo
, COL_INFO
, ", Malformed PDU");
1882 * Name: dissect_oampdu
1885 * This function is used to dissect the Operation, Administration, and
1886 * Maintenance slow protocol defined in IEEE802.3 clause 57 (The OAMPDUs
1887 * common part is defined in section 57.4).
1889 * Only the 6 folowing codes are currently defined in the 2004 version of this
1892 * OAMPDU_INFORMATION: 0x0
1893 * OAMPDU_EVENT_NOTIFICATION: 0x1
1894 * OAMPDU_VAR_REQUEST: 0x2
1895 * OAMPDU_VAR_RESPONSE: 0x3
1896 * OAMPDU_LOOPBACK_CTRL: 0x4
1897 * OAMPDU_VENDOR_SPECIFIC: 0xFE
1900 * tvb: buffer associated with the rcv packet (see tvbuff.h).
1901 * pinfo: structure associated with the rcv packet (see packet_info.h).
1902 * tree: the protocol tree associated with the rcv packet (see proto.h).
1904 * Return Values: None
1907 * Dominique Bastien (dbastien@accedian.com)
1908 * + add support for 802.3ah-2004.
1911 dissect_oampdu(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
1914 guint16 flags
,state
;
1917 proto_tree
*oampdu_tree
;
1918 proto_item
*oampdu_item
;
1919 proto_tree
*flags_tree
;
1920 proto_item
*flags_item
;
1922 const char *sep
= initial_sep
;
1924 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "OAM");
1926 oampdu_code
= tvb_get_guint8(tvb
, OAMPDU_CODE
);
1928 switch (oampdu_code
)
1930 case OAMPDU_INFORMATION
:
1931 col_set_str(pinfo
->cinfo
, COL_INFO
, "OAMPDU: Information");
1933 case OAMPDU_EVENT_NOTIFICATION
:
1934 col_set_str(pinfo
->cinfo
, COL_INFO
, "OAMPDU: Event Notification");
1936 case OAMPDU_VAR_REQUEST
:
1937 col_set_str(pinfo
->cinfo
, COL_INFO
, "OAMPDU: Variable Request");
1939 case OAMPDU_VAR_RESPONSE
:
1940 col_set_str(pinfo
->cinfo
, COL_INFO
, "OAMPDU: Variable Response");
1942 case OAMPDU_LOOPBACK_CTRL
:
1943 col_set_str(pinfo
->cinfo
, COL_INFO
, "OAMPDU: Loopback Control");
1945 case OAMPDU_VENDOR_SPECIFIC
:
1946 col_set_str(pinfo
->cinfo
, COL_INFO
, "OAMPDU: Organization Specific");
1949 col_set_str(pinfo
->cinfo
, COL_INFO
, "OAMPDU reserved");
1956 /* Add OAM Heading */
1957 oampdu_item
= proto_tree_add_protocol_format(tree
, proto_slow
, tvb
,
1958 0, -1, "OAM Protocol");
1959 oampdu_tree
= proto_item_add_subtree(oampdu_item
, ett_oampdu
);
1962 proto_tree_add_item(oampdu_tree
, hf_slow_subtype
, tvb
,
1963 0, 1, ENC_BIG_ENDIAN
);
1966 flags
= tvb_get_ntohs(tvb
, OAMPDU_FLAGS
);
1967 flags_item
= proto_tree_add_uint(oampdu_tree
, hf_oampdu_flags
, tvb
,
1968 OAMPDU_FLAGS
, 2, flags
);
1969 flags_tree
= proto_item_add_subtree(flags_item
, ett_oampdu_flags
);
1972 * In this section we add keywords for the bit set on the Flags's line.
1973 * We also add all the bit inside the subtree.
1975 APPEND_BOOLEAN_FLAG(flags
& OAMPDU_FLAGS_LINK_FAULT
, flags_item
,
1977 proto_tree_add_boolean(flags_tree
, hf_oampdu_flags_link_fault
,
1978 tvb
, OAMPDU_FLAGS
, 1, flags
);
1980 APPEND_BOOLEAN_FLAG(flags
& OAMPDU_FLAGS_DYING_GASP
, flags_item
,
1982 proto_tree_add_boolean(flags_tree
, hf_oampdu_flags_dying_gasp
,
1983 tvb
, OAMPDU_FLAGS
, 1, flags
);
1985 APPEND_BOOLEAN_FLAG(flags
& OAMPDU_FLAGS_CRITICAL_EVENT
, flags_item
,
1987 proto_tree_add_boolean(flags_tree
, hf_oampdu_flags_critical_event
,
1988 tvb
, OAMPDU_FLAGS
, 1, flags
);
1990 proto_tree_add_boolean(flags_tree
, hf_oampdu_flags_local_evaluating
,
1991 tvb
, OAMPDU_FLAGS
, 1, flags
);
1993 proto_tree_add_boolean(flags_tree
, hf_oampdu_flags_local_stable
,
1994 tvb
, OAMPDU_FLAGS
, 1, flags
);
1996 proto_tree_add_boolean(flags_tree
, hf_oampdu_flags_remote_evaluating
,
1997 tvb
, OAMPDU_FLAGS
, 1, flags
);
1999 proto_tree_add_boolean(flags_tree
, hf_oampdu_flags_remote_stable
,
2000 tvb
, OAMPDU_FLAGS
, 1, flags
);
2002 if (sep
!= cont_sep
)
2003 proto_item_append_text(flags_item
, " (");
2005 proto_item_append_text(flags_item
, ", ");
2011 proto_item_append_text(flags_item
, "local: ");
2012 state
= (flags
&(OAMPDU_FLAGS_LOCAL_EVAL
|OAMPDU_FLAGS_LOCAL_STABLE
));
2017 proto_item_append_text(flags_item
, "remote: ");
2018 state
= (flags
&(OAMPDU_FLAGS_REMOTE_EVAL
|OAMPDU_FLAGS_REMOTE_STABLE
));
2025 proto_item_append_text(flags_item
, "Unsatisfied");
2028 proto_item_append_text(flags_item
, "Discovery in process");
2031 proto_item_append_text(flags_item
, "Discovery complete");
2034 proto_item_append_text(flags_item
, "Reserved");
2039 proto_item_append_text(flags_item
, ", ");
2043 proto_item_append_text(flags_item
, ")");
2046 oampdu_code
= tvb_get_guint8(tvb
, OAMPDU_CODE
);
2047 proto_tree_add_uint(oampdu_tree
, hf_oampdu_code
, tvb
,
2048 OAMPDU_CODE
, 1, oampdu_code
);
2050 switch (oampdu_code
)
2052 case OAMPDU_INFORMATION
:
2053 dissect_oampdu_information(tvb
, oampdu_tree
);
2055 case OAMPDU_EVENT_NOTIFICATION
:
2056 dissect_oampdu_event_notification(tvb
, pinfo
, oampdu_tree
);
2058 case OAMPDU_VAR_REQUEST
:
2059 dissect_oampdu_variable_request(tvb
, oampdu_tree
);
2061 case OAMPDU_VAR_RESPONSE
:
2062 dissect_oampdu_variable_response(tvb
, oampdu_tree
);
2064 case OAMPDU_LOOPBACK_CTRL
:
2065 dissect_oampdu_loopback_control(tvb
, oampdu_tree
);
2067 case OAMPDU_VENDOR_SPECIFIC
:
2068 dissect_oampdu_vendor_specific(tvb
, oampdu_tree
);
2076 * Name: dissect_oampdu_information
2079 * This function is used to dissect the Information TLVs defined in IEEE802.3
2084 * tvb: buffer associated with the rcv packet (see tvbuff.h).
2085 * tree: the protocol tree associated with the oampdu (see proto.h).
2087 * Return Values: None
2090 * Dominique Bastien (dbastien@accedian.com)
2091 * + add support for 802.3ah-2004.
2094 dissect_oampdu_information(tvbuff_t
*tvb
, proto_tree
*tree
)
2104 proto_tree
*info_tree
;
2105 proto_item
*info_item
;
2106 proto_tree
*state_tree
;
2107 proto_item
*state_item
;
2108 proto_tree
*cfg_tree
;
2109 proto_item
*cfg_item
;
2110 proto_item
*oui_item
;
2114 offset
= OAMPDU_HEADER_SIZE
;
2118 bytes
= tvb_length_remaining(tvb
, offset
);
2119 if (bytes
< 1) break;
2121 info_type
= tvb_get_guint8(tvb
, offset
);
2123 if (info_type
== OAMPDU_INFO_TYPE_ENDMARKER
) break;
2125 info_item
= proto_tree_add_uint(tree
, hf_oampdu_info_type
, tvb
,
2126 offset
, 1, info_type
);
2130 case OAMPDU_INFO_TYPE_LOCAL
:
2131 info_tree
= proto_item_add_subtree(info_item
, ett_oampdu_local_info
);
2133 case OAMPDU_INFO_TYPE_REMOTE
:
2134 info_tree
= proto_item_add_subtree(info_item
, ett_oampdu_remote_info
);
2136 case OAMPDU_INFO_TYPE_ORG
:
2137 info_tree
= proto_item_add_subtree(info_item
, ett_oampdu_org_info
);
2144 offset
+= OAMPDU_INFO_TYPE_SZ
;
2146 if ((info_type
==OAMPDU_INFO_TYPE_LOCAL
)||(info_type
==OAMPDU_INFO_TYPE_REMOTE
))
2148 raw_octet
= tvb_get_guint8(tvb
, offset
);
2149 proto_tree_add_uint(info_tree
, hf_oampdu_info_len
,
2150 tvb
, offset
, 1, raw_octet
);
2152 offset
+= OAMPDU_INFO_LENGTH_SZ
;
2154 raw_octet
= tvb_get_guint8(tvb
, offset
);
2155 proto_tree_add_uint(info_tree
, hf_oampdu_info_version
,
2156 tvb
, offset
, 1, raw_octet
);
2158 offset
+= OAMPDU_INFO_VERSION_SZ
;
2160 raw_word
= tvb_get_ntohs(tvb
, offset
);
2161 proto_tree_add_uint(info_tree
, hf_oampdu_info_revision
,
2162 tvb
, offset
, 2, raw_word
);
2164 offset
+= OAMPDU_INFO_REVISION_SZ
;
2166 /* Build OAM State field field */
2167 raw_octet
= tvb_get_guint8(tvb
, offset
);
2168 state_item
= proto_tree_add_uint(info_tree
, hf_oampdu_info_state
,
2169 tvb
, offset
, 1, raw_octet
);
2171 if (raw_octet
== OAMPDU_INFO_TYPE_LOCAL
)
2172 state_tree
= proto_item_add_subtree(state_item
, ett_oampdu_local_info_state
);
2174 state_tree
= proto_item_add_subtree(state_item
, ett_oampdu_remote_info_state
);
2176 proto_tree_add_uint(state_tree
, hf_oampdu_info_state_parser
,
2177 tvb
, offset
, 1, raw_octet
);
2179 proto_tree_add_boolean(state_tree
, hf_oampdu_info_state_mux
,
2180 tvb
, offset
, 1, raw_octet
);
2182 offset
+= OAMPDU_INFO_STATE_SZ
;
2184 /* Build OAM configuration field */
2185 raw_octet
= tvb_get_guint8(tvb
, offset
);
2186 cfg_item
= proto_tree_add_uint(info_tree
, hf_oampdu_info_oamConfig
,
2187 tvb
, offset
, 1, raw_octet
);
2189 if (raw_octet
== OAMPDU_INFO_TYPE_LOCAL
)
2190 cfg_tree
= proto_item_add_subtree(cfg_item
, ett_oampdu_local_info_config
);
2192 cfg_tree
= proto_item_add_subtree(cfg_item
, ett_oampdu_remote_info_config
);
2194 proto_tree_add_boolean(cfg_tree
, hf_oampdu_info_oamConfig_mode
,
2195 tvb
, offset
, 1, raw_octet
);
2197 proto_tree_add_boolean(cfg_tree
, hf_oampdu_info_oamConfig_uni
,
2198 tvb
, offset
, 1, raw_octet
);
2200 proto_tree_add_boolean(cfg_tree
, hf_oampdu_info_oamConfig_lpbk
,
2201 tvb
, offset
, 1, raw_octet
);
2203 proto_tree_add_boolean(cfg_tree
, hf_oampdu_info_oamConfig_event
,
2204 tvb
, offset
, 1, raw_octet
);
2206 proto_tree_add_boolean(cfg_tree
, hf_oampdu_info_oamConfig_var
,
2207 tvb
, offset
, 1, raw_octet
);
2209 offset
+= OAMPDU_INFO_OAM_CONFIG_SZ
;
2211 raw_word
= tvb_get_ntohs(tvb
, offset
);
2212 item
= proto_tree_add_uint(info_tree
, hf_oampdu_info_oampduConfig
,
2213 tvb
, offset
, 2, raw_word
);
2215 proto_item_append_text(item
, " (bytes)");
2217 offset
+= OAMPDU_INFO_OAMPDU_CONFIG_SZ
;
2219 oui_item
= proto_tree_add_item(info_tree
, hf_oampdu_info_oui
,
2220 tvb
, offset
, 3, ENC_NA
);
2222 APPEND_OUI_NAME(oui_item
, ptr
, tvb
, offset
);
2224 offset
+= OAMPDU_INFO_OUI_SZ
;
2226 proto_tree_add_item(info_tree
, hf_oampdu_info_vendor
,
2227 tvb
, offset
, 4, ENC_NA
);
2229 offset
+= OAMPDU_INFO_VENDOR_SPECIFIC_SZ
;
2231 else if (info_type
== OAMPDU_INFO_TYPE_ORG
)
2233 /* see IEEE802.3, section 57.5.2.3 for more details */
2234 raw_octet
= tvb_get_guint8(tvb
, offset
);
2235 proto_tree_add_uint(info_tree
, hf_oampdu_info_len
,
2236 tvb
, offset
, 1, raw_octet
);
2238 offset
+= OAMPDU_INFO_LENGTH_SZ
;
2240 oui_item
= proto_tree_add_item(info_tree
, hf_oampdu_info_oui
,
2241 tvb
, offset
, 3, ENC_NA
);
2243 APPEND_OUI_NAME(oui_item
, ptr
, tvb
, offset
);
2245 offset
+= OAMPDU_INFO_OUI_SZ
;
2247 proto_tree_add_item(info_tree
, hf_oampdu_info_vendor
,
2248 tvb
, offset
, raw_octet
-5, ENC_NA
);
2250 offset
+= raw_octet
-5;
2255 /* If it's a unknown type jump over */
2256 raw_octet
= tvb_get_guint8(tvb
, offset
);
2257 offset
+= raw_octet
;
2263 * Name: dissect_oampdu_event_notification
2266 * This function is used to dissect the Event Notification TLVs defined in
2267 * IEEE802.3 section 57.5.3.
2271 * tvb: buffer associated with the rcv packet (see tvbuff.h).
2272 * tree: the protocol tree associated with the oampdu (see proto.h).
2274 * Return Values: None
2277 * Dominique Bastien (dbastien@accedian.com)
2278 * + add support for 802.3ah-2004.
2281 dissect_oampdu_event_notification(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
2292 proto_tree
*event_tree
;
2293 proto_item
*event_item
;
2295 offset
= OAMPDU_HEADER_SIZE
;
2297 /* Display the sequence number before displaying the TLVs */
2298 raw_word
= tvb_get_ntohs(tvb
, offset
);
2299 proto_tree_add_uint(tree
, hf_oampdu_event_sequence
,
2300 tvb
, offset
, 2, raw_word
);
2302 offset
+= OAMPDU_EVENT_SEQUENCE_SZ
;
2306 bytes
= tvb_length_remaining(tvb
, offset
);
2307 if (bytes
< 1) break;
2309 event_type
= tvb_get_guint8(tvb
, offset
);
2311 if (event_type
== OAMPDU_EVENT_TYPE_END
) break;
2313 event_item
= proto_tree_add_uint(tree
, hf_oampdu_event_type
,
2314 tvb
, offset
, 1, event_type
);
2316 offset
+= OAMPDU_EVENT_TYPE_SZ
;
2320 case OAMPDU_EVENT_TYPE_ESPE
:
2322 event_tree
= proto_item_add_subtree(event_item
,
2323 ett_oampdu_event_espe
);
2325 raw_octet
= tvb_get_guint8(tvb
, offset
);
2326 proto_tree_add_uint(event_tree
, hf_oampdu_event_length
,
2327 tvb
, offset
, 1, raw_octet
);
2329 offset
+= OAMPDU_EVENT_LENGTH_SZ
;
2331 raw_word
= tvb_get_ntohs(tvb
, offset
);
2332 proto_tree_add_uint(event_tree
, hf_oampdu_event_timeStamp
,
2333 tvb
, offset
, 2, raw_word
);
2335 offset
+= OAMPDU_EVENT_TIMESTAMP_SZ
;
2337 big
= tvb_get_ntoh64(tvb
, offset
);
2338 proto_tree_add_uint64(event_tree
, hf_oampdu_event_espeWindow
,
2339 tvb
, offset
, 8, big
);
2341 offset
+= OAMPDU_ESPE_WINDOW_SZ
;
2343 big
= tvb_get_ntoh64(tvb
, offset
);
2344 proto_tree_add_uint64(event_tree
, hf_oampdu_event_espeThreshold
,
2345 tvb
, offset
, 8, big
);
2347 offset
+= OAMPDU_ESPE_THRESHOLD_SZ
;
2349 big
= tvb_get_ntoh64(tvb
, offset
);
2350 proto_tree_add_uint64(event_tree
, hf_oampdu_event_espeErrors
,
2351 tvb
, offset
, 8, big
);
2353 offset
+= OAMPDU_ESPE_ERRORS_SZ
;
2355 big
= tvb_get_ntoh64(tvb
, offset
);
2356 proto_tree_add_uint64(event_tree
, hf_oampdu_event_espeTotalErrors
,
2357 tvb
, offset
, 8, big
);
2359 offset
+= OAMPDU_ESPE_ERR_TOTAL_SZ
;
2361 dword
= tvb_get_ntohl(tvb
, offset
);
2362 proto_tree_add_uint(event_tree
, hf_oampdu_event_espeTotalEvents
,
2363 tvb
, offset
, 4, dword
);
2365 offset
+= OAMPDU_ESPE_TOTAL_SZ
;
2368 case OAMPDU_EVENT_TYPE_EFE
:
2370 event_tree
= proto_item_add_subtree(event_item
,
2371 ett_oampdu_event_efe
);
2373 raw_octet
= tvb_get_guint8(tvb
, offset
);
2374 proto_tree_add_uint(event_tree
, hf_oampdu_event_length
,
2375 tvb
, offset
, 1, raw_octet
);
2377 offset
+= OAMPDU_EVENT_LENGTH_SZ
;
2379 raw_word
= tvb_get_ntohs(tvb
, offset
);
2380 proto_tree_add_uint(event_tree
, hf_oampdu_event_timeStamp
,
2381 tvb
, offset
, 2, raw_word
);
2383 offset
+= OAMPDU_EVENT_TIMESTAMP_SZ
;
2385 raw_word
= tvb_get_ntohs(tvb
, offset
);
2386 proto_tree_add_uint(event_tree
, hf_oampdu_event_efeWindow
,
2387 tvb
, offset
, 2, raw_word
);
2389 offset
+= OAMPDU_EFE_WINDOW_SZ
;
2391 dword
= tvb_get_ntohl(tvb
, offset
);
2392 proto_tree_add_uint(event_tree
, hf_oampdu_event_efeThreshold
,
2393 tvb
, offset
, 4, dword
);
2395 offset
+= OAMPDU_EFE_THRESHOLD_SZ
;
2397 dword
= tvb_get_ntohl(tvb
, offset
);
2398 proto_tree_add_uint(event_tree
, hf_oampdu_event_efeErrors
,
2399 tvb
, offset
, 4, dword
);
2401 offset
+= OAMPDU_EFE_ERRORS_SZ
;
2403 big
= tvb_get_ntoh64(tvb
, offset
);
2404 proto_tree_add_uint64(event_tree
, hf_oampdu_event_efeTotalErrors
,
2405 tvb
, offset
, 8, big
);
2407 offset
+= OAMPDU_EFE_ERR_TOTAL_SZ
;
2409 dword
= tvb_get_ntohl(tvb
, offset
);
2410 proto_tree_add_uint(event_tree
, hf_oampdu_event_efeTotalEvents
,
2411 tvb
, offset
, 4, dword
);
2413 offset
+= OAMPDU_EFE_TOTAL_SZ
;
2417 case OAMPDU_EVENT_TYPE_EFPE
:
2419 event_tree
= proto_item_add_subtree(event_item
,
2420 ett_oampdu_event_efpe
);
2422 raw_octet
= tvb_get_guint8(tvb
, offset
);
2423 proto_tree_add_uint(event_tree
, hf_oampdu_event_length
,
2424 tvb
, offset
, 1, raw_octet
);
2426 offset
+= OAMPDU_EVENT_LENGTH_SZ
;
2428 raw_word
= tvb_get_ntohs(tvb
, offset
);
2429 proto_tree_add_uint(event_tree
, hf_oampdu_event_timeStamp
,
2430 tvb
, offset
, 2, raw_word
);
2432 offset
+= OAMPDU_EVENT_TIMESTAMP_SZ
;
2434 dword
= tvb_get_ntohl(tvb
, offset
);
2435 proto_tree_add_uint(event_tree
, hf_oampdu_event_efpeWindow
,
2436 tvb
, offset
, 4, dword
);
2438 offset
+= OAMPDU_EFPE_WINDOW_SZ
;
2440 dword
= tvb_get_ntohl(tvb
, offset
);
2441 proto_tree_add_uint(event_tree
, hf_oampdu_event_efpeThreshold
,
2442 tvb
, offset
, 4, dword
);
2444 offset
+= OAMPDU_EFPE_THRESHOLD_SZ
;
2446 dword
= tvb_get_ntohl(tvb
, offset
);
2447 proto_tree_add_uint(event_tree
, hf_oampdu_event_efpeErrors
,
2448 tvb
, offset
, 4, dword
);
2450 offset
+= OAMPDU_EFPE_ERRORS_SZ
;
2452 big
= tvb_get_ntoh64(tvb
, offset
);
2453 proto_tree_add_uint64(event_tree
, hf_oampdu_event_efpeTotalErrors
,
2454 tvb
, offset
, 8, big
);
2456 offset
+= OAMPDU_EFPE_ERR_TOTAL_SZ
;
2458 dword
= tvb_get_ntohl(tvb
, offset
);
2459 proto_tree_add_uint(event_tree
, hf_oampdu_event_efpeTotalEvents
,
2460 tvb
, offset
, 4, dword
);
2462 offset
+= OAMPDU_EFPE_TOTAL_SZ
;
2466 case OAMPDU_EVENT_TYPE_EFSSE
:
2468 event_tree
= proto_item_add_subtree(event_item
,
2469 ett_oampdu_event_efsse
);
2471 raw_octet
= tvb_get_guint8(tvb
, offset
);
2472 proto_tree_add_uint(event_tree
, hf_oampdu_event_length
,
2473 tvb
, offset
, 1, raw_octet
);
2475 offset
+= OAMPDU_EVENT_LENGTH_SZ
;
2477 raw_word
= tvb_get_ntohs(tvb
, offset
);
2478 proto_tree_add_uint(event_tree
, hf_oampdu_event_timeStamp
,
2479 tvb
, offset
, 2, raw_word
);
2481 offset
+= OAMPDU_EVENT_TIMESTAMP_SZ
;
2483 raw_word
= tvb_get_ntohs(tvb
, offset
);
2484 proto_tree_add_uint(event_tree
, hf_oampdu_event_efsseWindow
,
2485 tvb
, offset
, 2, raw_word
);
2487 offset
+= OAMPDU_EFSSE_WINDOW_SZ
;
2489 dword
= tvb_get_ntohs(tvb
, offset
);
2490 proto_tree_add_uint(event_tree
, hf_oampdu_event_efsseThreshold
,
2491 tvb
, offset
, 2, dword
);
2493 offset
+= OAMPDU_EFSSE_THRESHOLD_SZ
;
2495 dword
= tvb_get_ntohs(tvb
, offset
);
2496 proto_tree_add_uint(event_tree
, hf_oampdu_event_efsseErrors
,
2497 tvb
, offset
, 2, dword
);
2499 offset
+= OAMPDU_EFSSE_ERRORS_SZ
;
2501 dword
= tvb_get_ntohl(tvb
, offset
);
2502 proto_tree_add_uint(event_tree
, hf_oampdu_event_efsseTotalErrors
,
2503 tvb
, offset
, 4, dword
);
2505 offset
+= OAMPDU_EFSSE_ERR_TOTAL_SZ
;
2507 dword
= tvb_get_ntohl(tvb
, offset
);
2508 proto_tree_add_uint(event_tree
, hf_oampdu_event_efsseTotalEvents
,
2509 tvb
, offset
, 4, dword
);
2511 offset
+= OAMPDU_EFSSE_TOTAL_SZ
;
2515 case OAMPDU_EVENT_TYPE_OSE
:
2517 event_tree
= proto_item_add_subtree(event_item
,
2518 ett_oampdu_event_ose
);
2520 raw_octet
= tvb_get_guint8(tvb
, offset
);
2521 event_item
= proto_tree_add_uint(event_tree
, hf_oampdu_event_length
,
2522 tvb
, offset
, 1, raw_octet
);
2524 offset
+= OAMPDU_EVENT_LENGTH_SZ
;
2528 expert_add_info_format(pinfo
, event_item
, &ei_oampdu_event_length_bad
, "Event length should be at least 2");
2532 offset
+= (raw_octet
-2);
2543 * Name: dissect_oampdu_variable_request
2546 * This function is used to dissect the Variable Request TLVs defined in
2547 * IEEE802.3 section 57.6.
2551 * tvb: buffer associated with the rcv packet (see tvbuff.h).
2552 * tree: the protocol tree associated with the oampdu (see proto.h).
2554 * Return Values: None
2557 * Dominique Bastien (dbastien@accedian.com)
2558 * + add support for 802.3ah-2004.
2561 dissect_oampdu_variable_request(tvbuff_t
*tvb
, proto_tree
*tree
)
2568 offset
= OAMPDU_HEADER_SIZE
;
2572 raw_octet
= tvb_get_guint8(tvb
, offset
);
2574 if (raw_octet
== 0) break;
2576 proto_tree_add_uint(tree
, hf_oampdu_variable_branch
,
2577 tvb
,offset
, 1, raw_octet
);
2583 case OAMPDU_VARS_OBJECT
:
2585 raw_word
= tvb_get_ntohs(tvb
, offset
);
2586 proto_tree_add_uint(tree
, hf_oampdu_variable_object
,
2587 tvb
, offset
, 2, raw_word
);
2590 case OAMPDU_VARS_PACKAGE
:
2592 raw_word
= tvb_get_ntohs(tvb
, offset
);
2593 proto_tree_add_uint(tree
, hf_oampdu_variable_package
,
2594 tvb
, offset
, 2, raw_word
);
2597 case OAMPDU_VARS_BINDING
:
2599 raw_word
= tvb_get_ntohs(tvb
, offset
);
2600 proto_tree_add_uint(tree
, hf_oampdu_variable_binding
,
2601 tvb
, offset
, 2, raw_word
);
2604 case OAMPDU_VARS_ATTRIBUTE
:
2606 raw_word
= tvb_get_ntohs(tvb
, offset
);
2607 proto_tree_add_uint(tree
, hf_oampdu_variable_attribute
,
2608 tvb
, offset
, 2, raw_word
);
2620 * Name: dissect_oampdu_variable_response
2623 * This function is used to dissect the Variable Response TLVs defined in
2624 * IEEE802.3 section 57.6.
2628 * tvb: buffer associated with the rcv packet (see tvbuff.h).
2629 * tree: the protocol tree associated with the oampdu (see proto.h).
2631 * Return Values: None
2634 * Dominique Bastien (dbastien@accedian.com)
2635 * + add support for 802.3ah-2004.
2638 dissect_oampdu_variable_response(tvbuff_t
*tvb
, proto_tree
*tree
)
2645 offset
= OAMPDU_HEADER_SIZE
;
2649 raw_octet
= tvb_get_guint8(tvb
, offset
);
2651 if (raw_octet
== 0) break;
2653 proto_tree_add_uint(tree
, hf_oampdu_variable_branch
,
2654 tvb
,offset
, 1, raw_octet
);
2660 case OAMPDU_VARS_OBJECT
:
2662 raw_word
= tvb_get_ntohs(tvb
, offset
);
2663 proto_tree_add_uint(tree
, hf_oampdu_variable_object
,
2664 tvb
, offset
, 2, raw_word
);
2667 case OAMPDU_VARS_PACKAGE
:
2669 raw_word
= tvb_get_ntohs(tvb
, offset
);
2670 proto_tree_add_uint(tree
, hf_oampdu_variable_package
,
2671 tvb
, offset
, 2, raw_word
);
2674 case OAMPDU_VARS_BINDING
:
2676 raw_word
= tvb_get_ntohs(tvb
, offset
);
2677 proto_tree_add_uint(tree
, hf_oampdu_variable_binding
,
2678 tvb
, offset
, 2, raw_word
);
2681 case OAMPDU_VARS_ATTRIBUTE
:
2683 raw_word
= tvb_get_ntohs(tvb
, offset
);
2684 proto_tree_add_uint(tree
, hf_oampdu_variable_attribute
,
2685 tvb
, offset
, 2, raw_word
);
2694 raw_octet
= tvb_get_guint8(tvb
, offset
);
2696 if (raw_octet
>= 0x80)
2698 /* Variable Indication */
2699 proto_tree_add_uint(tree
, hf_oampdu_variable_indication
,
2700 tvb
,offset
, 1, (raw_octet
&0x7F));
2706 /* Special case for 128 bytes container */
2707 if (raw_octet
== 0) raw_octet
= 128;
2709 proto_tree_add_uint(tree
, hf_oampdu_variable_width
,
2710 tvb
,offset
, 1, raw_octet
);
2714 proto_tree_add_item(tree
, hf_oampdu_variable_value
,
2715 tvb
, offset
, raw_octet
, ENC_NA
);
2723 * Name: dissect_oampdu_loopback_control
2726 * This function is used to dissect the Variable Request TLVs defined in
2727 * IEEE802.3 section 57.6.
2731 * tvb: buffer associated with the rcv packet (see tvbuff.h).
2732 * tree: the protocol tree associated with the oampdu (see proto.h).
2734 * Return Values: None
2737 * Dominique Bastien (dbastien@accedian.com)
2738 * + add support for 802.3ah-2004.
2741 dissect_oampdu_loopback_control(tvbuff_t
*tvb
, proto_tree
*tree
)
2747 proto_tree
*ctrl_tree
;
2748 proto_item
*ctrl_item
;
2752 offset
= OAMPDU_HEADER_SIZE
;
2754 bytes
= tvb_length_remaining(tvb
, offset
);
2758 ctrl
= tvb_get_guint8(tvb
, offset
);
2760 ctrl_item
= proto_tree_add_uint(tree
, hf_oampdu_lpbk
,
2761 tvb
, offset
, 1, ctrl
);
2763 ctrl_tree
= proto_item_add_subtree(ctrl_item
, ett_oampdu_lpbk_ctrl
);
2767 APPEND_BOOLEAN_FLAG(ctrl
& OAMPDU_LPBK_ENABLE
, ctrl_item
,
2768 "%sEnable Remote Loopack");
2769 proto_tree_add_boolean(ctrl_tree
, hf_oampdu_lpbk_enable
,
2770 tvb
, offset
, 1, ctrl
);
2772 APPEND_BOOLEAN_FLAG(ctrl
& OAMPDU_LPBK_DISABLE
, ctrl_item
,
2773 "%sDisable Remote Loopback");
2774 proto_tree_add_boolean(ctrl_tree
, hf_oampdu_lpbk_disable
,
2775 tvb
, offset
, 1, ctrl
);
2777 if (sep
!= initial_sep
)
2778 proto_item_append_text(ctrl_item
, ")");
2783 * Name: dissect_oampdu_vendor_specific
2786 * This function is used to dissect the Vendor Specific TLV defined in
2787 * IEEE802.3 section 57.4.3.6.
2791 * tvb: buffer associated with the rcv packet (see tvbuff.h).
2792 * tree: the protocol tree associated with the oampdu (see proto.h).
2794 * Return Values: None
2797 * Dominique Bastien (dbastien@accedian.com)
2798 * + add support for 802.3ah-2004.
2801 dissect_oampdu_vendor_specific(tvbuff_t
*tvb
, proto_tree
*tree
)
2808 proto_item
*oui_item
;
2811 offset
= OAMPDU_HEADER_SIZE
;
2813 bytes
= tvb_length_remaining(tvb
, offset
);
2817 oui_item
= proto_tree_add_item(tree
, hf_oampdu_info_oui
,
2818 tvb
, offset
, 3, ENC_NA
);
2820 APPEND_OUI_NAME(oui_item
, ptr
, tvb
, offset
);
2825 /* Register the protocol with Wireshark */
2827 proto_register_slow_protocols(void)
2829 /* Setup list of header fields */
2831 static hf_register_info hf
[] = {
2834 * Generic slow protocol portion
2837 { "Slow Protocols subtype", "slow.subtype",
2838 FT_UINT8
, BASE_HEX
, VALS(subtype_vals
), 0x0,
2839 "Identifies the LACP version", HFILL
}},
2844 { &hf_lacpdu_version_number
,
2845 { "LACP Version Number", "slow.lacp.version",
2846 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2847 "Identifies the LACP version", HFILL
}},
2849 { &hf_lacpdu_actor_type
,
2850 { "Actor Information", "slow.lacp.actorInfo",
2851 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2852 "TLV type = Actor", HFILL
}},
2854 { &hf_lacpdu_actor_info_len
,
2855 { "Actor Information Length", "slow.lacp.actorInfoLen",
2856 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2857 "The length of the Actor TLV", HFILL
}},
2859 { &hf_lacpdu_actor_sys_priority
,
2860 { "Actor System Priority", "slow.lacp.actorSysPriority",
2861 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2862 "The priority assigned to this System by management or admin", HFILL
}},
2864 { &hf_lacpdu_actor_sys
,
2865 { "Actor System", "slow.lacp.actorSystem",
2866 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
2867 "The Actor's System ID encoded as a MAC address", HFILL
}},
2869 { &hf_lacpdu_actor_key
,
2870 { "Actor Key", "slow.lacp.actorKey",
2871 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2872 "The operational Key value assigned to the port by the Actor", HFILL
}},
2874 { &hf_lacpdu_actor_port_priority
,
2875 { "Actor Port Priority", "slow.lacp.actorPortPriority",
2876 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2877 "The priority assigned to the port by the Actor (via Management or Admin)", HFILL
}},
2879 { &hf_lacpdu_actor_port
,
2880 { "Actor Port", "slow.lacp.actorPort",
2881 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2882 "The port number assigned to the port by the Actor (via Management or Admin)", HFILL
}},
2884 { &hf_lacpdu_actor_state
,
2885 { "Actor State", "slow.lacp.actorState",
2886 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2887 "The Actor's state variables for the port, encoded as bits within a single octet", HFILL
}},
2889 { &hf_lacpdu_flags_a_activity
,
2890 { "LACP Activity", "slow.lacp.actorState.activity",
2891 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), LACPDU_FLAGS_ACTIVITY
,
2892 "Activity control value for this link. Active = 1, Passive = 0", HFILL
}},
2894 { &hf_lacpdu_flags_a_timeout
,
2895 { "LACP Timeout", "slow.lacp.actorState.timeout",
2896 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), LACPDU_FLAGS_TIMEOUT
,
2897 "Timeout control value for this link. Short Timeout = 1, Long Timeout = 0", HFILL
}},
2899 { &hf_lacpdu_flags_a_aggregation
,
2900 { "Aggregation", "slow.lacp.actorState.aggregation",
2901 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), LACPDU_FLAGS_AGGREGATION
,
2902 "Aggregatable = 1, Individual = 0", HFILL
}},
2904 { &hf_lacpdu_flags_a_sync
,
2905 { "Synchronization", "slow.lacp.actorState.synchronization",
2906 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), LACPDU_FLAGS_SYNC
,
2907 "In Sync = 1, Out of Sync = 0", HFILL
}},
2909 { &hf_lacpdu_flags_a_collecting
,
2910 { "Collecting", "slow.lacp.actorState.collecting",
2911 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), LACPDU_FLAGS_COLLECTING
,
2912 "Collection of incoming frames is: Enabled = 1, Disabled = 0", HFILL
}},
2914 { &hf_lacpdu_flags_a_distrib
,
2915 { "Distributing", "slow.lacp.actorState.distributing",
2916 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), LACPDU_FLAGS_DISTRIB
,
2917 "Distribution of outgoing frames is: Enabled = 1, Disabled = 0", HFILL
}},
2919 { &hf_lacpdu_flags_a_defaulted
,
2920 { "Defaulted", "slow.lacp.actorState.defaulted",
2921 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), LACPDU_FLAGS_DEFAULTED
,
2922 "1 = Actor Rx machine is using DEFAULT Partner info, 0 = using info in Rx'd LACPDU", HFILL
}},
2924 { &hf_lacpdu_flags_a_expired
,
2925 { "Expired", "slow.lacp.actorState.expired",
2926 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), LACPDU_FLAGS_EXPIRED
,
2927 "1 = Actor Rx machine is EXPIRED, 0 = is NOT EXPIRED", HFILL
}},
2929 { &hf_lacpdu_actor_reserved
,
2930 { "Reserved", "slow.lacp.reserved",
2931 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2934 { &hf_lacpdu_partner_type
,
2935 { "Partner Information", "slow.lacp.partnerInfo",
2936 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2937 "TLV type = Partner", HFILL
}},
2939 { &hf_lacpdu_partner_info_len
,
2940 { "Partner Information Length", "slow.lacp.partnerInfoLen",
2941 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2942 "The length of the Partner TLV", HFILL
}},
2944 { &hf_lacpdu_partner_sys_priority
,
2945 { "Partner System Priority", "slow.lacp.partnerSysPriority",
2946 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2947 "The priority assigned to the Partner System by management or admin", HFILL
}},
2949 { &hf_lacpdu_partner_sys
,
2950 { "Partner System", "slow.lacp.partnerSystem",
2951 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
2952 "The Partner's System ID encoded as a MAC address", HFILL
}},
2954 { &hf_lacpdu_partner_key
,
2955 { "Partner Key", "slow.lacp.partnerKey",
2956 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2957 "The operational Key value assigned to the port associated with this link by the Partner", HFILL
}},
2959 { &hf_lacpdu_partner_port_priority
,
2960 { "Partner Port Priority", "slow.lacp.partnerPortPriority",
2961 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2962 "The priority assigned to the port by the Partner (via Management or Admin)", HFILL
}},
2964 { &hf_lacpdu_partner_port
,
2965 { "Partner Port", "slow.lacp.partnerPort",
2966 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2967 "The port number associated with this link assigned to the port by the Partner (via Management or Admin)", HFILL
}},
2969 { &hf_lacpdu_partner_state
,
2970 { "Partner State", "slow.lacp.partnerState",
2971 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2972 "The Partner's state variables for the port, encoded as bits within a single octet", HFILL
}},
2974 { &hf_lacpdu_flags_p_activity
,
2975 { "LACP Activity", "slow.lacp.partnerState.activity",
2976 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), LACPDU_FLAGS_ACTIVITY
,
2977 "Activity control value for this link. Active = 1, Passive = 0", HFILL
}},
2979 { &hf_lacpdu_flags_p_timeout
,
2980 { "LACP Timeout", "slow.lacp.partnerState.timeout",
2981 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), LACPDU_FLAGS_TIMEOUT
,
2982 "Timeout control value for this link. Short Timeout = 1, Long Timeout = 0", HFILL
}},
2984 { &hf_lacpdu_flags_p_aggregation
,
2985 { "Aggregation", "slow.lacp.partnerState.aggregation",
2986 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), LACPDU_FLAGS_AGGREGATION
,
2987 "Aggregatable = 1, Individual = 0", HFILL
}},
2989 { &hf_lacpdu_flags_p_sync
,
2990 { "Synchronization", "slow.lacp.partnerState.synchronization",
2991 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), LACPDU_FLAGS_SYNC
,
2992 "In Sync = 1, Out of Sync = 0", HFILL
}},
2994 { &hf_lacpdu_flags_p_collecting
,
2995 { "Collecting", "slow.lacp.partnerState.collecting",
2996 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), LACPDU_FLAGS_COLLECTING
,
2997 "Collection of incoming frames is: Enabled = 1, Disabled = 0", HFILL
}},
2999 { &hf_lacpdu_flags_p_distrib
,
3000 { "Distributing", "slow.lacp.partnerState.distributing",
3001 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), LACPDU_FLAGS_DISTRIB
,
3002 "Distribution of outgoing frames is: Enabled = 1, Disabled = 0", HFILL
}},
3004 { &hf_lacpdu_flags_p_defaulted
,
3005 { "Defaulted", "slow.lacp.partnerState.defaulted",
3006 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), LACPDU_FLAGS_DEFAULTED
,
3007 "1 = Actor Rx machine is using DEFAULT Partner info, 0 = using info in Rx'd LACPDU", HFILL
}},
3009 { &hf_lacpdu_flags_p_expired
,
3010 { "Expired", "slow.lacp.partnerState.expired",
3011 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), LACPDU_FLAGS_EXPIRED
,
3012 "1 = Actor Rx machine is EXPIRED, 0 = is NOT EXPIRED", HFILL
}},
3014 { &hf_lacpdu_partner_reserved
,
3015 { "Reserved", "slow.lacp.reserved",
3016 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
3019 { &hf_lacpdu_coll_type
,
3020 { "Collector Information", "slow.lacp.collectorInfo",
3021 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
3022 "TLV type = Collector", HFILL
}},
3024 { &hf_lacpdu_coll_info_len
,
3025 { "Collector Information Length", "slow.lacp.collectorInfoLen",
3026 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
3027 "The length of the Collector TLV", HFILL
}},
3029 { &hf_lacpdu_coll_max_delay
,
3030 { "Collector Max Delay", "slow.lacp.collectorMaxDelay",
3031 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
3032 "The max delay of the station tx'ing the LACPDU (in tens of usecs)", HFILL
}},
3034 { &hf_lacpdu_coll_reserved
,
3035 { "Reserved", "slow.lacp.coll_reserved",
3036 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
3039 { &hf_lacpdu_term_type
,
3040 { "Terminator Information", "slow.lacp.termInfo",
3041 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
3042 "TLV type = Terminator", HFILL
}},
3044 { &hf_lacpdu_term_len
,
3045 { "Terminator Length", "slow.lacp.termLen",
3046 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
3047 "The length of the Terminator TLV", HFILL
}},
3049 { &hf_lacpdu_term_reserved
,
3050 { "Reserved", "slow.lacp.term_reserved",
3051 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
3059 { &hf_marker_version_number
,
3060 { "Version Number", "slow.marker.version",
3061 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
3062 "Identifies the Marker version", HFILL
}},
3064 { &hf_marker_tlv_type
,
3065 { "TLV Type", "slow.marker.tlvType",
3066 FT_UINT8
, BASE_HEX
, VALS(marker_vals
), 0x0,
3067 "Marker TLV type", HFILL
}},
3069 { &hf_marker_tlv_length
,
3070 { "TLV Length", "slow.marker.tlvLen",
3071 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
3072 "The length of the Actor TLV", HFILL
}},
3074 { &hf_marker_req_port
,
3075 { "Requester Port", "slow.marker.requesterPort",
3076 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
3077 "The Requester Port", HFILL
}},
3079 { &hf_marker_req_system
,
3080 { "Requester System", "slow.marker.requesterSystem",
3081 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
3082 "The Requester System ID encoded as a MAC address", HFILL
}},
3084 { &hf_marker_req_trans_id
,
3085 { "Requester Transaction ID", "slow.marker.requesterTransId",
3086 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
3087 "The Requester Transaction ID", HFILL
}},
3094 { "OUI", "slow.ossp.oui",
3095 FT_BYTES
, BASE_NONE
, NULL
, 0,
3096 "IEEE assigned Organizationally Unique Identifier", HFILL
}},
3099 { "ITU-T OSSP Subtype", "slow.ossp.itu.subtype",
3100 FT_UINT16
, BASE_HEX
, NULL
, 0,
3101 "Subtype assigned by the ITU-T", HFILL
}},
3104 { "Version", "slow.esmc.version",
3105 FT_UINT8
, BASE_HEX
, NULL
, 0xf0,
3106 "This field indicates the version of ITU-T SG15 Q13 OSSP frame format", HFILL
}},
3108 { &hf_esmc_event_flag
,
3109 { "Event Flag", "slow.esmc.event_flag",
3110 FT_UINT8
, BASE_HEX
, VALS(esmc_event_flag_vals
), 0x08,
3111 "This bit distinguishes the critical, time sensitive behaviour of the"
3112 " ESMC Event PDU from the ESMC Information PDU", HFILL
}},
3114 { &hf_esmc_timestamp_valid_flag
,
3115 { "Timestamp Valid Flag", "slow.esmc.timestamp_valid_flag",
3116 FT_UINT8
, BASE_HEX
, VALS(esmc_timestamp_valid_flag_vals
), 0x04,
3117 "Indicates validity (i.e. presence) of the Timestamp TLV", HFILL
}},
3119 { &hf_esmc_reserved_32
,
3120 { "Reserved", "slow.esmc.reserved",
3121 FT_UINT32
, BASE_HEX
, NULL
, 0,
3122 "Reserved. Set to all zero at the transmitter and ignored by the receiver", HFILL
}},
3125 { "ESMC TLV", "slow.esmc.tlv",
3126 FT_NONE
, BASE_NONE
, NULL
, 0,
3129 { &hf_esmc_tlv_type
,
3130 { "TLV Type", "slow.esmc.tlv_type",
3131 FT_UINT8
, BASE_HEX
, VALS(esmc_tlv_type_vals
), 0,
3134 { &hf_esmc_tlv_length
,
3135 { "TLV Length", "slow.esmc.tlv_length",
3136 FT_UINT16
, BASE_HEX
, NULL
, 0,
3139 { &hf_esmc_tlv_ql_unused
,
3140 { "Unused", "slow.esmc.tlv_ql_unused",
3141 FT_UINT8
, BASE_HEX
, NULL
, 0xf0,
3142 "This field is not used in QL TLV", HFILL
}},
3144 { &hf_esmc_quality_level_opt_1
,
3145 { "SSM Code", "slow.esmc.ql",
3146 FT_UINT8
, BASE_HEX
, VALS(esmc_quality_level_opt_1_vals
), 0x0f,
3147 "Quality Level information", HFILL
}},
3149 #if 0 /*not used yet*/
3150 { &hf_esmc_quality_level_opt_2
,
3151 { "SSM Code", "slow.esmc.ql",
3152 FT_UINT8
, BASE_HEX
, VALS(esmc_quality_level_opt_2_vals
), 0x0f,
3153 "Quality Level information", HFILL
}},
3156 { &hf_esmc_quality_level_invalid
,
3157 { "SSM Code", "slow.esmc.ql",
3158 FT_UINT8
, BASE_HEX
, VALS(esmc_quality_level_invalid_vals
), 0x0f,
3159 "Quality Level information", HFILL
}},
3161 { &hf_esmc_timestamp
,
3162 { "Timestamp (ns)", "slow.esmc.timestamp",
3163 FT_INT32
, BASE_DEC
, NULL
, 0,
3164 "Timestamp according to the \"whole nanoseconds\" part of the IEEE 1588 originTimestamp", HFILL
}},
3166 { &hf_esmc_tlv_ts_reserved
,
3167 { "Reserved", "slow.esmc.tlv_ts_reserved",
3168 FT_UINT8
, BASE_HEX
, NULL
, 0,
3169 "Reserved. Set to all zero at the transmitter and ignored by the receiver", HFILL
}},
3172 { "Padding", "slow.esmc.padding",
3173 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
3174 "This field contains necessary padding to achieve the minimum frame size of 64 bytes at least", HFILL
}},
3180 { "Flags", "slow.oam.flags",
3181 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
3182 "The Flags Field", HFILL
}},
3184 { &hf_oampdu_flags_link_fault
,
3185 { "Link Fault", "slow.oam.flags.linkFault",
3186 FT_BOOLEAN
, 8, TFS(&tfs_true_false
), OAMPDU_FLAGS_LINK_FAULT
,
3187 "The PHY detected a fault in the receive direction. True = 1, False = 0", HFILL
}},
3189 { &hf_oampdu_flags_dying_gasp
,
3190 { "Dying Gasp", "slow.oam.flags.dyingGasp",
3191 FT_BOOLEAN
, 8, TFS(&tfs_true_false
), OAMPDU_FLAGS_DYING_GASP
,
3192 "An unrecoverable local failure occurred. True = 1, False = 0", HFILL
}},
3194 { &hf_oampdu_flags_critical_event
,
3195 { "Critical Event", "slow.oam.flags.criticalEvent",
3196 FT_BOOLEAN
, 8, TFS(&tfs_true_false
), OAMPDU_FLAGS_CRITICAL_EVENT
,
3197 "A critical event has occurred. True = 1, False = 0", HFILL
}},
3199 { &hf_oampdu_flags_local_evaluating
,
3200 { "Local Evaluating", "slow.oam.flags.localEvaluating",
3201 FT_BOOLEAN
, 8, TFS(&tfs_true_false
), OAMPDU_FLAGS_LOCAL_EVAL
,
3202 "Local DTE Discovery process in progress. True = 1, False = 0", HFILL
}},
3204 { &hf_oampdu_flags_local_stable
,
3205 { "Local Stable", "slow.oam.flags.localStable",
3206 FT_BOOLEAN
, 8, TFS(&tfs_true_false
), OAMPDU_FLAGS_LOCAL_STABLE
,
3207 "Local DTE is Stable. True = 1, False = 0", HFILL
}},
3209 { &hf_oampdu_flags_remote_evaluating
,
3210 { "Remote Evaluating", "slow.oam.flags.remoteEvaluating",
3211 FT_BOOLEAN
, 8, TFS(&tfs_true_false
), OAMPDU_FLAGS_REMOTE_EVAL
,
3212 "Remote DTE Discovery process in progress. True = 1, False = 0", HFILL
}},
3214 { &hf_oampdu_flags_remote_stable
,
3215 { "Remote Stable", "slow.oam.flags.remoteStable",
3216 FT_BOOLEAN
, 8, TFS(&tfs_true_false
), OAMPDU_FLAGS_REMOTE_STABLE
,
3217 "Remote DTE is Stable. True = 1, False = 0", HFILL
}},
3220 { "OAMPDU code", "slow.oam.code",
3221 FT_UINT8
, BASE_HEX
, VALS(code_vals
), 0x0,
3222 "Identifies the TLVs code", HFILL
}},
3224 { &hf_oampdu_info_type
,
3225 { "Type", "slow.oam.info.type",
3226 FT_UINT8
, BASE_HEX
, VALS(info_type_vals
), 0x0,
3227 "Identifies the TLV type", HFILL
}},
3229 { &hf_oampdu_info_len
,
3230 { "TLV Length", "slow.oam.info.length",
3231 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
3232 "Identifies the TLVs type", HFILL
}},
3234 { &hf_oampdu_info_version
,
3235 { "TLV Version", "slow.oam.info.version",
3236 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
3237 "Identifies the TLVs version", HFILL
}},
3239 { &hf_oampdu_info_revision
,
3240 { "TLV Revision", "slow.oam.info.revision",
3241 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
3242 "Identifies the TLVs revision", HFILL
}},
3244 { &hf_oampdu_info_state
,
3245 { "OAM DTE States", "slow.oam.info.state",
3246 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
3247 "OAM DTE State of the Mux and the Parser", HFILL
}},
3249 { &hf_oampdu_info_state_parser
,
3250 { "Parser Action", "slow.oam.info.state.parser",
3251 FT_UINT8
, BASE_HEX
, VALS(parser_vals
), 0x03,
3254 { &hf_oampdu_info_state_mux
,
3255 { "Muxiplexer Action", "slow.oam.info.state.muxiplexer",
3256 FT_BOOLEAN
, 8, TFS(&mux
), 0x04,
3259 { &hf_oampdu_info_oamConfig
,
3260 { "OAM Configuration", "slow.oam.info.oamConfig",
3261 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
3264 { &hf_oampdu_info_oamConfig_mode
,
3265 { "OAM Mode", "slow.oam.info.oamConfig.mode",
3266 FT_BOOLEAN
, 8, TFS(&oam_mode
), OAMPDU_INFO_CONFIG_MODE
,
3269 { &hf_oampdu_info_oamConfig_uni
,
3270 { "Unidirectional support", "slow.oam.flags.dyingGasp",
3271 FT_BOOLEAN
, 8, TFS(&oam_uni
), OAMPDU_INFO_CONFIG_UNI
,
3274 { &hf_oampdu_info_oamConfig_lpbk
,
3275 { "Loopback support", "slow.oam.flags.criticalEvent",
3276 FT_BOOLEAN
, 8, TFS(&oam_lpbk
), OAMPDU_INFO_CONFIG_LPBK
,
3279 { &hf_oampdu_info_oamConfig_event
,
3280 { "Link Events support", "slow.oam.flags.localEvaluating",
3281 FT_BOOLEAN
, 8, TFS(&oam_event
), OAMPDU_INFO_CONFIG_EVENT
,
3284 { &hf_oampdu_info_oamConfig_var
,
3285 { "Variable Retrieval", "slow.oam.flags.localStable",
3286 FT_BOOLEAN
, 8, TFS(&oam_var
), OAMPDU_INFO_CONFIG_VAR
,
3287 "Variable Retrieval support", HFILL
}},
3289 { &hf_oampdu_info_oampduConfig
,
3290 { "Max OAMPDU Size", "slow.oam.info.oampduConfig",
3291 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
3292 "OAMPDU Configuration", HFILL
}},
3294 { &hf_oampdu_info_oui
,
3295 { "Organizationally Unique Identifier", "slow.oam.info.oui",
3296 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
3299 { &hf_oampdu_info_vendor
,
3300 { "Vendor Specific Information", "slow.oam.info.vendor",
3301 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
3305 * Event notification definitions
3307 { &hf_oampdu_event_sequence
,
3308 { "Sequence Number", "slow.oam.event.sequence",
3309 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
3310 "Identifies the Event Notification TLVs", HFILL
}},
3312 { &hf_oampdu_event_type
,
3313 { "Event Type", "slow.oam.event.type",
3314 FT_UINT8
, BASE_HEX
, VALS(event_type_vals
), 0x0,
3315 "Identifies the TLV type", HFILL
}},
3317 { &hf_oampdu_event_length
,
3318 { "Event Length", "slow.oam.event.length",
3319 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
3320 "This field indicates the length in octets of the TLV-tuple", HFILL
}},
3322 { &hf_oampdu_event_timeStamp
,
3323 { "Event Timestamp (100ms)", "slow.oam.event.timestamp",
3324 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
3325 "Event Time Stamp in term of 100 ms intervals", HFILL
}},
3327 /* Errored Symbol Period Event TLV */
3328 { &hf_oampdu_event_espeWindow
,
3329 { "Errored Symbol Window", "slow.oam.event.espeWindow",
3330 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
3331 "Number of symbols in the period", HFILL
}},
3333 { &hf_oampdu_event_espeThreshold
,
3334 { "Errored Symbol Threshold", "slow.oam.event.espeThreshold",
3335 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
3336 "Number of symbols required to generate the Event", HFILL
}},
3338 { &hf_oampdu_event_espeErrors
,
3339 { "Errored Symbols", "slow.oam.event.espeErrors",
3340 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
3341 "Number of symbols in error", HFILL
}},
3343 { &hf_oampdu_event_espeTotalErrors
,
3344 { "Error Running Total", "slow.oam.event.espeTotalErrors",
3345 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
3346 "Number of symbols in error since reset of the sublayer", HFILL
}},
3348 { &hf_oampdu_event_espeTotalEvents
,
3349 { "Event Running Total", "slow.oam.event.espeTotalEvents",
3350 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
3351 "Total Event generated since reset of the sublayer", HFILL
}},
3353 /* Errored Frame Event TLV */
3354 { &hf_oampdu_event_efeWindow
,
3355 { "Errored Frame Window", "slow.oam.event.efeWindow",
3356 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
3357 "Number of symbols in the period", HFILL
}},
3359 { &hf_oampdu_event_efeThreshold
,
3360 { "Errored Frame Threshold", "slow.oam.event.efeThreshold",
3361 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
3362 "Number of frames required to generate the Event", HFILL
}},
3364 { &hf_oampdu_event_efeErrors
,
3365 { "Errored Frames", "slow.oam.event.efeErrors",
3366 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
3367 "Number of symbols in error", HFILL
}},
3369 { &hf_oampdu_event_efeTotalErrors
,
3370 { "Error Running Total", "slow.oam.event.efeTotalErrors",
3371 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
3372 "Number of frames in error since reset of the sublayer", HFILL
}},
3374 { &hf_oampdu_event_efeTotalEvents
,
3375 { "Event Running Total", "slow.oam.event.efeTotalEvents",
3376 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
3377 "Total Event generated since reset of the sublayer", HFILL
}},
3379 /* Errored Frame Period Event TLV */
3380 { &hf_oampdu_event_efpeWindow
,
3381 { "Errored Frame Window", "slow.oam.event.efpeWindow",
3382 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
3383 "Number of frame in error during the period", HFILL
}},
3385 { &hf_oampdu_event_efpeThreshold
,
3386 { "Errored Frame Threshold", "slow.oam.event.efpeThreshold",
3387 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
3388 "Number of frames required to generate the Event", HFILL
}},
3390 { &hf_oampdu_event_efpeErrors
,
3391 { "Errored Frames", "slow.oam.event.efeErrors",
3392 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
3393 "Number of symbols in error", HFILL
}},
3395 { &hf_oampdu_event_efpeTotalErrors
,
3396 { "Error Running Total", "slow.oam.event.efpeTotalErrors",
3397 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
3398 "Number of frames in error since reset of the sublayer", HFILL
}},
3400 { &hf_oampdu_event_efpeTotalEvents
,
3401 { "Event Running Total", "slow.oam.event.efpeTotalEvents",
3402 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
3403 "Total Event generated since reset of the sublayer", HFILL
}},
3405 /* Errored Frame Second Summary Event TLV */
3406 { &hf_oampdu_event_efsseWindow
,
3407 { "Errored Frame Window", "slow.oam.event.efsseWindow",
3408 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
3409 "Number of frame in error during the period", HFILL
}},
3411 { &hf_oampdu_event_efsseThreshold
,
3412 { "Errored Frame Threshold", "slow.oam.event.efsseThreshold",
3413 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
3414 "Number of frames required to generate the Event", HFILL
}},
3416 { &hf_oampdu_event_efsseErrors
,
3417 { "Errored Frames", "slow.oam.event.efeErrors",
3418 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
3419 "Number of symbols in error", HFILL
}},
3421 { &hf_oampdu_event_efsseTotalErrors
,
3422 { "Error Running Total", "slow.oam.event.efsseTotalErrors",
3423 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
3424 "Number of frames in error since reset of the sublayer", HFILL
}},
3426 { &hf_oampdu_event_efsseTotalEvents
,
3427 { "Event Running Total", "slow.oam.event.efsseTotalEvents",
3428 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
3429 "Total Event generated since reset of the sublayer", HFILL
}},
3431 /* Variable request and response definitions*/
3432 { &hf_oampdu_variable_branch
,
3433 { "Branch", "slow.oam.variable.branch",
3434 FT_UINT8
, BASE_HEX
, VALS(branch_vals
), 0x0,
3435 "Variable Branch, derived from the CMIP protocol in Annex 30A", HFILL
}},
3437 { &hf_oampdu_variable_object
,
3438 { "Leaf", "slow.oam.variable.object",
3439 FT_UINT16
, BASE_HEX
, VALS(object_vals
), 0x0,
3440 "Object, derived from the CMIP protocol in Annex 30A", HFILL
}},
3442 { &hf_oampdu_variable_package
,
3443 { "Leaf", "slow.oam.variable.package",
3444 FT_UINT16
, BASE_HEX
, VALS(package_vals
), 0x0,
3445 "Package, derived from the CMIP protocol in Annex 30A", HFILL
}},
3447 { &hf_oampdu_variable_binding
,
3448 { "Leaf", "slow.oam.variable.binding",
3449 FT_UINT16
, BASE_HEX
, VALS(binding_vals
), 0x0,
3450 "Binding, derived from the CMIP protocol in Annex 30A", HFILL
}},
3452 { &hf_oampdu_variable_attribute
,
3453 { "Leaf", "slow.oam.variable.attribute",
3454 FT_UINT16
, BASE_HEX
|BASE_EXT_STRING
, &attribute_vals_ext
, 0x0,
3455 "Attribute, derived from the CMIP protocol in Annex 30A", HFILL
}},
3457 { &hf_oampdu_variable_width
,
3458 { "Variable Width", "slow.oam.variable.width",
3459 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
3462 { &hf_oampdu_variable_indication
,
3463 { "Variable indication", "slow.oam.variable.indication",
3464 FT_UINT8
, BASE_HEX
, VALS(indication_vals
), 0x0,
3467 { &hf_oampdu_variable_value
,
3468 { "Variable Value", "slow.oam.variable.value",
3469 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
3472 /* Loopback Control definitions*/
3474 { "Commands", "slow.oam.lpbk.commands",
3475 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
3476 "The List of Loopback Commands", HFILL
}},
3478 { &hf_oampdu_lpbk_enable
,
3479 { "Enable Remote Loopback", "slow.oam.lpbk.commands.enable",
3480 FT_BOOLEAN
, 8, NULL
, OAMPDU_LPBK_ENABLE
,
3481 "Enable Remote Loopback Command", HFILL
}},
3483 { &hf_oampdu_lpbk_disable
,
3484 { "Disable Remote Loopback", "slow.oam.lpbk.commands.disable",
3485 FT_BOOLEAN
, 8, NULL
, OAMPDU_LPBK_DISABLE
,
3486 "Disable Remote Loopback Command", HFILL
}}
3489 /* Setup protocol subtree array */
3491 static gint
*ett
[] = {
3494 &ett_lacpdu_a_flags
,
3495 &ett_lacpdu_p_flags
,
3500 &ett_oampdu_local_info
,
3501 &ett_oampdu_local_info_state
,
3502 &ett_oampdu_local_info_config
,
3503 &ett_oampdu_remote_info
,
3504 &ett_oampdu_remote_info_state
,
3505 &ett_oampdu_remote_info_config
,
3506 &ett_oampdu_org_info
,
3507 &ett_oampdu_event_espe
,
3508 &ett_oampdu_event_efe
,
3509 &ett_oampdu_event_efpe
,
3510 &ett_oampdu_event_efsse
,
3511 &ett_oampdu_event_ose
,
3512 &ett_oampdu_lpbk_ctrl
,
3518 static ei_register_info ei
[] = {
3519 { &ei_esmc_version_compliance
, { "slow.esmc.version.compliance", PI_MALFORMED
, PI_ERROR
, "Version must claim compliance with Version 1 of this protocol", EXPFILL
}},
3520 { &ei_esmc_tlv_type_ql_type_not_first
, { "slow.esmc.tlv_type.ql_type_not_first", PI_MALFORMED
, PI_ERROR
, "TLV Type must be QL because QL TLV must be first in the ESMC PDU", EXPFILL
}},
3521 { &ei_esmc_tlv_type_decoded_as_ql_type
, { "slow.esmc.tlv_type.decoded_as_ql_type", PI_UNDECODED
, PI_NOTE
, "Let's decode as if this is QL TLV", EXPFILL
}},
3522 { &ei_esmc_tlv_length_bad
, { "slow.esmc.tlv_length.bad", PI_MALFORMED
, PI_ERROR
, "QL TLV Length must be X", EXPFILL
}},
3523 { &ei_esmc_tlv_ql_unused_not_zero
, { "slow.esmc.tlv_ql_unused.not_zero", PI_MALFORMED
, PI_WARN
, "Unused bits of TLV must be all zeroes", EXPFILL
}},
3524 { &ei_esmc_quality_level_invalid
, { "slow.esmc.ql.invalid", PI_UNDECODED
, PI_WARN
, "Invalid SSM message, unknown QL code", EXPFILL
}},
3525 { &ei_esmc_tlv_type_not_timestamp
, { "slow.esmc.tlv_type.not_timestamp", PI_MALFORMED
, PI_ERROR
, "TLV Type must be == Timestamp because Timestamp Valid Flag is set", EXPFILL
}},
3526 { &ei_esmc_tlv_type_decoded_as_timestamp
, { "slow.esmc.tlv_type.decoded_as_timestamp", PI_UNDECODED
, PI_NOTE
, "Let's decode as if this is Timestamp TLV", EXPFILL
}},
3527 { &ei_esmc_reserved_not_zero
, { "slow.reserved_bits_must_be_set_to_all_zero", PI_PROTOCOL
, PI_WARN
, "Reserved bits must be set to all zero", EXPFILL
}},
3528 { &ei_oampdu_event_length_bad
, { "slow.oam.event.length.bad", PI_MALFORMED
, PI_ERROR
, "Event length should be at least 2", EXPFILL
}},
3531 expert_module_t
* expert_slow
;
3534 /* Register the protocol name and description */
3536 proto_slow
= proto_register_protocol("Slow Protocols", "802.3 Slow protocols", "slow");
3538 /* Required function calls to register the header fields and subtrees used */
3540 proto_register_field_array(proto_slow
, hf
, array_length(hf
));
3541 proto_register_subtree_array(ett
, array_length(ett
));
3542 expert_slow
= expert_register_protocol(proto_slow
);
3543 expert_register_field_array(expert_slow
, ei
, array_length(ei
));
3548 proto_reg_handoff_slow_protocols(void)
3550 dissector_handle_t slow_protocols_handle
;
3552 slow_protocols_handle
= create_dissector_handle(dissect_slow_protocols
, proto_slow
);
3553 dissector_add_uint("ethertype", ETHERTYPE_SLOW_PROTOCOLS
, slow_protocols_handle
);
3554 dh_data
= find_dissector("data");