2 * Routines for Ethernet OAM PDU dissection.
3 * IEEE Std 802.3, clause 57
5 * Copyright 2002 Steve Housley <steve_housley@3com.com>
6 * Copyright 2005 Dominique Bastien <dbastien@accedian.com>
7 * Copyright 2014 Philip Rosenberg-Watt <p.rosenberg-watt[at]cablelabs.com.>
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 1998 Gerald Combs
13 * SPDX-License-Identifier: GPL-2.0-or-later
18 #include <epan/packet.h>
20 #include <epan/unit_strings.h>
21 #include <epan/slow_protocol_subtypes.h>
22 #include <epan/expert.h>
24 /* General declarations */
25 void proto_register_oampdu(void);
26 void proto_reg_handoff_oampdu(void);
28 static dissector_handle_t oampdu_handle
;
35 #define OAMPDU_HEADER_SIZE 3
37 /* OAMPDU Flag bits */
38 #define OAMPDU_FLAGS_LINK_FAULT 0x01
39 #define OAMPDU_FLAGS_DYING_GASP 0x02
40 #define OAMPDU_FLAGS_CRITICAL_EVENT 0x04
41 #define OAMPDU_FLAGS_LOCAL_EVAL 0x08
42 #define OAMPDU_FLAGS_LOCAL_STABLE 0x10
43 #define OAMPDU_FLAGS_REMOTE_EVAL 0x20
44 #define OAMPDU_FLAGS_REMOTE_STABLE 0x40
47 #define OAMPDU_INFORMATION 0x0
48 #define OAMPDU_EVENT_NOTIFICATION 0x1
49 #define OAMPDU_VAR_REQUEST 0x2
50 #define OAMPDU_VAR_RESPONSE 0x3
51 #define OAMPDU_LOOPBACK_CTRL 0x4
52 #define OAMPDU_VENDOR_SPECIFIC 0xFE
54 /* Information Type */
55 #define OAMPDU_INFO_TYPE_ENDMARKER 0x0
56 #define OAMPDU_INFO_TYPE_LOCAL 0x1
57 #define OAMPDU_INFO_TYPE_REMOTE 0x2
58 #define OAMPDU_INFO_TYPE_ORG 0xFE
60 /* Size of fields within a OAMPDU Information */
61 #define OAMPDU_INFO_TYPE_SZ 1
62 #define OAMPDU_INFO_LENGTH_SZ 1
63 #define OAMPDU_INFO_VERSION_SZ 1
64 #define OAMPDU_INFO_REVISION_SZ 2
65 #define OAMPDU_INFO_STATE_SZ 1
66 #define OAMPDU_INFO_OAM_CONFIG_SZ 1
67 #define OAMPDU_INFO_OAMPDU_CONFIG_SZ 2
68 #define OAMPDU_INFO_OUI_SZ 3
69 #define OAMPDU_INFO_VENDOR_SPECIFIC_SZ 4
71 /* OAM configuration bits */
73 #define OAMPDU_INFO_CONFIG_MODE 0x01
74 #define OAMPDU_INFO_CONFIG_UNI 0x02
75 #define OAMPDU_INFO_CONFIG_LPBK 0x04
76 #define OAMPDU_INFO_CONFIG_EVENT 0x08
77 #define OAMPDU_INFO_CONFIG_VAR 0x10
80 #define OAMPDU_EVENT_TYPE_END 0x0
81 #define OAMPDU_EVENT_TYPE_ESPE 0x1
82 #define OAMPDU_EVENT_TYPE_EFE 0x2
83 #define OAMPDU_EVENT_TYPE_EFPE 0x3
84 #define OAMPDU_EVENT_TYPE_EFSSE 0x4
85 #define OAMPDU_EVENT_TYPE_OSE 0xFE
87 /* Size of fields within a OAMPDU Event notification */
88 #define OAMPDU_EVENT_SEQUENCE_SZ 2
89 #define OAMPDU_EVENT_TYPE_SZ 1
90 #define OAMPDU_EVENT_LENGTH_SZ 1
91 #define OAMPDU_EVENT_TIMESTAMP_SZ 2
93 /* Size of fields within a OAMPDU ESPE: Errored Symbol Period Event TLV */
94 #define OAMPDU_ESPE_WINDOW_SZ 8
95 #define OAMPDU_ESPE_THRESHOLD_SZ 8
96 #define OAMPDU_ESPE_ERRORS_SZ 8
97 #define OAMPDU_ESPE_ERR_TOTAL_SZ 8
98 #define OAMPDU_ESPE_TOTAL_SZ 4
100 /* Size of fields within a OAMPDU EFE: Errored Frame Event TLV */
101 #define OAMPDU_EFE_WINDOW_SZ 2
102 #define OAMPDU_EFE_THRESHOLD_SZ 4
103 #define OAMPDU_EFE_ERRORS_SZ 4
104 #define OAMPDU_EFE_ERR_TOTAL_SZ 8
105 #define OAMPDU_EFE_TOTAL_SZ 4
107 /* Size of fields within a OAMPDU EFPE: Errored Frame Period Event TLV */
108 #define OAMPDU_EFPE_WINDOW_SZ 4
109 #define OAMPDU_EFPE_THRESHOLD_SZ 4
110 #define OAMPDU_EFPE_ERRORS_SZ 4
111 #define OAMPDU_EFPE_ERR_TOTAL_SZ 8
112 #define OAMPDU_EFPE_TOTAL_SZ 4
114 /* Size of fields within a OAMPDU EFSSE: Errored Frame Seconds Summary Event TLV */
115 #define OAMPDU_EFSSE_WINDOW_SZ 2
116 #define OAMPDU_EFSSE_THRESHOLD_SZ 2
117 #define OAMPDU_EFSSE_ERRORS_SZ 2
118 #define OAMPDU_EFSSE_ERR_TOTAL_SZ 4
119 #define OAMPDU_EFSSE_TOTAL_SZ 4
121 /* Variable Branch Type */
122 #define OAMPDU_VARS_OBJECT 0x3
123 #define OAMPDU_VARS_PACKAGE 0x4
124 #define OAMPDU_VARS_BINDING 0x6
125 #define OAMPDU_VARS_ATTRIBUTE 0x7
127 /* OAMPDU Loopback Control bits */
128 #define OAMPDU_LPBK_ENABLE 0x01
129 #define OAMPDU_LPBK_DISABLE 0x02
132 #define DPOE_OPCODE_GET_REQUEST 0x01
133 #define DPOE_OPCODE_GET_RESPONSE 0x02
134 #define DPOE_OPCODE_SET_REQUEST 0x03
135 #define DPOE_OPCODE_SET_RESPONSE 0x04
137 /* see IEEE802.3, table 57-4 */
138 static const value_string code_vals
[] = {
139 { 0 , "Information" },
140 { 1 , "Event Notification" },
141 { 2 , "Variable Request" },
142 { 3 , "Variable Response" },
143 { 4 , "Loopback Control"},
144 { 0xFE , "Organization Specific" },
148 /* see IEEE802.3, table 57-6 */
149 static const value_string info_type_vals
[] = {
150 { 0 , "End of TLV marker" },
151 { 1 , "Local Information TLV" },
152 { 2 , "Remote Information TLV" },
153 { 0xFE , "Organization Specific Information TLV" },
157 /* see IEEE802.3, table 57-12 */
158 static const value_string event_type_vals
[] = {
159 { 0 , "End of TLV marker" },
160 { 1 , "Errored Symbol Period Event" },
161 { 2 , "Errored Frame Event" },
162 { 3 , "Errored Frame Period Event" },
163 { 4 , "Errored Frame Seconds Summary Event" },
164 { 0xFE , "Organization Specific Event TLV" },
169 * In the OAM protocol the {iso(1) member-body(2) us(840) ieee802dot3(10006)
170 * csmacdmgt(30)} prefix for the objects is pre-define. Only the
171 * managedObjectClass(3) is put in the branch and the leaf is one of the
174 static const value_string object_vals
[] = {
175 { 1, "macObjectClass" },
176 { 2, "phyObjectClass"},
177 { 3, "repeaterObjectClass"},
178 { 4, "groupObjectClass"},
179 { 5, "repeaterPortObjectClass"},
180 { 6, "mauObjectClass"},
181 { 7, "autoNegObjectClass"},
182 { 8, "macControlObjectClass"},
183 { 9, "macControlFunctionObjectClass"},
184 { 10, "oAggregator"},
185 { 11, "oAggregationPort"},
186 { 12, "oAggPortStats"},
187 { 13, "oAggPortDebugInformation" },
188 { 15, "pseObjectClass"},
189 { 17, "midSpanObjectClass"},
190 { 18, "midSpanGroupObjectClass"},
191 { 19, "ompObjectClass"},
192 { 20, "oamObjectClass" },
193 { 21, "mpcpObjectClass" },
194 { 24, "pafObjectClass" },
195 { 25, "pmeObjectClass"},
200 * In the OAM protocol the {iso(1) member-body(2) us(840) ieee802dot3(10006)
201 * csmacdmgt(30)} prefix for the objects is pre-defined. Only the
202 * package(4) is put in the branch and the leaf is one of the
205 static const value_string package_vals
[] = {
206 { 1, "macMandatoryPkg" },
207 { 2, "macRecommendedPkg" },
208 { 3, "macOptionalPkg" },
209 { 4, "macarrayPkg" },
210 { 5, "macExcessiveDeferralPkg" },
211 { 6, "phyRecommendedPkg" },
212 { 7, "phyMultiplePhyPkg" },
213 { 8, "phy100MbpsMonitor" },
214 { 9, "repeaterPerfMonitorPkg"},
215 { 10, "portPerfMonitorPkg"},
216 { 11, "portAddrTrackPkg"},
217 { 12, "port100MbpsMonitor"},
218 { 13, "mauControlPkg"},
219 { 14, "mediaLossTrackingPkg"},
220 { 15, "broadbandMAUPkg"},
221 { 16, "mau100MbpsMonitor"},
222 { 17, "macControlRecommendedPkg" },
224 { 19, "pAggregatorMandatory"},
225 { 20, "pAggregatorRecommended"},
226 { 21, "pAggregatorOptional"},
227 { 22, "pAggregationPortMandatory"},
228 { 23, "pAggPortStats"},
229 { 24, "pAggPortDebugInformation"},
231 { 27, "pseRecommendedPkg"},
236 { 38, "pafAggregation"},
241 * In the OAM protocol the {iso(1) member-body(2) us(840) ieee802dot3(10006)
242 * csmacdmgt(30)} prefix for the objects is pre-defined. Only the
243 * nameBinding(6) is put in the branch and the leaf is one of the
246 static const value_string binding_vals
[] = {
247 { 26, "repeaterPortName"},
252 * In the OAM protocol the {iso(1) member-body(2) us(840) ieee802dot3(10006)
253 * csmacdmgt(30)} prefix for the objects is pre-defined. Only the
254 * attribute(7) is put in the branch and the leaf is one of the
257 static const value_string attribute_vals
[] = {
259 { 2, "aFramesTransmittedOK" },
260 { 3, "aSingleCollisionFrames" },
261 { 4, "aMultipleCollisionFrames" },
262 { 5, "aFramesReceivedOK" },
263 { 6, "aFrameCheckSequenceErrors" },
264 { 7, "aAlignmentErrors" },
265 { 8, "aOctetsTransmittedOK" },
266 { 9, "aFramesWithDeferredXmissions" },
267 { 10, "aLateCollisions" },
268 { 11, "aFramesAbortedDueToXSColls" },
269 { 12, "aFramesLostDueToIntMACXmitError" },
270 { 13, "aCarrierSenseErrors" },
271 { 14, "aOctetsReceivedOK" },
272 { 15, "aFramesLostDueToIntMACRcvError" },
273 { 16, "aPromiscuousStatus" },
274 { 17, "aReadMulticastAddressList" },
275 { 18, "aMulticastFramesXmittedOK" },
276 { 19, "aBroadcastFramesXmittedOK" },
277 { 20, "aFramesWithExcessiveDeferral" },
278 { 21, "aMulticastFramesReceivedOK" },
279 { 22, "aBroadcastFramesReceivedOK" },
280 { 23, "aInRangeLengthErrors" },
281 { 24, "aOutOfRangeLengthField" },
282 { 25, "aFrameTooLongErrors" },
283 { 26, "aMACEnableStatus" },
284 { 27, "aTransmitEnableStatus" },
285 { 28, "aMulticastReceiveStatus" },
286 { 29, "aReadWriteMACAddress" },
287 { 30, "aCollisionFrames" },
290 { 33, "aPHYTypeList" },
291 { 34, "aSQETestErrors" },
292 { 35, "aSymbolErrorDuringCarrier" },
293 { 36, "aMIIDetect" },
294 { 37, "aPHYAdminState" },
295 { 38, "aRepeaterID" },
296 { 39, "aRepeaterType" },
297 { 40, "aRepeaterGroupCapacity" },
299 { 42, "aRepeaterHealthState" },
300 { 43, "aRepeaterHealthText" },
301 { 44, "aRepeaterHealthData" },
302 { 45, "aTransmitCollisions" }, /* XXX: was: 44 */
304 { 47, "aGroupPortCapacity" },
307 { 50, "aPortAdminState" },
308 { 51, "aAutoPartitionState" },
309 { 52, "aReadableFrames" },
310 { 53, "aReadableOctets" },
311 { 54, "aFrameCheckSequenceErrors" },
312 { 55, "aAlignmentErrors" },
313 { 56, "aFramesTooLong" },
314 { 57, "aShortEvents" },
316 { 59, "aCollisions" },
317 { 60, "aLateEvents" },
318 { 61, "aVeryLongEvents" },
319 { 62, "aDataRateMismatches" },
320 { 63, "aAutoPartitions" },
322 { 65, "aSymbolErrorDuringPacket" },
323 { 66, "aLastSourceAddress" },
324 { 67, "aSourceAddressChanges" },
327 { 70, "aMAUTypeList" },
328 { 71, "aMediaAvailable" },
329 { 72, "aLoseMediaCounter" },
331 { 74, "aMAUAdminState" },
332 { 75, "aBbMAUXmitRcvSplitType" },
333 { 76, "aBroadbandFrequencies" },
334 { 77, "aFalseCarriers" },
335 { 78, "aAutoNegID" },
336 { 79, "aAutoNegAdminState" },
337 { 80, "aAutoNegRemoteSignaling" },
338 { 81, "aAutoNegAutoConfig" },
339 { 82, "aAutoNegLocalTechnologyAbility" },
340 { 83, "aAutoNegAdvertisedTechnologyAbility" },
341 { 84, "aAutoNegReceivedTechnologyAbility" },
342 { 85, "aAutoNegLocalSelectorAbility" },
343 { 86, "aAutoNegAdvertisedSelectorAbility" },
344 { 87, "aAutoNegReceivedSelectorAbility" },
346 { 89, "aMACCapabilities" },
347 { 90, "aDuplexStatus" },
348 { 91, "aIdleErrorCount"},
349 { 92, "aMACControlID" },
350 { 93, "aMACControlFunctionsSupported" },
351 { 94, "aMACControlFramesTransmitted" },
352 { 95, "aMACControlFramesReceived" },
353 { 96, "aUnsupportedOpcodesReceived" },
354 { 97, "aPAUSELinkDelayAllowance" },
355 { 98, "aPAUSEMACCtrlFramesTransmitted" },
356 { 99, "aPAUSEMACCtrlFramesReceived" },
359 { 102, "aAggDescription" },
361 { 104, "aAggActorSystemID" },
362 { 105, "aAggActorSystemPriority" },
363 { 106, "aAggAggregateOrIndividual" },
364 { 107, "aAggActorAdminKey" },
365 { 108, "aAggActorOperKey" },
366 { 109, "aAggMACAddress" },
367 { 110, "aAggPartnerSystemID" },
368 { 111, "aAggPartnerSystemPriority" },
369 { 112, "aAggPartnerOperKey" },
370 { 113, "aAggAdminState" },
371 { 114, "aAggOperState" },
372 { 115, "aAggTimeOfLastOperChange" },
373 { 116, "aAggDataRate" },
374 { 117, "aAggOctetsTxOK" },
375 { 118, "aAggOctetsRxOK" },
376 { 119, "aAggFramesTxOK" },
377 { 120, "aAggFramesRxOK" },
378 { 121, "aAggMulticastFramesTxOK" },
379 { 122, "aAggMulticastFramesRxOK" },
380 { 123, "aAggBroadcastFramesTxOK" },
381 { 124, "aAggBroadcastFramesRxOK" },
382 { 125, "aAggFramesDiscardedOnTx" },
383 { 126, "aAggFramesDiscardedOnRx" },
384 { 127, "aAggFramesWithTxErrors" },
385 { 128, "aAggFramesWithRxErrors" },
386 { 129, "aAggUnknownProtocolFrames" },
387 { 130, "aAggLinkUpDownNotificationEnable" },
388 { 131, "aAggPortList" },
389 { 132, "aAggCollectorMaxDelay" },
390 { 133, "aAggPortID" },
391 { 134, "aAggPortActorSystemPriority" },
392 { 135, "aAggPortActorSystemID" },
393 { 136, "aAggPortActorAdminKey" },
394 { 137, "aAggPortActorOperKey" },
395 { 138, "aAggPortPartnerAdminSystemPriority" },
396 { 139, "aAggPortPartnerOperSystemPriority" },
397 { 140, "aAggPortPartnerAdminSystemID" },
398 { 141, "aAggPortPartnerOperSystemID" },
399 { 142, "aAggPortPartnerAdminKey" },
400 { 143, "aAggPortPartnerOperKey" },
401 { 144, "aAggPortSelectedAggID" },
402 { 145, "aAggPortAttachedAggID" },
403 { 146, "aAggPortActorPort" },
404 { 147, "aAggPortActorPortPriority" },
405 { 148, "aAggPortPartnerAdminPort" },
406 { 149, "aAggPortPartnerOperPort" },
407 { 150, "aAggPortPartnerAdminPortPriority" },
408 { 151, "aAggPortPartnerOperPortPriority" },
409 { 152, "aAggPortActorAdminState" },
410 { 153, "aAggPortActorOperState" },
411 { 154, "aAggPortPartnerAdminState" },
412 { 155, "aAggPortPartnerOperState" },
413 { 156, "aAggPortAggregateOrIndividual" },
414 { 157, "aAggPortStatsID" },
415 { 158, "aAggPortStatsLACPDUsRx" },
416 { 159, "aAggPortStatsMarkerPDUsRx" },
417 { 160, "aAggPortStatsMarkerResponsePDUsRx" },
418 { 161, "aAggPortStatsUnknownRx" },
419 { 162, "aAggPortStatsIllegalRx" },
420 { 163, "aAggPortStatsLACPDUsTx" },
421 { 164, "aAggPortStatsMarkerPDUsTx" },
422 { 165, "aAggPortStatsMarkerResponsePDUsTx" },
423 { 166, "aAggPortDebugInformationID" },
424 { 167, "aAggPortDebugRxState" },
425 { 168, "aAggPortDebugLastRxTime" },
426 { 169, "aAggPortDebugMuxState" },
427 { 170, "aAggPortDebugMuxReason" },
428 { 171, "aAggPortDebugActorChurnState" },
429 { 172, "aAggPortDebugPartnerChurnState" },
430 { 173, "aAggPortDebugActorChurnCount" },
431 { 174, "aAggPortDebugPartnerChurnCount" },
432 { 175, "aAggPortDebugActorSyncTransitionCount" },
433 { 176, "aAggPortDebugPartnerSyncTransitionCount" },
434 { 177, "aAggPortDebugActorChangeCount" },
435 { 178, "aAggPortDebugPartnerChangeCount" },
439 { 237, "aOAMAdminState" },
441 { 239, "aOAMRemoteMACAddress" },
442 { 240, "aOAMRemoteConfiguration" },
443 { 241, "aOAMRemotePDUConfiguration" },
444 { 242, "aOAMLocalFlagsField" },
445 { 243, "aOAMRemoteFlagsField" },
446 { 244, "aOAMRemoteRevision" },
447 { 245, "aOAMRemoteState" },
448 { 246, "aOAMRemoteVendorOUI" },
449 { 247, "aOAMRemoteVendorSpecificInfo" },
451 { 250, "aOAMUnsupportedCodesRx" },
452 { 251, "aOAMInformationTx" },
453 { 252, "aOAMInformationRx" },
455 { 254, "aOAMUniqueEventNotificationRx" },
456 { 255, "aOAMDuplicateEventNotificationRx" },
457 { 256, "aOAMLoopbackControlTx" },
458 { 257, "aOAMLoopbackControlRx" },
459 { 258, "aOAMVariableRequestTx" },
460 { 259, "aOAMVariableRequestRx" },
461 { 260, "aOAMVariableResponseTx" },
462 { 261, "aOAMVariableResponseRx" },
463 { 262, "aOAMOrganizationSpecificTx" },
464 { 263, "aOAMOrganizationSpecificRx" },
465 { 264, "aOAMLocalErrSymPeriodConfig" },
466 { 265, "aOAMLocalErrSymPeriodEvent" },
467 { 266, "aOAMLocalErrFrameConfig" },
468 { 267, "aOAMLocalErrFrameEvent" },
469 { 268, "aOAMLocalErrFramePeriodConfig" },
470 { 269, "aOAMLocalErrFramePeriodEvent" },
471 { 270, "aOAMLocalErrFrameSecsSummaryConfig" },
472 { 271, "aOAMLocalErrFrameSecsSummaryEvent" },
473 { 272, "aOAMRemoteErrSymPeriodEvent" },
474 { 273, "aOAMRemoteErrFrameEvent" },
475 { 274, "aOAMRemoteErrFramePeriodEvent" },
476 { 275, "aOAMRemoteErrFrameSecsSummaryEvent" },
477 { 276, "aFramesLostDueToOAMError" },
479 { 333, "aOAMDiscoveryState"},
480 { 334, "aOAMLocalConfiguration"},
481 { 335, "aOAMLocalPDUConfiguration"},
482 { 336, "aOAMLocalRevision"},
483 { 337, "aOAMLocalState"},
484 { 338, "aOAMUnsupportedCodesTx" },
485 { 339, "aOAMUniqueEventNotificationTx" },
486 { 340, "aOAMDuplicateEventNotificationTx" },
489 static value_string_ext attribute_vals_ext
= VALUE_STRING_EXT_INIT(attribute_vals
);
492 * In the OAM protocol the {iso(1) member-body(2) us(840) ieee802dot3(10006)
493 * csmacdmgt(30)} prefix for the objects is pre-defined. Only the
494 * package(4) is put in the branch and the leaf is one of the
497 static const value_string indication_vals
[] = {
498 { 0x01, "Variable Container(s) exceeded OAMPDU data field" },
500 { 0x20, "Attribute->Unable to return due to an undetermined error" },
501 { 0x21, "Attribute->Unable to return because it is not supported" },
502 { 0x22, "Attribute->May have been corrupted due to reset" },
503 { 0x23, "Attribute->Unable to return due to a hardware failure" },
504 { 0x24, "Attribute->Experience an overflow error" },
506 { 0x40, "Object->End of object indication" },
507 { 0x41, "Object->Unable to return due to an undetermined error" },
508 { 0x42, "Object->Unable to return because it is not supported" },
509 { 0x43, "Object->May have been corrupted due to reset" },
510 { 0x44, "Object->Unable to return due to a hardware failure" },
512 { 0x60, "Package->End of package indication" },
513 { 0x61, "Package->Unable to return due to an undetermined error" },
514 { 0x62, "Package->Unable to return because it is not supported" },
515 { 0x63, "Package->May have been corrupted due to reset" },
516 { 0x64, "Package->Unable to return due to a hardware failure" },
520 static const value_string status_vals
[] _U_
= {
521 { 0x00, "Unsatisfied, can't complete" },
522 { 0x01, "Discovery in process" },
523 { 0x02, "Satisfied, Discovery complete" },
524 { 0x10, "Satisfied, Discovery complete" },
525 { 0x20, "Discovery in process" },
526 { 0x40, "Satisfied, Discovery complete" },
527 { 0x50, "BUG Satisfied, Discovery complete" },
528 { 0x80, "Discovery in process" },
533 static const value_string branch_vals
[] = {
536 { 6, "nameBinding" },
541 static const value_string parser_vals
[] = {
542 { 0, "Forward non-OAMPDUs to higher sublayer" },
543 { 1, "Loopback non-OAMPDUs to the lower sublayer" },
544 { 2, "Discarding non-OAMPDUs" },
549 static const true_false_string mux
= {
550 "Discard non-OAMPDUs",
551 "Forward non-OAMPDUs to lower sublayer"
554 static const true_false_string oam_mode
= {
555 "DTE configured in Active mode",
556 "DTE configured in Passive mode"
559 static const true_false_string oam_uni
= {
560 "DTE is capable of sending OAMPDUs when rcv path is down",
561 "DTE is not capable of sending OAMPDUs when rcv path is down"
564 static const true_false_string oam_lpbk
= {
565 "DTE is capable of OAM remote loopback mode",
566 "DTE is not capable of OAM remote loopback mode"
569 static const true_false_string oam_event
= {
570 "DTE supports interpreting Link Events",
571 "DTE does not support interpreting Link Events"
574 static const true_false_string oam_var
= {
575 "DTE supports sending Variable Response",
576 "DTE does not support sending Variable Response"
579 static const value_string vendor_specific_opcode_vals
[] = {
580 { 0x00, "Reserved" },
581 { 0x01, "Get Request" },
582 { 0x02, "Get Response" },
583 { 0x03, "Set Request" },
584 { 0x04, "Set Response" },
585 { 0x05, "Multicast Request" },
586 { 0x06, "Multicast Register" },
587 { 0x07, "Multicast Register Response" },
588 { 0x08, "Key Exchange" },
589 { 0x09, "File Transfer" },
593 static const value_string dpoe_evt_code_vals
[] = {
595 { 0x12, "Key Exchange Failure" },
596 { 0x21, "Port Disable" },
597 { 0x41, "Power Failure" },
598 { 0x81, "Statistics Alarm" },
599 { 0x82, "D-ONU Busy" },
600 { 0x83, "MAC Table Overflow" },
604 /* DPoE Leaf-Branch codes */
605 #define DPOE_LB_ONU_OBJ 0xD60000
606 #define DPOE_LB_NETWORK_PORT_OBJ 0xD60001
607 #define DPOE_LB_LINK_OBJ 0xD60002
608 #define DPOE_LB_USER_PORT_OBJ 0xD60003
609 #define DPOE_LB_QUEUE_OBJ 0xD60004
610 #define DPOE_LB_MC_LL_OBJ 0xD60006
611 #define DPOE_LB_ONU_ID 0xD70002
612 #define DPOE_LB_FW_INFO 0xD70003
613 #define DPOE_LB_CHIPSET_INFO 0xD70004
614 #define DPOE_LB_DATE_OF_MANUFACTURE 0xD70005
615 #define DPOE_LB_MFG_INFO 0xD70006
616 #define DPOE_LB_MAX_LL 0xD70007
617 #define DPOE_LB_MAX_NET_PORTS 0xD70008
618 #define DPOE_LB_NUM_S1_INT 0xD70009
619 #define DPOE_LB_PKT_BUFFER 0xD7000A
620 #define DPOE_LB_REP_THRESH 0xD7000B
621 #define DPOE_LB_LL_FWD_STATE 0xD7000C
622 #define DPOE_LB_OAM_FR 0xD7000D
623 #define DPOE_LB_MFG_ORG_NAME 0xD7000E
624 #define DPOE_LB_TIME_VARYING_CONTROLS 0xD7000F
625 #define DPOE_LB_S1_INT_PORT_TYPE 0xD70010
626 #define DPOE_LB_VENDOR_NAME 0xD70011
627 #define DPOE_LB_MODEL_NUMBER 0xD70012
628 #define DPOE_LB_HW_VERSION 0xD70013
629 #define DPOE_LB_EPON_MODE 0xD70014
630 #define DPOE_LB_SW_BUNDLE 0xD70015
631 #define DPOE_LB_S1_INT_PORT_AUTONEG 0xD70105
632 #define DPOE_LB_PORT_INGRESS_RULE 0xD70501
633 #define DPOE_LB_QUEUE_CONFIG 0xD7010D
634 #define DPOE_LB_FW_FILENAME 0xD7010E
636 /* IEEE 1904.1 SIEPON Leaf-Branch codes used by DPoE */
637 #define DPOE_LB_1904_1_MAC_ENABLE_STATUS 0x07001A
638 #define DPOE_LB_1904_1_RW_MAC_ADDRESS 0x07001D
639 #define DPOE_LB_1904_1_A_PHY_TYPE 0x070020
640 #define DPOE_LB_1904_1_MEDIA_AVAILABLE 0x070047
641 #define DPOE_LB_1904_1_AUTONEG_ADM_STATE 0X07004F
642 #define DPOE_LB_1904_1_DUPLEX_STATUS 0x07005A
643 #define DPOE_LB_1904_1_MAC_CTl_FUNCTIONS 0x07005D
644 #define DPOE_LB_1904_1_ONU_PORT_CONFIG 0xD70114
645 #define DPOE_LB_1904_1_QUEUE_CONFIG 0xD70115
646 #define DPOE_LB_1904_1_CFG_MCAST_LLID 0xD90107
648 /* DPoE Object Context */
649 #define DPOE_OBJ_CTX_ONU 0x0000
650 #define DPOE_OBJ_CTX_NETWORK_PORT 0x0001
651 #define DPOE_OBJ_CTX_UCAST_LOGICAL_LINK 0x0002
652 #define DPOE_OBJ_CTX_S_INTERFACE 0x0003
653 #define DPOE_OBJ_CTX_QUEUE 0x0004
654 #define DPOE_OBJ_CTX_MEP 0x0005
655 #define DPOE_OBJ_CTX_MCAST_LOGICAL_LINK 0x0006
656 #define DPOE_OBJ_CTX_RESERVED 0x0007
658 /* As messages get implemented and verified, replace with defined codes from above. */
659 static const value_string dpoe_variable_descriptor_vals
[] = {
660 { DPOE_LB_ONU_OBJ
, "DPoE ONU Object" },
661 { DPOE_LB_NETWORK_PORT_OBJ
, "Network Port Object" },
662 { DPOE_LB_LINK_OBJ
, "Link Object" },
663 { DPOE_LB_USER_PORT_OBJ
, "User Port Object" },
664 { DPOE_LB_QUEUE_OBJ
, "Queue Object" },
665 { DPOE_LB_MC_LL_OBJ
, "Multicast Logical Link Object" },
666 { 0xD70001, "Sequence Number" },
667 { DPOE_LB_ONU_ID
, "DPoE ONU ID" },
668 { DPOE_LB_FW_INFO
, "Firmware Info" },
669 { DPOE_LB_CHIPSET_INFO
, "EPON Chip Info" },
670 { DPOE_LB_DATE_OF_MANUFACTURE
, "Date of Manufacture" },
671 { DPOE_LB_MFG_INFO
, "Manufacturer Info" },
672 { DPOE_LB_MAX_LL
, "Max Logical Links" },
673 { DPOE_LB_MAX_NET_PORTS
, "Number of Network Ports" },
674 { DPOE_LB_NUM_S1_INT
, "Number of S1 interfaces" },
675 { DPOE_LB_PKT_BUFFER
, "DPoE ONU Packet Buffer" },
676 { DPOE_LB_REP_THRESH
, "Report Thresholds" },
677 { DPOE_LB_LL_FWD_STATE
, "LLID Forwarding State" },
678 { DPOE_LB_OAM_FR
, "OAM Frame Rate" },
679 { DPOE_LB_MFG_ORG_NAME
, "ONU Manufacturer Organization Name" },
680 { DPOE_LB_TIME_VARYING_CONTROLS
, "Firmware Mfg Time Varying Controls" },
681 { DPOE_LB_S1_INT_PORT_TYPE
, "S1 interface port type" },
682 { DPOE_LB_VENDOR_NAME
, "Vendor name" },
683 { DPOE_LB_MODEL_NUMBER
, "Model number" },
684 { DPOE_LB_HW_VERSION
, "Hardware version" },
685 { DPOE_LB_SW_BUNDLE
, "Software bundle" },
686 { 0xD90001, "Reset DPoE ONU" },
687 { 0xD70101, "Dynamic Learning Table Size" },
688 { 0xD70102, "Dynamic Address Age Limit" },
689 { 0xD70103, "Dynamic MAC Table" },
690 { 0xD70104, "Static MAC Table" },
691 { DPOE_LB_S1_INT_PORT_AUTONEG
, "S1 Interface Port Auto-negotiation" },
692 { 0xD70106, "Source Address Admission Control" },
693 { 0xD70107, "MAC Learning Min Guarantee" },
694 { 0xD70108, "MAC Learning Max Allowed" },
695 { 0xD70109, "MAC Learning Aggregate Limit" },
696 { 0xD7010A, "Len Error Discard" },
697 { 0xD7010B, "Flood Unknown" },
698 { 0xD7010C, "Local Switching" },
699 { DPOE_LB_QUEUE_CONFIG
, "Queue Configuration" },
700 { DPOE_LB_FW_FILENAME
, "Firmware Filename" },
701 { 0xD70110, "Multicast LLID" },
702 { 0xD70111, "UNI MAC Learned" },
703 { 0xD70112, "ONU Max Frame Size Capability" },
704 { 0xD70113, "UNI Max Frame Size Limit" },
705 { DPOE_LB_1904_1_ONU_PORT_CONFIG
, "ONU Port Configuration" },
706 { DPOE_LB_1904_1_QUEUE_CONFIG
, "Queue Configuration" },
707 { 0xD90101, "Clear Dynamic MAC Table" },
708 { 0xD90102, "Add Dynamic MAC Address" },
709 { 0xD90103, "Delete Dynamic MAC Address" },
710 { 0xD90104, "Clear Static MAC Table" },
711 { 0xD90105, "Add Static MAC Table" },
712 { 0xD90106, "Delete Static MAC Address" },
713 { DPOE_LB_1904_1_CFG_MCAST_LLID
, "Config Multicast LLID"},
714 { 0xD70201, "Rx Unicast Frames" },
715 { 0xD70202, "Tx Unicast Frames" },
716 { 0xD70203, "Rx Frame Too Short" },
717 { 0xD70204, "Rx Frame 64" },
718 { 0xD70205, "Rx Frame 65_127" },
719 { 0xD70206, "Rx Frame 128_255" },
720 { 0xD70207, "Rx Frame 256_511" },
721 { 0xD70208, "Rx Frame 512_1023" },
722 { 0xD70209, "Rx Frame 1024_1518" },
723 { 0xD7020A, "Rx Frame 1519 Plus" },
724 { 0xD7020B, "Tx Frame 64" },
725 { 0xD7020C, "Tx Frame 65_127" },
726 { 0xD7020D, "Tx Frame 128_255" },
727 { 0xD7020E, "Tx Frame 256_511" },
728 { 0xD7020F, "Tx Frame 512_1023" },
729 { 0xD70210, "Tx Frame 1024_1518" },
730 { 0xD70211, "Tx Frame 1519 Plus" },
731 { 0xD70212, "Tx Delay Threshold" },
732 { 0xD70213, "Tx Delay" },
733 { 0xD70214, "Tx Frames Dropped" },
734 { 0xD70215, "Tx Bytes Dropped" },
735 { 0xD70216, "Tx Bytes Delayed" },
736 { 0xD70217, "Tx Bytes Unused" },
737 { 0xD70218, "Rx Delay Threshold" },
738 { 0xD70219, "Rx Delay" },
739 { 0xD7021A, "Rx Frames Dropped" },
740 { 0xD7021B, "Rx Bytes Dropped" },
741 { 0xD7021C, "Rx Bytes Delayed" },
742 { 0xD7021D, "Optical Mon Temperature" },
743 { 0xD7021E, "Optical Mon Vcc" },
744 { 0xD7021F, "Optical Mon Tx Bias Current" },
745 { 0xD70220, "Optical Mon Tx Power" },
746 { 0xD70221, "Optical Mon Rx Power" },
747 { 0xD70222, "Rx Frames Yellow" },
748 { 0xD70223, "Tx Frames Yellow" },
749 { 0xD70224, "Tx Bytes Green" },
750 { 0xD70225, "Rx Bytes Yellow" },
751 { 0xD70226, "Rx Bytes Green" },
752 { 0xD70227, "Tx Bytes Yellow" },
753 { 0xD70228, "Tx Frames Unicast" },
754 { 0xD70229, "Tx Frames Multicast" },
755 { 0xD7022A, "Tx Frames Broadcast" },
756 { 0xD7022B, "Rx Frames Unicast" },
757 { 0xD7022C, "Rx Frames Multicast" },
758 { 0xD7022D, "Rx Frames Broadcast" },
759 { 0xD7022E, "Number of Programmable Counters" },
760 { 0xD7022F, "L2CP Frames Rx" },
761 { 0xD70230, "L2CP Octets Rx" },
762 { 0xD70231, "L2CP Frames Tx" },
763 { 0xD70232, "L2CP Octets Tx" },
764 { 0xD70233, "L2CP Frames Discarded" },
765 { 0xD70234, "L2CP Octets Discarded" },
766 { 0xD70235, "Tx L2 Errors" },
767 { 0xD70236, "Rx L2 Errors" },
768 { 0xD70237, "Frames Over Limit Dropped Uni" },
769 { 0xD70238, "Octets Over Limit Dropped Uni" },
770 { 0xD90201, "Clear Status" },
771 { 0xD70301, "Port Stat Threshold" },
772 { 0xD70302, "Link Stat Threshold" },
773 { 0xD90301, "Retrieve Current Alarm Summary" },
774 { 0xD70401, "Encryption Key Expiry Time" },
775 { 0xD70402, "Encryption Mode" },
776 { DPOE_LB_PORT_INGRESS_RULE
, "Port Ingress Rule" },
777 { 0xD70502, "Custom Field" },
778 { 0xD70503, "C-VLAN TPID" },
779 { 0xD70504, "S-VLAN TPID" },
780 { 0xD90501, "Clear Port Ingress Rules" },
781 { 0xD90502, "Add Port Ingress Rule" },
782 { 0xD90503, "Delete Port Ingress Rule" },
783 { 0xD70601, "Broadcast Rate Limit" },
784 { 0xD70602, "Egress Shaping" },
785 { 0xD70603, "Ingress Policing" },
786 { 0xD70604, "Queue Rate Control" },
787 { 0xD70605, "FEC Mode" },
788 { 0xD90601, "Enable User Traffic" },
789 { 0xD90602, "Disable User Traffic" },
790 { 0xD90603, "Loopback Enable" },
791 { 0xD90604, "Loopback Disable" },
792 { 0xD90605, "Laser Tx Power Off" },
793 { 0x090005, "PHY Admin Control" },
794 { 0x09000B, "Auto Neg Renegotiate" },
795 { 0x09000C, "Auto Neg Admin Ctrl" },
796 { DPOE_LB_1904_1_MAC_ENABLE_STATUS
, "MAC Enable Status" },
797 { DPOE_LB_1904_1_A_PHY_TYPE
, "PHY Type"},
798 { DPOE_LB_1904_1_MEDIA_AVAILABLE
, "Media Available" },
799 { DPOE_LB_1904_1_AUTONEG_ADM_STATE
, "Auto-Negotiation Admin State" },
800 { DPOE_LB_1904_1_DUPLEX_STATUS
, "Duplex Status" },
801 { DPOE_LB_1904_1_MAC_CTl_FUNCTIONS
, "MAC Control Functions Supported" },
802 { DPOE_LB_1904_1_RW_MAC_ADDRESS
, "Read/Write MAC Address" },
803 { 0x070002, "Frames Tx OK" },
804 { 0x070003, "Single Collision Frames" },
805 { 0x070004, "Multiple Collision Frames" },
806 { 0x070005, "Frames Rx OK" },
807 { 0x070006, "FCS Errors" },
808 { 0x070007, "Alignment Errors" },
809 { 0x070008, "Octets Tx OK" },
810 { 0x070009, "Frames With Deferred Transmissions" },
811 { 0x07000A, "Late Collisions" },
812 { 0x07000B, "Frames Aborted Collisions" },
813 { 0x07000C, "Frames Lost Internal Tx Error" },
814 { 0x07000E, "Octets Rx OK" },
815 { 0x07000F, "Frames Lost Internal Rx Error" },
816 { 0x070012, "Multicast Frames Tx OK" },
817 { 0x070013, "Broadcast Frames Tx OK" },
818 { 0x070014, "Frames With Excessive Deferral" },
819 { 0x070015, "Multicast Frames Rx OK" },
820 { 0x070016, "Broadcast Frames Rx OK" },
821 { 0x070017, "In Range Length Errors" },
822 { 0x070018, "Out of Range Length" },
823 { 0x070019, "Frame Too Long Errors" },
824 { 0x070062, "PAUSE Frames Tx" },
825 { 0x070063, "PAUSE Frames Rx" },
826 { 0x070118, "MPCP Frames TX" },
827 { 0x070119, "MPCP Frames RX" },
828 { 0x070120, "MPCP Discovery Windows Tx" },
829 { 0x070122, "MPCP Discovery Timeout" },
830 { 0x070124, "FEC Corrected Blocks" },
831 { 0x070125, "FEC Uncorrectable Blocks" },
832 { 0x07013C, "REGISTER_ACK MPCPDUs Tx" },
833 { 0x07013E, "REGISTER_REQ MCCPDUs Tx" },
834 { 0x07013F, "REPORT MPCPDUs Tx" },
835 { 0x070140, "GATE MPCPDUs Rx" },
836 { 0x070142, "REGISTER MPCPDUs Rx" },
840 static const value_string dpoe_variable_response_code_vals
[] = {
841 { 0x80, "No Error" },
842 { 0x81, "Too Long" },
843 { 0x86, "Bad Parameters" },
844 { 0x87, "No Resources" },
845 { 0x88, "System Busy" },
846 { 0xA0, "Undetermined Error" },
847 { 0xA1, "Unsupported" },
848 { 0xA2, "May Be Corrupted" },
849 { 0xA3, "Hardware Failure" },
850 { 0xA4, "Overflow" },
854 static const value_string dpoe_1904_1_mac_enable_status_vals
[] = {
855 { 0x00, "disabled" },
860 static const value_string dpoe_1904_1_a_phy_type_vals
[] = {
865 { 0x17, "100BASE-T4" },
866 { 0x18, "100BASE-X" },
867 { 0x20, "100BASE-T2" },
868 { 0x24, "1000BASE-X" },
869 { 0x28, "1000BASE-T" },
870 { 0x30, "10GBASE-X" },
871 { 0x31, "10GBASE-R" },
872 { 0x32, "10GBASE-W" },
873 { 0x37, "10GBASE-T" },
874 { 0x7d, "2.5GBASE-T" },
875 { 0x7e, "5GBASE-T" },
879 static const value_string dpoe_1904_1_media_available_vals
[] = {
880 { 0x03, "available" },
881 { 0x04, "not_available" },
885 static const value_string dpoe_1904_1_autoneg_admstate_vals
[] = {
886 { 0x00000001, "disabled" },
887 { 0x00000002, "enabled" },
891 static const value_string dpoe_1904_1_duplex_status_vals
[] = {
892 { 0x01, "half_duplex" },
893 { 0x02, "full_duplex" },
898 static const value_string dpoe_1904_1_cfg_mcast_llid_action
[] = {
901 { 0x02, "Delete All" },
905 static const value_string user_port_object_subtype_vals
[] = {
906 { 0x00, "Terminator" },
913 static const value_string user_port_object_clause_fc_vals
[] = {
914 { 0x00, "LLID Index" },
915 { 0x01, "L2 Destination MAC address" },
916 { 0x02, "L2 Source MAC address" },
917 { 0x03, "L2 Type/Len" },
918 { 0x04, "B-DA ([802.1ah])" },
919 { 0x05, "B-SA ([802.1ah])" },
920 { 0x06, "I-Tag ([802.1ah])" },
921 { 0x07, "S-VLAN Tag" },
922 { 0x08, "C-VLAN Tag" },
924 { 0x0A, "IPv4 TOS/IPv6 Traffic Class" },
925 { 0x0B, "IPv4 TTL/IPv6 Hop Limit" },
926 { 0x0C, "IPv4/IPv6 Protocol Type" },
927 { 0x0D, "IPv4 Source Address" },
928 { 0x0E, "IPv6 Source Address" },
929 { 0x0F, "IPv4 Destination Address" },
930 { 0x10, "IPv6 Destination Address" },
931 { 0x11, "IPv6 Next Header" },
932 { 0x12, "IPv6 Flow Label" },
933 { 0x13, "TCP/UDP source port" },
934 { 0x14, "TCP/UDP destination port" },
935 { 0x15, "Reserved" },
936 { 0x16, "Reserved" },
937 { 0x17, "Reserved" },
938 { 0x18, "Custom field 0" },
939 { 0x19, "Custom field 1" },
940 { 0x1A, "Custom field 2" },
941 { 0x1B, "Custom field 3" },
942 { 0x1C, "Custom field 4" },
943 { 0x1D, "Custom field 5" },
944 { 0x1E, "Custom field 6" },
945 { 0x1F, "Custom field 7" },
949 static const value_string user_port_object_clause_operator_vals
[] = {
961 static const value_string user_port_object_result_rr_vals
[] = {
971 { 0x09, "Clear Delete" },
972 { 0x0A, "Clear Insert" },
976 static const value_string dpoe_oam_object_type_vals
[] = {
977 { DPOE_OBJ_CTX_ONU
, "D-ONU" },
978 { DPOE_OBJ_CTX_NETWORK_PORT
, "Network PON Port" },
979 { DPOE_OBJ_CTX_UCAST_LOGICAL_LINK
, "Unicast Logical Link" },
980 { DPOE_OBJ_CTX_S_INTERFACE
, "User Port" },
981 { DPOE_OBJ_CTX_QUEUE
, "Queue" },
982 { DPOE_OBJ_CTX_MEP
, "MEP" },
983 { DPOE_OBJ_CTX_MCAST_LOGICAL_LINK
, "Multicast Logical Link" },
984 { DPOE_OBJ_CTX_RESERVED
, "Reserved" },
988 static const unit_name_string units_pdus_100ms
= { " (PDUs/100ms)", NULL
};
989 static const unit_name_string units_num_100ms
= { " (Number of 100ms)", NULL
};
990 static const unit_name_string units_1k
= { " (KB)", NULL
};
992 static dgt_set_t Dgt0_9_bcd
= {
994 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
995 '0','1','2','3','4','5','6','7','8','9','?','?','?','?','?','?'
999 /* Initialise the protocol and registered fields */
1000 static int proto_oampdu
;
1002 static int hf_oampdu_flags
;
1003 static int hf_oampdu_flags_link_fault
;
1004 static int hf_oampdu_flags_dying_gasp
;
1005 static int hf_oampdu_flags_critical_event
;
1006 static int hf_oampdu_flags_local_evaluating
;
1007 static int hf_oampdu_flags_local_stable
;
1008 static int hf_oampdu_flags_remote_evaluating
;
1009 static int hf_oampdu_flags_remote_stable
;
1010 static int hf_oampdu_code
;
1012 static int hf_oampdu_info_type
;
1013 static int hf_oampdu_info_len
;
1014 static int hf_oampdu_info_version
;
1015 static int hf_oampdu_info_revision
;
1016 static int hf_oampdu_info_state
;
1017 static int hf_oampdu_info_oamConfig
;
1018 static int hf_oampdu_info_oampduConfig
;
1019 static int hf_oampdu_info_oui
;
1020 static int hf_oampdu_info_vendor
;
1021 /* static int hf_oampdu_info_dpoe_oam_version; */
1022 static int hf_oampdu_info_state_parser
;
1023 static int hf_oampdu_info_state_mux
;
1025 static int hf_oampdu_info_oamConfig_mode
;
1026 static int hf_oampdu_info_oamConfig_uni
;
1027 static int hf_oampdu_info_oamConfig_lpbk
;
1028 static int hf_oampdu_info_oamConfig_event
;
1029 static int hf_oampdu_info_oamConfig_var
;
1031 static int hf_oampdu_event_type
;
1032 static int hf_oampdu_event_sequence
;
1033 static int hf_oampdu_event_length
;
1034 static int hf_oampdu_event_timeStamp
;
1036 static int hf_oampdu_event_espeWindow
;
1037 static int hf_oampdu_event_espeThreshold
;
1038 static int hf_oampdu_event_espeErrors
;
1039 static int hf_oampdu_event_espeTotalErrors
;
1040 static int hf_oampdu_event_espeTotalEvents
;
1042 static int hf_oampdu_event_efeWindow
;
1043 static int hf_oampdu_event_efeThreshold
;
1044 static int hf_oampdu_event_efeErrors
;
1045 static int hf_oampdu_event_efeTotalErrors
;
1046 static int hf_oampdu_event_efeTotalEvents
;
1048 static int hf_oampdu_event_efpeWindow
;
1049 static int hf_oampdu_event_efpeThreshold
;
1050 static int hf_oampdu_event_efpeErrors
;
1051 static int hf_oampdu_event_efpeTotalErrors
;
1052 static int hf_oampdu_event_efpeTotalEvents
;
1054 static int hf_oampdu_event_efsseWindow
;
1055 static int hf_oampdu_event_efsseThreshold
;
1056 static int hf_oampdu_event_efsseErrors
;
1057 static int hf_oampdu_event_efsseTotalErrors
;
1058 static int hf_oampdu_event_efsseTotalEvents
;
1060 static int hf_oampdu_variable_branch
;
1061 static int hf_oampdu_variable_object
;
1062 static int hf_oampdu_variable_package
;
1063 static int hf_oampdu_variable_binding
;
1064 static int hf_oampdu_variable_attribute
;
1065 static int hf_oampdu_variable_width
;
1066 static int hf_oampdu_variable_indication
;
1067 static int hf_oampdu_variable_value
;
1068 /* static int hf_oampdu_vendor_specific_opcode; */
1069 static int hf_oampdu_vendor_specific_dpoe_opcode
;
1070 static int hf_oampdu_vendor_specific_dpoe_evt_code
;
1071 static int hf_oampdu_vendor_specific_dpoe_evt_raised
;
1072 static int hf_oampdu_vendor_specific_dpoe_evt_object_type
;
1073 static int hf_dpoe_variable_descriptor
;
1074 static int hf_dpoe_variable_response_code
;
1075 static int hf_oam_dpoe_response_eth
;
1076 static int hf_oam_dpoe_response_int
;
1078 static int hf_oam_dpoe_fw_info_boot_version
;
1079 static int hf_oam_dpoe_fw_info_boot_crc
;
1080 static int hf_oam_dpoe_fw_info_fw_version
;
1081 static int hf_oam_dpoe_fw_info_fw_crc
;
1082 static int hf_oam_dpoe_date_of_manufacture
;
1083 static int hf_oam_dpoe_chipset_jedec_id
;
1084 static int hf_oam_dpoe_chipset_chip_model
;
1085 static int hf_oam_dpoe_chipset_chip_version
;
1086 static int hf_oam_dpoe_mfg_info_serial_number
;
1087 static int hf_oam_dpoe_mfg_info_vendor_specific
;
1088 static int hf_oam_dpoe_mll_b
;
1089 static int hf_oam_dpoe_mll_do
;
1090 static int hf_oam_dpoe_pkt_buffer_us_queues
;
1091 static int hf_oam_dpoe_pkt_buffer_us_queues_max_per_link
;
1092 static int hf_oam_dpoe_pkt_buffer_us_queue_inc
;
1093 static int hf_oam_dpoe_pkt_buffer_ds_queues
;
1094 static int hf_oam_dpoe_pkt_buffer_ds_queues_max_per_link
;
1095 static int hf_oam_dpoe_pkt_buffer_ds_queue_inc
;
1096 static int hf_oam_dpoe_pkt_buffer_total_memory
;
1097 static int hf_oam_dpoe_pkt_buffer_us_memory_max
;
1098 static int hf_oam_dpoe_pkt_buffer_ds_memory_max
;
1099 static int hf_oam_dpoe_frame_rate_minimum
;
1100 static int hf_oam_dpoe_frame_rate_maximum
;
1101 static int hf_oam_dpoe_mfg_org_name
;
1102 static int hf_oam_dpoe_tvc_code_access_start
;
1103 static int hf_oam_dpoe_tvc_cvc_access_start
;
1104 static int hf_oam_dpoe_vendor_name
;
1105 static int hf_oam_dpoe_model_number
;
1106 static int hf_oam_dpoe_hw_version
;
1107 static int hf_oam_dpoe_sw_bundle
;
1108 static int hf_oam_dpoe_repthr_nqs
;
1109 static int hf_oam_dpoe_repthr_rvpqs
;
1110 static int hf_oam_dpoe_report_threshold
;
1111 static int hf_oam_dpoe_ll_fwd_state
;
1112 static int hf_oam_dpoe_s1_autoneg
;
1113 static int hf_oam_dpoe_s1_autoneg_hd
;
1114 static int hf_oam_dpoe_s1_autoneg_fd
;
1115 static int hf_oam_dpoe_s1_autoneg_10
;
1116 static int hf_oam_dpoe_s1_autoneg_100
;
1117 static int hf_oam_dpoe_s1_autoneg_1000
;
1118 static int hf_oam_dpoe_s1_autoneg_10000
;
1119 static int hf_oam_dpoe_s1_autoneg_fc
;
1120 static int hf_oam_dpoe_s1_autoneg_mdi
;
1121 static int hf_oam_dpoe_user_port_object
;
1122 static int hf_oam_dpoe_user_port_object_subtype
;
1123 static int hf_oam_dpoe_user_port_object_header_precedence
;
1124 static int hf_oam_dpoe_user_port_object_clause_fc
;
1125 static int hf_oam_dpoe_user_port_object_clause_fi
;
1126 static int hf_oam_dpoe_user_port_object_clause_msbm
;
1127 static int hf_oam_dpoe_user_port_object_clause_lsbm
;
1128 static int hf_oam_dpoe_user_port_object_clause_operator
;
1129 static int hf_oam_dpoe_user_port_object_clause_mvl
;
1130 static int hf_oam_dpoe_user_port_object_clause_mv
;
1131 static int hf_oam_dpoe_user_port_object_result_rr
;
1132 static int hf_oam_dpoe_user_port_object_result_rr_queue_obj_type
;
1133 static int hf_oam_dpoe_user_port_object_result_rr_queue_obj_inst
;
1134 static int hf_oam_dpoe_user_port_object_result_rr_queue_queue_index
;
1135 static int hf_oam_dpoe_user_port_object_result_rr_set_fc
;
1136 static int hf_oam_dpoe_user_port_object_result_rr_set_fi
;
1137 static int hf_oam_dpoe_user_port_object_result_rr_copy
;
1138 static int hf_oam_dpoe_user_port_object_result_rr_delete
;
1139 static int hf_oam_dpoe_user_port_object_result_rr_insert
;
1140 static int hf_oam_dpoe_user_port_object_result_rr_replace
;
1141 static int hf_oam_dpoe_user_port_object_result_rr_cd
;
1142 static int hf_oam_dpoe_user_port_object_result_rr_ci
;
1143 static int hf_oam_dpoe_qc_ll_u
;
1144 static int hf_oam_dpoe_qc_ports_d
;
1145 static int hf_oam_dpoe_qc_nq
;
1146 static int hf_oam_dpoe_qc_queue_size
;
1147 static int hf_oam_dpoe_fw_filename
;
1148 static int hf_oam_dpoe_onu_port_config_llid_count
;
1149 static int hf_oam_dpoe_onu_port_config_uni_count
;
1151 static int hf_oam_dpoe_1904_1_mac_enable_status
;
1152 static int hf_oam_dpoe_1904_1_a_phy_type
;
1153 static int hf_oam_dpoe_1904_1_media_available
;
1154 static int hf_oam_dpoe_1904_1_autoneg_admstate
;
1155 static int hf_oam_dpoe_1904_1_duplex_status
;
1156 static int hf_oam_dpoe_1904_1_mac_control_functions_supported
;
1157 static int hf_oam_dpoe_1904_1_cfg_mcast_llid_action
;
1158 static int hf_oam_dpoe_1904_1_cfg_mcast_llid_value
;
1159 static int hf_oam_dpoe_1904_1_read_write_mac_address
;
1160 static int hf_oam_dpoe_1904_1_qc_queue_size
;
1162 static int hf_oampdu_lpbk
;
1163 static int hf_oampdu_lpbk_enable
;
1164 static int hf_oampdu_lpbk_disable
;
1166 static int ett_oampdu_vendor_specific
;
1167 static int ett_dpoe_opcode
;
1168 static int ett_dpoe_opcode_response
;
1169 static int ett_oam_dpoe_s1_autoneg
;
1170 static int ett_oam_dpoe_qc_u
;
1171 static int ett_oam_dpoe_qc_d
;
1172 static int ett_oam_dpoe_qc_nq
;
1174 /* Initialise the subtree pointers */
1176 static int ett_oampdu
;
1177 static int ett_oampdu_flags
;
1179 static int ett_oampdu_local_info
;
1180 static int ett_oampdu_local_info_state
;
1181 static int ett_oampdu_local_info_config
;
1182 static int ett_oampdu_remote_info
;
1183 static int ett_oampdu_remote_info_state
;
1184 static int ett_oampdu_remote_info_config
;
1185 static int ett_oampdu_org_info
;
1187 static int ett_oampdu_event_espe
;
1188 static int ett_oampdu_event_efe
;
1189 static int ett_oampdu_event_efpe
;
1190 static int ett_oampdu_event_efsse
;
1191 static int ett_oampdu_event_ose
;
1193 static int ett_oampdu_lpbk_ctrl
;
1195 static expert_field ei_oampdu_event_length_bad
;
1196 static expert_field ei_oampdu_mvl_length_zero
;
1199 dissect_oampdu_information(tvbuff_t
*tvb
, proto_tree
*tree
);
1202 dissect_oampdu_event_notification(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
);
1205 dissect_oampdu_variable_request(tvbuff_t
*tvb
, proto_tree
*tree
);
1208 dissect_oampdu_variable_response(tvbuff_t
*tvb
, proto_tree
*tree
);
1211 dissect_oampdu_loopback_control(tvbuff_t
*tvb
, proto_tree
*tree
);
1214 dissect_oampdu_vendor_specific(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
);
1217 dissect_cablelabs_event_notification(tvbuff_t
*tvb
, proto_tree
*tree
, uint8_t bytes
, uint32_t offset
);
1220 * Name: dissect_oampdu
1223 * This function is used to dissect the Operation, Administration, and
1224 * Maintenance slow protocol defined in IEEE 802.3 clause 57 (The OAMPDUs
1225 * common part is defined in section 57.4).
1227 * Only the 6 following codes are currently defined in the 2004 version of this
1230 * OAMPDU_INFORMATION: 0x0
1231 * OAMPDU_EVENT_NOTIFICATION: 0x1
1232 * OAMPDU_VAR_REQUEST: 0x2
1233 * OAMPDU_VAR_RESPONSE: 0x3
1234 * OAMPDU_LOOPBACK_CTRL: 0x4
1235 * OAMPDU_VENDOR_SPECIFIC: 0xFE
1238 * tvb: buffer associated with the rcv packet (see tvbuff.h).
1239 * pinfo: structure associated with the rcv packet (see packet_info.h).
1240 * tree: the protocol tree associated with the rcv packet (see proto.h).
1242 * Return Values: None
1245 * Dominique Bastien (dbastien@accedian.com)
1246 * + add support for 802.3ah-2004.
1249 dissect_oampdu(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
1252 uint8_t oampdu_code
;
1254 proto_tree
*oampdu_tree
;
1255 proto_item
*oampdu_item
;
1257 static int * const oampdu_flags
[] = {
1258 &hf_oampdu_flags_link_fault
,
1259 &hf_oampdu_flags_dying_gasp
,
1260 &hf_oampdu_flags_critical_event
,
1261 &hf_oampdu_flags_local_evaluating
,
1262 &hf_oampdu_flags_local_stable
,
1263 &hf_oampdu_flags_remote_evaluating
,
1264 &hf_oampdu_flags_remote_stable
,
1268 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "OAM");
1269 col_clear(pinfo
->cinfo
, COL_INFO
);
1271 oampdu_item
= proto_tree_add_protocol_format(tree
, proto_oampdu
,
1272 tvb
, 0, -1, "OAM Protocol");
1273 oampdu_tree
= proto_item_add_subtree(oampdu_item
, ett_oampdu
);
1276 proto_tree_add_bitmask_with_flags(oampdu_tree
, tvb
, offset
, hf_oampdu_flags
, ett_oampdu_flags
, oampdu_flags
, ENC_BIG_ENDIAN
, BMT_NO_FALSE
|BMT_NO_TFS
);
1280 oampdu_code
= tvb_get_uint8(tvb
, offset
);
1281 proto_tree_add_uint(oampdu_tree
, hf_oampdu_code
, tvb
,
1282 offset
, 1, oampdu_code
);
1284 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "OAMPDU: %s", val_to_str_const(oampdu_code
, code_vals
, "Unknown"));
1286 switch (oampdu_code
)
1288 case OAMPDU_INFORMATION
:
1289 dissect_oampdu_information(tvb
, oampdu_tree
);
1291 case OAMPDU_EVENT_NOTIFICATION
:
1292 dissect_oampdu_event_notification(tvb
, pinfo
, oampdu_tree
);
1294 case OAMPDU_VAR_REQUEST
:
1295 dissect_oampdu_variable_request(tvb
, oampdu_tree
);
1297 case OAMPDU_VAR_RESPONSE
:
1298 dissect_oampdu_variable_response(tvb
, oampdu_tree
);
1300 case OAMPDU_LOOPBACK_CTRL
:
1301 dissect_oampdu_loopback_control(tvb
, oampdu_tree
);
1303 case OAMPDU_VENDOR_SPECIFIC
:
1304 dissect_oampdu_vendor_specific(tvb
, pinfo
, oampdu_tree
);
1308 return tvb_captured_length(tvb
);
1312 * Name: dissect_oampdu_information
1315 * This function is used to dissect the Information TLVs defined in IEEE802.3
1320 * tvb: buffer associated with the rcv packet (see tvbuff.h).
1321 * tree: the protocol tree associated with the oampdu (see proto.h).
1323 * Return Values: None
1326 * Dominique Bastien (dbastien@accedian.com)
1327 * + add support for 802.3ah-2004.
1330 dissect_oampdu_information(tvbuff_t
*tvb
, proto_tree
*tree
)
1337 proto_tree
*info_tree
;
1338 proto_item
*info_item
;
1341 offset
= OAMPDU_HEADER_SIZE
;
1345 bytes
= tvb_captured_length_remaining(tvb
, offset
);
1346 if (bytes
< 1) break;
1348 info_type
= tvb_get_uint8(tvb
, offset
);
1350 if (info_type
== OAMPDU_INFO_TYPE_ENDMARKER
) break;
1352 info_item
= proto_tree_add_uint(tree
, hf_oampdu_info_type
, tvb
,
1353 offset
, 1, info_type
);
1357 case OAMPDU_INFO_TYPE_LOCAL
:
1358 info_tree
= proto_item_add_subtree(info_item
, ett_oampdu_local_info
);
1360 case OAMPDU_INFO_TYPE_REMOTE
:
1361 info_tree
= proto_item_add_subtree(info_item
, ett_oampdu_remote_info
);
1363 case OAMPDU_INFO_TYPE_ORG
:
1364 info_tree
= proto_item_add_subtree(info_item
, ett_oampdu_org_info
);
1371 offset
+= OAMPDU_INFO_TYPE_SZ
;
1373 if ((info_type
==OAMPDU_INFO_TYPE_LOCAL
)||(info_type
==OAMPDU_INFO_TYPE_REMOTE
))
1375 static int * const info_states
[] = {
1376 &hf_oampdu_info_state_parser
,
1377 &hf_oampdu_info_state_mux
,
1380 static int * const info_config
[] = {
1381 &hf_oampdu_info_oamConfig_mode
,
1382 &hf_oampdu_info_oamConfig_uni
,
1383 &hf_oampdu_info_oamConfig_lpbk
,
1384 &hf_oampdu_info_oamConfig_event
,
1385 &hf_oampdu_info_oamConfig_var
,
1389 proto_tree_add_item(info_tree
, hf_oampdu_info_len
,
1390 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1392 offset
+= OAMPDU_INFO_LENGTH_SZ
;
1394 proto_tree_add_item(info_tree
, hf_oampdu_info_version
,
1395 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1397 offset
+= OAMPDU_INFO_VERSION_SZ
;
1399 proto_tree_add_item(info_tree
, hf_oampdu_info_revision
,
1400 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1402 offset
+= OAMPDU_INFO_REVISION_SZ
;
1404 /* Build OAM State field field */
1405 raw_octet
= tvb_get_uint8(tvb
, offset
);
1406 if (raw_octet
== OAMPDU_INFO_TYPE_LOCAL
)
1407 proto_tree_add_bitmask(info_tree
, tvb
, offset
, hf_oampdu_info_state
, ett_oampdu_local_info_state
, info_states
, ENC_NA
);
1409 proto_tree_add_bitmask(info_tree
, tvb
, offset
, hf_oampdu_info_state
, ett_oampdu_remote_info_state
, info_states
, ENC_NA
);
1411 offset
+= OAMPDU_INFO_STATE_SZ
;
1413 /* Build OAM configuration field */
1414 raw_octet
= tvb_get_uint8(tvb
, offset
);
1415 if (raw_octet
== OAMPDU_INFO_TYPE_LOCAL
)
1416 proto_tree_add_bitmask(info_tree
, tvb
, offset
, hf_oampdu_info_oamConfig
, ett_oampdu_local_info_config
, info_config
, ENC_NA
);
1418 proto_tree_add_bitmask(info_tree
, tvb
, offset
, hf_oampdu_info_oamConfig
, ett_oampdu_remote_info_config
, info_config
, ENC_NA
);
1420 offset
+= OAMPDU_INFO_OAM_CONFIG_SZ
;
1422 proto_tree_add_item(info_tree
, hf_oampdu_info_oampduConfig
,
1423 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1425 offset
+= OAMPDU_INFO_OAMPDU_CONFIG_SZ
;
1427 proto_tree_add_item(info_tree
, hf_oampdu_info_oui
,
1428 tvb
, offset
, 3, ENC_BIG_ENDIAN
);
1430 offset
+= OAMPDU_INFO_OUI_SZ
;
1432 proto_tree_add_item(info_tree
, hf_oampdu_info_vendor
,
1433 tvb
, offset
, 4, ENC_NA
);
1435 offset
+= OAMPDU_INFO_VENDOR_SPECIFIC_SZ
;
1437 else if (info_type
== OAMPDU_INFO_TYPE_ORG
)
1439 /* see IEEE802.3, section 57.5.2.3 for more details */
1440 raw_octet
= tvb_get_uint8(tvb
, offset
);
1441 proto_tree_add_item(info_tree
, hf_oampdu_info_len
,
1442 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1444 offset
+= OAMPDU_INFO_LENGTH_SZ
;
1446 proto_tree_add_item(info_tree
, hf_oampdu_info_oui
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
1447 offset
+= OAMPDU_INFO_OUI_SZ
;
1449 proto_tree_add_item(info_tree
, hf_oampdu_info_vendor
,
1450 tvb
, offset
, raw_octet
-5, ENC_NA
);
1452 offset
+= raw_octet
-5;
1457 /* If it's a unknown type jump over */
1458 raw_octet
= tvb_get_uint8(tvb
, offset
);
1459 offset
+= raw_octet
;
1465 * Name: dissect_oampdu_event_notification
1468 * This function is used to dissect the Event Notification TLVs defined in
1469 * IEEE802.3 section 57.5.3.
1473 * tvb: buffer associated with the rcv packet (see tvbuff.h).
1474 * tree: the protocol tree associated with the oampdu (see proto.h).
1476 * Return Values: None
1479 * Dominique Bastien (dbastien@accedian.com)
1480 * + add support for 802.3ah-2004.
1483 dissect_oampdu_event_notification(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
1491 proto_tree
*event_tree
;
1492 proto_item
*event_item
;
1494 offset
= OAMPDU_HEADER_SIZE
;
1496 /* Display the sequence number before displaying the TLVs */
1497 proto_tree_add_item(tree
, hf_oampdu_event_sequence
,
1498 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1499 offset
+= OAMPDU_EVENT_SEQUENCE_SZ
;
1503 bytes
= tvb_captured_length_remaining(tvb
, offset
);
1504 if (bytes
< 1) break;
1506 event_type
= tvb_get_uint8(tvb
, offset
);
1508 if (event_type
== OAMPDU_EVENT_TYPE_END
) break;
1510 event_item
= proto_tree_add_uint(tree
, hf_oampdu_event_type
,
1511 tvb
, offset
, 1, event_type
);
1513 offset
+= OAMPDU_EVENT_TYPE_SZ
;
1517 case OAMPDU_EVENT_TYPE_ESPE
:
1518 event_tree
= proto_item_add_subtree(event_item
,
1519 ett_oampdu_event_espe
);
1521 proto_tree_add_item(event_tree
, hf_oampdu_event_length
,
1522 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1523 offset
+= OAMPDU_EVENT_LENGTH_SZ
;
1525 proto_tree_add_item(event_tree
, hf_oampdu_event_timeStamp
,
1526 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1527 offset
+= OAMPDU_EVENT_TIMESTAMP_SZ
;
1529 proto_tree_add_item(event_tree
, hf_oampdu_event_espeWindow
,
1530 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
1531 offset
+= OAMPDU_ESPE_WINDOW_SZ
;
1533 proto_tree_add_item(event_tree
, hf_oampdu_event_espeThreshold
,
1534 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
1535 offset
+= OAMPDU_ESPE_THRESHOLD_SZ
;
1537 proto_tree_add_item(event_tree
, hf_oampdu_event_espeErrors
,
1538 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
1539 offset
+= OAMPDU_ESPE_ERRORS_SZ
;
1541 proto_tree_add_item(event_tree
, hf_oampdu_event_espeTotalErrors
,
1542 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
1543 offset
+= OAMPDU_ESPE_ERR_TOTAL_SZ
;
1545 proto_tree_add_item(event_tree
, hf_oampdu_event_espeTotalEvents
,
1546 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1547 offset
+= OAMPDU_ESPE_TOTAL_SZ
;
1550 case OAMPDU_EVENT_TYPE_EFE
:
1551 event_tree
= proto_item_add_subtree(event_item
,
1552 ett_oampdu_event_efe
);
1554 proto_tree_add_item(event_tree
, hf_oampdu_event_length
,
1555 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1556 offset
+= OAMPDU_EVENT_LENGTH_SZ
;
1558 proto_tree_add_item(event_tree
, hf_oampdu_event_timeStamp
,
1559 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1560 offset
+= OAMPDU_EVENT_TIMESTAMP_SZ
;
1562 proto_tree_add_item(event_tree
, hf_oampdu_event_efeWindow
,
1563 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1564 offset
+= OAMPDU_EFE_WINDOW_SZ
;
1566 proto_tree_add_item(event_tree
, hf_oampdu_event_efeThreshold
,
1567 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1568 offset
+= OAMPDU_EFE_THRESHOLD_SZ
;
1570 proto_tree_add_item(event_tree
, hf_oampdu_event_efeErrors
,
1571 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1572 offset
+= OAMPDU_EFE_ERRORS_SZ
;
1574 proto_tree_add_item(event_tree
, hf_oampdu_event_efeTotalErrors
,
1575 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
1576 offset
+= OAMPDU_EFE_ERR_TOTAL_SZ
;
1578 proto_tree_add_item(event_tree
, hf_oampdu_event_efeTotalEvents
,
1579 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1580 offset
+= OAMPDU_EFE_TOTAL_SZ
;
1583 case OAMPDU_EVENT_TYPE_EFPE
:
1584 event_tree
= proto_item_add_subtree(event_item
,
1585 ett_oampdu_event_efpe
);
1587 proto_tree_add_item(event_tree
, hf_oampdu_event_length
,
1588 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1589 offset
+= OAMPDU_EVENT_LENGTH_SZ
;
1591 proto_tree_add_item(event_tree
, hf_oampdu_event_timeStamp
,
1592 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1593 offset
+= OAMPDU_EVENT_TIMESTAMP_SZ
;
1595 proto_tree_add_item(event_tree
, hf_oampdu_event_efpeWindow
,
1596 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1597 offset
+= OAMPDU_EFPE_WINDOW_SZ
;
1599 proto_tree_add_item(event_tree
, hf_oampdu_event_efpeThreshold
,
1600 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1601 offset
+= OAMPDU_EFPE_THRESHOLD_SZ
;
1603 proto_tree_add_item(event_tree
, hf_oampdu_event_efpeErrors
,
1604 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1605 offset
+= OAMPDU_EFPE_ERRORS_SZ
;
1607 proto_tree_add_item(event_tree
, hf_oampdu_event_efpeTotalErrors
,
1608 tvb
, offset
, 8, ENC_BIG_ENDIAN
);
1609 offset
+= OAMPDU_EFPE_ERR_TOTAL_SZ
;
1611 proto_tree_add_item(event_tree
, hf_oampdu_event_efpeTotalEvents
,
1612 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1613 offset
+= OAMPDU_EFPE_TOTAL_SZ
;
1616 case OAMPDU_EVENT_TYPE_EFSSE
:
1617 event_tree
= proto_item_add_subtree(event_item
,
1618 ett_oampdu_event_efsse
);
1620 proto_tree_add_item(event_tree
, hf_oampdu_event_length
,
1621 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1622 offset
+= OAMPDU_EVENT_LENGTH_SZ
;
1624 proto_tree_add_item(event_tree
, hf_oampdu_event_timeStamp
,
1625 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1626 offset
+= OAMPDU_EVENT_TIMESTAMP_SZ
;
1628 proto_tree_add_item(event_tree
, hf_oampdu_event_efsseWindow
,
1629 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1630 offset
+= OAMPDU_EFSSE_WINDOW_SZ
;
1632 proto_tree_add_item(event_tree
, hf_oampdu_event_efsseThreshold
,
1633 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1634 offset
+= OAMPDU_EFSSE_THRESHOLD_SZ
;
1636 proto_tree_add_item(event_tree
, hf_oampdu_event_efsseErrors
,
1637 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1638 offset
+= OAMPDU_EFSSE_ERRORS_SZ
;
1640 proto_tree_add_item(event_tree
, hf_oampdu_event_efsseTotalErrors
,
1641 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1642 offset
+= OAMPDU_EFSSE_ERR_TOTAL_SZ
;
1644 proto_tree_add_item(event_tree
, hf_oampdu_event_efsseTotalEvents
,
1645 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1646 offset
+= OAMPDU_EFSSE_TOTAL_SZ
;
1649 case OAMPDU_EVENT_TYPE_OSE
:
1651 event_tree
= proto_item_add_subtree(event_item
,
1652 ett_oampdu_event_ose
);
1654 raw_octet
= tvb_get_uint8(tvb
, offset
);
1655 event_item
= proto_tree_add_uint(event_tree
, hf_oampdu_event_length
,
1656 tvb
, offset
, 1, raw_octet
);
1658 offset
+= OAMPDU_EVENT_LENGTH_SZ
;
1662 expert_add_info_format(pinfo
, event_item
, &ei_oampdu_event_length_bad
, "Event length should be at least 2");
1667 uint32_t cable_labs_oui
= (OUI_CL_0
<< 16) + (OUI_CL_1
<< 8) + OUI_CL_2
;
1669 event_oui
= tvb_get_uint24(tvb
, offset
, ENC_BIG_ENDIAN
);
1670 if (event_oui
== cable_labs_oui
)
1672 dissect_cablelabs_event_notification(tvb
, event_tree
, raw_octet
, offset
);
1676 offset
+= (raw_octet
-2);
1688 * Name: dissect_oampdu_variable_request
1691 * This function is used to dissect the Variable Request TLVs defined in
1692 * IEEE802.3 section 57.6.
1696 * tvb: buffer associated with the rcv packet (see tvbuff.h).
1697 * tree: the protocol tree associated with the oampdu (see proto.h).
1699 * Return Values: None
1702 * Dominique Bastien (dbastien@accedian.com)
1703 * + add support for 802.3ah-2004.
1706 dissect_oampdu_variable_request(tvbuff_t
*tvb
, proto_tree
*tree
)
1712 offset
= OAMPDU_HEADER_SIZE
;
1716 raw_octet
= tvb_get_uint8(tvb
, offset
);
1718 if (raw_octet
== 0) break;
1720 proto_tree_add_uint(tree
, hf_oampdu_variable_branch
,
1721 tvb
,offset
, 1, raw_octet
);
1727 case OAMPDU_VARS_OBJECT
:
1728 proto_tree_add_item(tree
, hf_oampdu_variable_object
,
1729 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1731 case OAMPDU_VARS_PACKAGE
:
1732 proto_tree_add_item(tree
, hf_oampdu_variable_package
,
1733 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1735 case OAMPDU_VARS_BINDING
:
1736 proto_tree_add_item(tree
, hf_oampdu_variable_binding
,
1737 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1739 case OAMPDU_VARS_ATTRIBUTE
:
1740 proto_tree_add_item(tree
, hf_oampdu_variable_attribute
,
1741 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1752 * Name: dissect_oampdu_variable_response
1755 * This function is used to dissect the Variable Response TLVs defined in
1756 * IEEE802.3 section 57.6.
1760 * tvb: buffer associated with the rcv packet (see tvbuff.h).
1761 * tree: the protocol tree associated with the oampdu (see proto.h).
1763 * Return Values: None
1766 * Dominique Bastien (dbastien@accedian.com)
1767 * + add support for 802.3ah-2004.
1770 dissect_oampdu_variable_response(tvbuff_t
*tvb
, proto_tree
*tree
)
1772 uint8_t branch
, raw_octet
;
1775 offset
= OAMPDU_HEADER_SIZE
;
1779 branch
= tvb_get_uint8(tvb
, offset
);
1781 if (branch
== 0) break;
1783 proto_tree_add_uint(tree
, hf_oampdu_variable_branch
,
1784 tvb
,offset
, 1, branch
);
1790 case OAMPDU_VARS_OBJECT
:
1791 proto_tree_add_item(tree
, hf_oampdu_variable_object
,
1792 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1794 case OAMPDU_VARS_PACKAGE
:
1795 proto_tree_add_item(tree
, hf_oampdu_variable_package
,
1796 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1798 case OAMPDU_VARS_BINDING
:
1799 proto_tree_add_item(tree
, hf_oampdu_variable_binding
,
1800 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1802 case OAMPDU_VARS_ATTRIBUTE
:
1803 proto_tree_add_item(tree
, hf_oampdu_variable_attribute
,
1804 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1812 raw_octet
= tvb_get_uint8(tvb
, offset
);
1814 if (raw_octet
>= 0x80) {
1815 /* Variable Indication */
1816 proto_tree_add_uint(tree
, hf_oampdu_variable_indication
,
1817 tvb
,offset
, 1, (raw_octet
&0x7F));
1822 /* Length field and data */
1824 /* Length field 0 means the length is 128 bytes */
1825 if (raw_octet
== 0) raw_octet
= 128;
1827 proto_tree_add_uint(tree
, hf_oampdu_variable_width
,
1828 tvb
,offset
, 1, raw_octet
);
1831 proto_tree_add_item(tree
, hf_oampdu_variable_value
,
1832 tvb
, offset
, raw_octet
, ENC_NA
);
1835 /* object and package containers consist of multiple entries
1836 (variable indication + variable value), the last entry
1837 has only the variable indication and no value
1838 binding and attribute objects have only one such entry */
1839 } while (branch
==OAMPDU_VARS_OBJECT
|| branch
==OAMPDU_VARS_PACKAGE
);
1844 * Name: dissect_oampdu_loopback_control
1847 * This function is used to dissect the Variable Request TLVs defined in
1848 * IEEE802.3 section 57.6.
1852 * tvb: buffer associated with the rcv packet (see tvbuff.h).
1853 * tree: the protocol tree associated with the oampdu (see proto.h).
1855 * Return Values: None
1858 * Dominique Bastien (dbastien@accedian.com)
1859 * + add support for 802.3ah-2004.
1862 dissect_oampdu_loopback_control(tvbuff_t
*tvb
, proto_tree
*tree
)
1867 static int * const ctrl
[] = {
1868 &hf_oampdu_lpbk_enable
,
1869 &hf_oampdu_lpbk_disable
,
1873 offset
= OAMPDU_HEADER_SIZE
;
1875 bytes
= tvb_captured_length_remaining(tvb
, offset
);
1879 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_oampdu_lpbk
, ett_oampdu_lpbk_ctrl
, ctrl
, ENC_NA
);
1883 static int * const s1_autoneg_mode_bits
[] = {
1884 &hf_oam_dpoe_s1_autoneg_hd
,
1885 &hf_oam_dpoe_s1_autoneg_fd
,
1886 &hf_oam_dpoe_s1_autoneg_10
,
1887 &hf_oam_dpoe_s1_autoneg_100
,
1888 &hf_oam_dpoe_s1_autoneg_1000
,
1889 &hf_oam_dpoe_s1_autoneg_10000
,
1890 &hf_oam_dpoe_s1_autoneg_fc
,
1891 &hf_oam_dpoe_s1_autoneg_mdi
,
1895 static void dissect_oampdu_add_queue_object(proto_tree
*tree
, tvbuff_t
*tvb
, int offset
)
1897 proto_tree_add_item(tree
,
1898 hf_oam_dpoe_user_port_object_result_rr_queue_obj_type
,
1899 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1900 proto_tree_add_item(tree
,
1901 hf_oam_dpoe_user_port_object_result_rr_queue_obj_inst
,
1902 tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
1903 proto_tree_add_item(tree
,
1904 hf_oam_dpoe_user_port_object_result_rr_queue_queue_index
,
1905 tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
1910 * Name: dissect_oampdu_vendor_specific
1913 * This function is used to dissect the Vendor Specific TLV defined in
1914 * IEEE802.3 section 57.4.3.6.
1918 * tvb: buffer associated with the rcv packet (see tvbuff.h).
1919 * tree: the protocol tree associated with the oampdu (see proto.h).
1921 * Return Values: None
1924 * Dominique Bastien (dbastien@accedian.com)
1925 * + add support for 802.3ah-2004.
1926 * Philip Rosenberg-Watt (p.rosenberg-watt[at]cablelabs.com)
1927 * + add support for CableLabs DPoE OAM Extensions Specification
1930 dissect_oampdu_vendor_specific(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
1934 uint32_t leaf_branch
;
1935 uint8_t dpoe_opcode
;
1936 uint8_t variable_length
;
1938 uint8_t pir_subtype
;
1941 static const uint8_t oui_cl
[] = {OUI_CL_0
, OUI_CL_1
, OUI_CL_2
};
1943 proto_item
*oui_item
;
1944 proto_item
*event_item
;
1945 proto_tree
*oampdu_vendor_specific_tree
;
1946 proto_tree
*dpoe_opcode_tree
;
1947 proto_item
*dpoe_opcode_item
;
1948 proto_item
*dpoe_opcode_request_tree
;
1949 proto_item
*dpoe_opcode_request_item
;
1950 proto_item
*dpoe_opcode_response
;
1951 proto_tree
*dpoe_opcode_response_tree
;
1952 offset
= OAMPDU_HEADER_SIZE
;
1954 bytes
= tvb_captured_length_remaining(tvb
, offset
);
1957 oui_item
= proto_tree_add_item(tree
, hf_oampdu_info_oui
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
1959 if (tvb_memeql(tvb
, offset
, oui_cl
, OUI_SIZE
) == 0) {
1963 oampdu_vendor_specific_tree
= proto_item_add_subtree(oui_item
, ett_oampdu_vendor_specific
);
1964 dpoe_opcode_item
= proto_tree_add_item(oampdu_vendor_specific_tree
, hf_oampdu_vendor_specific_dpoe_opcode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1965 dpoe_opcode_tree
= proto_item_add_subtree(dpoe_opcode_item
, ett_dpoe_opcode
);
1966 dpoe_opcode
= tvb_get_uint8(tvb
, offset
);
1968 next_byte
= tvb_get_uint8(tvb
, offset
);
1969 switch (dpoe_opcode
) {
1972 case DPOE_OPCODE_GET_REQUEST
:
1973 while (next_byte
!= 0x00) {
1974 leaf_branch
= tvb_get_ntoh24(tvb
, offset
);
1975 if (leaf_branch
== DPOE_LB_ONU_OBJ
|| leaf_branch
== DPOE_LB_LINK_OBJ
|| \
1976 leaf_branch
== DPOE_LB_USER_PORT_OBJ
|| leaf_branch
== DPOE_LB_NETWORK_PORT_OBJ
||
1977 leaf_branch
== DPOE_LB_MC_LL_OBJ
|| leaf_branch
== DPOE_LB_QUEUE_OBJ
) {
1978 dpoe_opcode_request_item
= proto_tree_add_item(dpoe_opcode_tree
, hf_dpoe_variable_descriptor
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
1980 variable_length
= tvb_get_uint8(tvb
, offset
);
1982 if (variable_length
== 1) {
1983 /* Add User Port or Link instance */
1984 dpoe_opcode_request_tree
= proto_item_add_subtree(dpoe_opcode_request_item
, ett_dpoe_opcode
);
1985 if (leaf_branch
== DPOE_LB_USER_PORT_OBJ
) {
1986 proto_tree_add_item(dpoe_opcode_request_tree
, hf_oam_dpoe_user_port_object
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1988 proto_tree_add_item(dpoe_opcode_request_tree
, hf_oampdu_variable_value
, tvb
, offset
, 1, ENC_NA
);
1990 } else if (variable_length
== 4 && leaf_branch
== DPOE_LB_QUEUE_OBJ
) {
1991 /* Add Queue object instance */
1992 dpoe_opcode_request_tree
= proto_item_add_subtree(dpoe_opcode_request_item
, ett_dpoe_opcode
);
1993 dissect_oampdu_add_queue_object(dpoe_opcode_request_tree
, tvb
, offset
);
1995 offset
+= variable_length
;
1996 next_byte
= tvb_get_uint8(tvb
, offset
);
1998 proto_tree_add_item(dpoe_opcode_tree
, hf_dpoe_variable_descriptor
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
2000 next_byte
= tvb_get_uint8(tvb
, offset
);
2004 case DPOE_OPCODE_GET_RESPONSE
: /* Get-Response */
2005 case DPOE_OPCODE_SET_REQUEST
: /* Set-Request */
2006 case DPOE_OPCODE_SET_RESPONSE
: /* Set-Response */
2007 while (next_byte
!= 0x00) {
2008 dpoe_opcode_response
= proto_tree_add_item(dpoe_opcode_tree
, hf_dpoe_variable_descriptor
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
2009 leaf_branch
= tvb_get_ntoh24(tvb
, offset
);
2011 variable_length
= tvb_get_uint8(tvb
, offset
);
2012 dpoe_opcode_response_tree
= proto_item_add_subtree(dpoe_opcode_response
, ett_dpoe_opcode_response
);
2013 if (variable_length
>= 0x80) {
2014 proto_tree_add_item(dpoe_opcode_response_tree
, hf_dpoe_variable_response_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2015 variable_length
= 0;
2017 } else if (variable_length
== 0) {
2019 variable_length
= 128;
2020 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oampdu_variable_value
, tvb
, offset
, variable_length
, ENC_NA
);
2023 if (leaf_branch
== (DPOE_LB_ONU_ID
)) {
2024 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_response_eth
, tvb
, offset
, variable_length
, ENC_NA
);
2025 } else if (leaf_branch
== DPOE_LB_FW_INFO
) {
2026 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_fw_info_boot_version
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2027 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_fw_info_boot_crc
, tvb
, offset
+2, 4, ENC_BIG_ENDIAN
);
2028 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_fw_info_fw_version
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
2029 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_fw_info_fw_crc
, tvb
, offset
+8, 4, ENC_BIG_ENDIAN
);
2030 } else if (leaf_branch
== DPOE_LB_MFG_INFO
) {
2032 serial_num
= tvb_get_string_enc(pinfo
->pool
, tvb
, offset
, variable_length
, ENC_ASCII
);
2033 proto_tree_add_string(dpoe_opcode_response_tree
, hf_oam_dpoe_mfg_info_serial_number
, tvb
, offset
, variable_length
, serial_num
);
2034 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_mfg_info_vendor_specific
, tvb
, offset
+32, variable_length
-32, ENC_NA
);
2035 } else if (leaf_branch
== DPOE_LB_DATE_OF_MANUFACTURE
) {
2036 const char *bcd_date
;
2044 /* ONU vendors do not all encode the year properly. Make a best guess as to how the year is encoded*/
2045 year
= tvb_get_uint16(tvb
, offset
, ENC_BIG_ENDIAN
);
2046 yearh
= (year
>> 8) & 0xff;
2047 yearl
= year
& 0xff;
2048 month
= tvb_get_uint8(tvb
, offset
+2);
2049 day
= tvb_get_uint8(tvb
, offset
+3);
2050 memset(date
, 0, sizeof(date
));
2052 /* Check for a BCD encoded year in the range 2000 - 2599 */
2053 if (year
>= 0x2000 && year
<= 0x2599) {
2054 bcd_date
= tvb_get_bcd_string(pinfo
->pool
, tvb
, offset
, 4, &Dgt0_9_bcd
, false, false, true);
2055 date
[0] = bcd_date
[0];
2056 date
[1] = bcd_date
[1];
2057 date
[2] = bcd_date
[2];
2058 date
[3] = bcd_date
[3];
2060 date
[5] = bcd_date
[4];
2061 date
[6] = bcd_date
[5];
2063 date
[8] = bcd_date
[6];
2064 date
[9] = bcd_date
[7];
2066 /* Check if year is encoded as two separate bytes */
2067 else if (yearh
>= 20 && yearh
<= 25 && yearl
<= 99) {
2068 snprintf(date
, sizeof(date
)-1, "%02hhd%02hhd/%02hhd/%02hhd", yearh
, yearl
, month
, day
);
2070 /* Check if year is encoded as a two-byte value */
2071 else if (year
>= 2000 && year
<= 2599) {
2072 snprintf(date
, sizeof(date
)-1, "%02hd/%02hhd/%02hhd", year
, month
, day
);
2074 snprintf(date
, sizeof(date
)-1, "%s", "Unknown");
2076 proto_tree_add_string(dpoe_opcode_response_tree
, hf_oam_dpoe_date_of_manufacture
, tvb
, offset
, 4, date
);
2077 } else if (leaf_branch
== DPOE_LB_CHIPSET_INFO
) {
2078 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_chipset_jedec_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2079 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_chipset_chip_model
, tvb
, offset
+2, 4, ENC_BIG_ENDIAN
);
2080 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_chipset_chip_version
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2081 } else if (leaf_branch
== DPOE_LB_MAX_LL
) {
2082 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_mll_b
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2083 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_mll_do
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
2084 } else if (leaf_branch
== DPOE_LB_MAX_NET_PORTS
) {
2085 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_response_int
, tvb
, offset
, variable_length
, ENC_BIG_ENDIAN
);
2086 } else if (leaf_branch
== DPOE_LB_NUM_S1_INT
) {
2087 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_response_int
, tvb
, offset
, variable_length
, ENC_BIG_ENDIAN
);
2088 } else if (leaf_branch
== DPOE_LB_PKT_BUFFER
) {
2089 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_pkt_buffer_us_queues
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2090 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_pkt_buffer_us_queues_max_per_link
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
2091 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_pkt_buffer_us_queue_inc
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
2092 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_pkt_buffer_ds_queues
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
2093 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_pkt_buffer_ds_queues_max_per_link
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
2094 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_pkt_buffer_ds_queue_inc
, tvb
, offset
+5, 1, ENC_BIG_ENDIAN
);
2095 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_pkt_buffer_total_memory
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
2096 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_pkt_buffer_us_memory_max
, tvb
, offset
+8, 2, ENC_BIG_ENDIAN
);
2097 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_pkt_buffer_ds_memory_max
, tvb
, offset
+10, 2, ENC_BIG_ENDIAN
);
2098 } else if (leaf_branch
== DPOE_LB_OAM_FR
) {
2099 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_frame_rate_minimum
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2100 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_frame_rate_maximum
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
2101 } else if (leaf_branch
== DPOE_LB_MFG_ORG_NAME
) {
2103 mfg_org_name
= tvb_get_string_enc(pinfo
->pool
, tvb
, offset
, variable_length
, ENC_ASCII
);
2104 proto_tree_add_string(dpoe_opcode_response_tree
, hf_oam_dpoe_mfg_org_name
, tvb
, offset
, variable_length
, mfg_org_name
);
2105 } else if (leaf_branch
== DPOE_LB_TIME_VARYING_CONTROLS
) {
2107 access_start
= tvb_get_string_enc(pinfo
->pool
, tvb
, offset
, 13, ENC_ASCII
);
2108 proto_tree_add_string(dpoe_opcode_response_tree
, hf_oam_dpoe_tvc_code_access_start
, tvb
, offset
, 13, access_start
);
2109 access_start
= tvb_get_string_enc(pinfo
->pool
, tvb
, offset
+13, 13, ENC_ASCII
);
2110 proto_tree_add_string(dpoe_opcode_response_tree
, hf_oam_dpoe_tvc_cvc_access_start
, tvb
, offset
+13, 13, access_start
);
2111 } else if (leaf_branch
== DPOE_LB_VENDOR_NAME
) {
2113 vendor_name
= tvb_get_string_enc(pinfo
->pool
, tvb
, offset
, variable_length
, ENC_ASCII
);
2114 proto_tree_add_string(dpoe_opcode_response_tree
, hf_oam_dpoe_vendor_name
, tvb
, offset
, variable_length
, vendor_name
);
2115 } else if (leaf_branch
== DPOE_LB_MODEL_NUMBER
) {
2117 model_number
= tvb_get_string_enc(pinfo
->pool
, tvb
, offset
, variable_length
, ENC_ASCII
);
2118 proto_tree_add_string(dpoe_opcode_response_tree
, hf_oam_dpoe_model_number
, tvb
, offset
, variable_length
, model_number
);
2119 } else if (leaf_branch
== DPOE_LB_HW_VERSION
) {
2121 hw_version
= tvb_get_string_enc(pinfo
->pool
, tvb
, offset
, variable_length
, ENC_ASCII
);
2122 proto_tree_add_string(dpoe_opcode_response_tree
, hf_oam_dpoe_hw_version
, tvb
, offset
, variable_length
, hw_version
);
2123 } else if (leaf_branch
== DPOE_LB_SW_BUNDLE
) {
2125 sw_bundle
= tvb_get_stringzpad(pinfo
->pool
, tvb
, offset
, variable_length
, ENC_ASCII
);
2126 proto_tree_add_string(dpoe_opcode_response_tree
, hf_oam_dpoe_sw_bundle
, tvb
, offset
, variable_length
, sw_bundle
);
2127 } else if (leaf_branch
== DPOE_LB_REP_THRESH
) {
2133 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_repthr_nqs
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2134 nqs
= tvb_get_uint8(tvb
, offset
);
2135 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_repthr_rvpqs
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
2136 rvpqs
= tvb_get_uint8(tvb
, offset
+1);
2138 for (nqs_i
= 0; nqs_i
< nqs
; nqs_i
++) {
2139 for (rvpqs_i
= 0; rvpqs_i
< rvpqs
; rvpqs_i
++) {
2140 dpoe_opcode_response
= proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_report_threshold
, tvb
, offset
+2+(2*(nqs_i
+rvpqs_i
)), 2, ENC_BIG_ENDIAN
);
2141 proto_item_append_text(dpoe_opcode_response
, " (Report Threshold %i for Queue Set %i)", nqs_i
, rvpqs_i
);
2144 /* This will need to be fixed for get-response, now only works for set-requests: */
2145 } else if (leaf_branch
== DPOE_LB_LL_FWD_STATE
) {
2146 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_ll_fwd_state
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2147 } else if (leaf_branch
== DPOE_LB_S1_INT_PORT_AUTONEG
) {
2148 proto_tree_add_bitmask(dpoe_opcode_response_tree
, tvb
, offset
, hf_oam_dpoe_s1_autoneg
, ett_oam_dpoe_s1_autoneg
, s1_autoneg_mode_bits
, ENC_BIG_ENDIAN
);
2149 } else if (leaf_branch
== DPOE_LB_USER_PORT_OBJ
) {
2150 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_user_port_object
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2151 } else if (leaf_branch
== DPOE_LB_QUEUE_OBJ
) {
2152 dissect_oampdu_add_queue_object(dpoe_opcode_response_tree
, tvb
, offset
);
2153 } else if (leaf_branch
== DPOE_LB_PORT_INGRESS_RULE
) {
2155 pir_subtype
= tvb_get_uint8(tvb
, offset
);
2156 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_user_port_object_subtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2157 switch (pir_subtype
) {
2160 /* no further contents */
2164 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_user_port_object_header_precedence
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
2168 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_user_port_object_clause_fc
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
2169 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_user_port_object_clause_fi
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
2170 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_user_port_object_clause_msbm
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
2171 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_user_port_object_clause_lsbm
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
2172 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_user_port_object_clause_operator
, tvb
, offset
+5, 1, ENC_BIG_ENDIAN
);
2173 event_item
= proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_user_port_object_clause_mvl
, tvb
, offset
+6, 1, ENC_BIG_ENDIAN
);
2174 pir_mvl
= tvb_get_uint8(tvb
, offset
+6);
2177 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_user_port_object_clause_mv
, tvb
, offset
+7, pir_mvl
, ENC_NA
);
2178 } else expert_add_info_format(pinfo
, event_item
, &ei_oampdu_mvl_length_zero
, "Match Value Field Length is Zero, Match Value Field not Decoded");
2183 dpoe_opcode_response
= proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_user_port_object_result_rr
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
2184 rr_byte
= tvb_get_uint8(tvb
, offset
+1);
2187 proto_item_append_text(dpoe_opcode_response
, " No operation");
2190 proto_item_append_text(dpoe_opcode_response
, " Set Discard Flag for Frame");
2193 proto_item_append_text(dpoe_opcode_response
, " Clear Discard Flag for Frame (Forward Frame)");
2196 proto_item_append_text(dpoe_opcode_response
, " Set destination queue for frame");
2197 dissect_oampdu_add_queue_object(dpoe_opcode_response_tree
, tvb
, offset
+2);
2200 proto_item_append_text(dpoe_opcode_response
, " Set output field");
2201 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_user_port_object_result_rr_set_fc
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
2202 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_user_port_object_result_rr_set_fi
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
2205 proto_item_append_text(dpoe_opcode_response
, " Copy output field");
2206 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_user_port_object_result_rr_copy
, tvb
, offset
+4, 4, ENC_BIG_ENDIAN
);
2209 proto_item_append_text(dpoe_opcode_response
, " Delete field");
2210 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_user_port_object_result_rr_delete
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
2213 proto_item_append_text(dpoe_opcode_response
, " Insert field");
2214 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_user_port_object_result_rr_insert
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
2217 proto_item_append_text(dpoe_opcode_response
, " Delete field and Insert current output field");
2218 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_user_port_object_result_rr_replace
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
2221 proto_item_append_text(dpoe_opcode_response
, " Do not delete field (override other Delete result)");
2222 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_user_port_object_result_rr_cd
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
2225 proto_item_append_text(dpoe_opcode_response
, " Do not insert field (override other Insert result)");
2226 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_user_port_object_result_rr_ci
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
2235 } else if (leaf_branch
== DPOE_LB_QUEUE_CONFIG
) {
2236 /* "qc" is for Queue Configuration. Variable names come from CableLabs spec. */
2237 uint8_t qc_n
; /* number of upstream logical links */
2238 uint8_t qc_m
; /* number of upstream queues for link N */
2239 uint8_t qc_p
; /* number of downstream ports to configure */
2240 uint8_t qc_j
; /* number of downstream queues for port P */
2241 uint8_t qc_n_i
; /* iterator */
2242 uint8_t qc_m_i
; /* iterator */
2243 uint8_t qc_p_i
; /* iterator */
2244 uint8_t qc_j_i
; /* iterator */
2246 proto_tree
*dpoe_oam_qc_upstream
;
2247 proto_tree
*dpoe_oam_qc_upstream_subtree
;
2248 proto_tree
*dpoe_oam_qc_downstream
;
2249 proto_tree
*dpoe_oam_qc_downstream_subtree
;
2250 proto_tree
*dpoe_oam_qc_nq
;
2251 proto_tree
*dpoe_oam_qc_nq_subtree
;
2253 qc_n
= tvb_get_uint8(tvb
, offset
);
2254 dpoe_oam_qc_upstream
= proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_qc_ll_u
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2255 dpoe_oam_qc_upstream_subtree
= proto_item_add_subtree(dpoe_oam_qc_upstream
, ett_oam_dpoe_qc_u
);
2256 for (qc_n_i
= 0; qc_n_i
< qc_n
; qc_n_i
++) {
2259 qc_m
= tvb_get_uint8(tvb
, offset
);
2260 dpoe_oam_qc_nq
= proto_tree_add_item(dpoe_oam_qc_upstream_subtree
, hf_oam_dpoe_qc_nq
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2261 proto_item_append_text(dpoe_oam_qc_nq
, " (Upstream link %i)", qc_n_i
);
2262 dpoe_oam_qc_nq_subtree
= proto_item_add_subtree(dpoe_oam_qc_nq
, ett_oam_dpoe_qc_nq
);
2263 for (qc_m_i
= 0; qc_m_i
< qc_m
; qc_m_i
++) {
2265 dpoe_opcode_response
= proto_tree_add_item(dpoe_oam_qc_nq_subtree
, hf_oam_dpoe_qc_queue_size
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2266 proto_item_append_text(dpoe_opcode_response
, " (Upstream link %i queue %i size)", qc_n_i
, qc_m_i
);
2270 qc_p
= tvb_get_uint8(tvb
, offset
);
2271 dpoe_oam_qc_downstream
= proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_qc_ports_d
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2272 dpoe_oam_qc_downstream_subtree
= proto_item_add_subtree(dpoe_oam_qc_downstream
, ett_oam_dpoe_qc_d
);
2273 for (qc_p_i
= 0; qc_p_i
< qc_p
; qc_p_i
++) {
2275 qc_j
= tvb_get_uint8(tvb
, offset
);
2276 dpoe_oam_qc_nq
= proto_tree_add_item(dpoe_oam_qc_downstream_subtree
, hf_oam_dpoe_qc_nq
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2277 proto_item_append_text(dpoe_oam_qc_nq
, " (Downstream port %i)", qc_p_i
);
2278 dpoe_oam_qc_nq_subtree
= proto_item_add_subtree(dpoe_oam_qc_nq
, ett_oam_dpoe_qc_nq
);
2279 for (qc_j_i
= 0; qc_j_i
< qc_j
; qc_j_i
++) {
2281 dpoe_opcode_response
= proto_tree_add_item(dpoe_oam_qc_nq_subtree
, hf_oam_dpoe_qc_queue_size
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2282 proto_item_append_text(dpoe_opcode_response
, " (Downstream port %i queue %i size)", qc_p_i
, qc_j_i
);
2285 /* offset variable already incremented, so variable_length should include only 1 to read next_byte */
2286 variable_length
= 1;
2287 /* fall-through for unmatched: */
2288 } else if (leaf_branch
== DPOE_LB_FW_FILENAME
) {
2290 fw_filename
= tvb_get_stringzpad(pinfo
->pool
, tvb
, offset
, variable_length
, ENC_ASCII
);
2291 proto_tree_add_string(dpoe_opcode_response_tree
, hf_oam_dpoe_fw_filename
, tvb
, offset
, variable_length
, fw_filename
);
2292 } else if (leaf_branch
== DPOE_LB_1904_1_ONU_PORT_CONFIG
) {
2293 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_onu_port_config_llid_count
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2294 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_onu_port_config_uni_count
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2295 } else if (leaf_branch
== DPOE_LB_1904_1_QUEUE_CONFIG
) {
2296 /* "qc" is for Queue Configuration. Variable names come from CableLabs spec. */
2297 uint8_t qc_num
; /* number of queues */
2298 uint8_t qc_i
; /* iterator */
2299 proto_tree
*dpoe_oam_qc_nq
;
2300 proto_tree
*dpoe_oam_qc_nq_subtree
;
2302 qc_num
= tvb_get_uint8(tvb
, offset
);
2303 dpoe_oam_qc_nq
= proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_qc_nq
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2305 dpoe_oam_qc_nq_subtree
= proto_item_add_subtree(dpoe_oam_qc_nq
, ett_oam_dpoe_qc_nq
);
2306 for (qc_i
= 0; qc_i
< qc_num
; qc_i
++) {
2307 proto_tree_add_item(dpoe_oam_qc_nq_subtree
, hf_oam_dpoe_1904_1_qc_queue_size
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2310 } else if (leaf_branch
== DPOE_LB_1904_1_MAC_ENABLE_STATUS
) {
2311 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_1904_1_mac_enable_status
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2312 } else if (leaf_branch
== DPOE_LB_1904_1_A_PHY_TYPE
) {
2313 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_1904_1_a_phy_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2314 } else if (leaf_branch
== DPOE_LB_1904_1_MEDIA_AVAILABLE
) {
2315 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_1904_1_media_available
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2316 } else if (leaf_branch
== DPOE_LB_1904_1_AUTONEG_ADM_STATE
) {
2317 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_1904_1_autoneg_admstate
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2318 } else if (leaf_branch
== DPOE_LB_1904_1_DUPLEX_STATUS
) {
2319 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_1904_1_duplex_status
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2320 } else if (leaf_branch
== DPOE_LB_1904_1_MAC_CTl_FUNCTIONS
) {
2321 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_1904_1_mac_control_functions_supported
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2322 } else if (leaf_branch
== DPOE_LB_1904_1_CFG_MCAST_LLID
) {
2324 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_1904_1_cfg_mcast_llid_action
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2325 action
= tvb_get_uint8(tvb
, offset
);
2329 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_1904_1_cfg_mcast_llid_value
, tvb
, offset
+1, 2, ENC_BIG_ENDIAN
);
2334 } else if (leaf_branch
== DPOE_LB_1904_1_RW_MAC_ADDRESS
) {
2335 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oam_dpoe_1904_1_read_write_mac_address
, tvb
, offset
, 6, ENC_NA
);
2337 proto_tree_add_item(dpoe_opcode_response_tree
, hf_oampdu_variable_value
, tvb
, offset
, variable_length
, ENC_NA
);
2340 offset
+= variable_length
;
2341 next_byte
= tvb_get_uint8(tvb
, offset
);
2362 * Name: dissect_cablelabs_event_notification
2365 * This function is used to dissect the Event Notification TLVs defined in
2366 * DPoE OAM v2.0 section 7.2.
2370 * tvb: buffer associated with the rcv packet (see tvbuff.h).
2371 * tree: the protocol tree associated with the oampdu (see proto.h).
2372 * bytes: the number of bytes of the event
2373 * offset: the current offset in the buffer
2375 * Return Values: None
2379 dissect_cablelabs_event_notification(tvbuff_t
*tvb
, proto_tree
*tree
, uint8_t bytes
, uint32_t offset
)
2381 uint32_t oui_cl
= (OUI_CL_0
<< 16) + (OUI_CL_1
<< 8) + OUI_CL_2
;
2384 proto_item
*oui_item
;
2385 proto_tree
*oampdu_vendor_specific_tree
;
2388 oui_item
= proto_tree_add_item(tree
, hf_oampdu_info_oui
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
2389 oui
= tvb_get_uint24(tvb
, offset
, ENC_BIG_ENDIAN
);
2392 if (oui
== oui_cl
) {
2394 oampdu_vendor_specific_tree
= proto_item_add_subtree(oui_item
, ett_oampdu_vendor_specific
);
2395 proto_tree_add_item(oampdu_vendor_specific_tree
, hf_oampdu_vendor_specific_dpoe_evt_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2397 proto_tree_add_item(oampdu_vendor_specific_tree
, hf_oampdu_vendor_specific_dpoe_evt_raised
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2399 obj_type
= tvb_get_uint8(tvb
, offset
);
2400 proto_tree_add_item(oampdu_vendor_specific_tree
, hf_oampdu_vendor_specific_dpoe_evt_object_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2402 if (obj_type
== DPOE_OBJ_CTX_QUEUE
) {
2403 proto_tree_add_item(oampdu_vendor_specific_tree
, hf_oampdu_variable_value
, tvb
, offset
, 4, ENC_NA
);
2405 proto_tree_add_item(oampdu_vendor_specific_tree
, hf_oampdu_variable_value
, tvb
, offset
, 2, ENC_NA
);
2411 /* Register the protocol with Wireshark */
2413 proto_register_oampdu(void)
2415 /* Setup list of header fields */
2417 static hf_register_info hf
[] = {
2419 { "Flags", "oampdu.flags",
2420 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
2421 "The Flags Field", HFILL
}},
2423 { &hf_oampdu_flags_link_fault
,
2424 { "Link Fault", "oampdu.flags.linkFault",
2425 FT_BOOLEAN
, 8, NULL
, OAMPDU_FLAGS_LINK_FAULT
,
2426 "The PHY detected a fault in the receive direction. True = 1, False = 0", HFILL
}},
2428 { &hf_oampdu_flags_dying_gasp
,
2429 { "Dying Gasp", "oampdu.flags.dyingGasp",
2430 FT_BOOLEAN
, 8, NULL
, OAMPDU_FLAGS_DYING_GASP
,
2431 "An unrecoverable local failure occurred. True = 1, False = 0", HFILL
}},
2433 { &hf_oampdu_flags_critical_event
,
2434 { "Critical Event", "oampdu.flags.criticalEvent",
2435 FT_BOOLEAN
, 8, NULL
, OAMPDU_FLAGS_CRITICAL_EVENT
,
2436 "A critical event has occurred. True = 1, False = 0", HFILL
}},
2438 { &hf_oampdu_flags_local_evaluating
,
2439 { "Local Evaluating", "oampdu.flags.localEvaluating",
2440 FT_BOOLEAN
, 8, NULL
, OAMPDU_FLAGS_LOCAL_EVAL
,
2441 "Local DTE Discovery process in progress. True = 1, False = 0", HFILL
}},
2443 { &hf_oampdu_flags_local_stable
,
2444 { "Local Stable", "oampdu.flags.localStable",
2445 FT_BOOLEAN
, 8, NULL
, OAMPDU_FLAGS_LOCAL_STABLE
,
2446 "Local DTE is Stable. True = 1, False = 0", HFILL
}},
2448 { &hf_oampdu_flags_remote_evaluating
,
2449 { "Remote Evaluating", "oampdu.flags.remoteEvaluating",
2450 FT_BOOLEAN
, 8, NULL
, OAMPDU_FLAGS_REMOTE_EVAL
,
2451 "Remote DTE Discovery process in progress. True = 1, False = 0", HFILL
}},
2453 { &hf_oampdu_flags_remote_stable
,
2454 { "Remote Stable", "oampdu.flags.remoteStable",
2455 FT_BOOLEAN
, 8, NULL
, OAMPDU_FLAGS_REMOTE_STABLE
,
2456 "Remote DTE is Stable. True = 1, False = 0", HFILL
}},
2459 { "OAMPDU code", "oampdu.code",
2460 FT_UINT8
, BASE_HEX
, VALS(code_vals
), 0x0,
2461 "Identifies the TLVs code", HFILL
}},
2463 { &hf_oampdu_info_type
,
2464 { "Type", "oampdu.info.type",
2465 FT_UINT8
, BASE_HEX
, VALS(info_type_vals
), 0x0,
2466 "Identifies the TLV type", HFILL
}},
2468 { &hf_oampdu_info_len
,
2469 { "TLV Length", "oampdu.info.length",
2470 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
2471 "Identifies the TLVs type", HFILL
}},
2473 { &hf_oampdu_info_version
,
2474 { "TLV Version", "oampdu.info.version",
2475 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2476 "Identifies the TLVs version", HFILL
}},
2478 { &hf_oampdu_info_revision
,
2479 { "TLV Revision", "oampdu.info.revision",
2480 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2481 "Identifies the TLVs revision", HFILL
}},
2483 { &hf_oampdu_info_state
,
2484 { "OAM DTE States", "oampdu.info.state",
2485 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2486 "OAM DTE State of the Mux and the Parser", HFILL
}},
2488 { &hf_oampdu_info_state_parser
,
2489 { "Parser Action", "oampdu.info.state.parser",
2490 FT_UINT8
, BASE_HEX
, VALS(parser_vals
), 0x03,
2493 { &hf_oampdu_info_state_mux
,
2494 { "Multiplexer Action", "oampdu.info.state.multiplexer",
2495 FT_BOOLEAN
, 8, TFS(&mux
), 0x04,
2498 { &hf_oampdu_info_oamConfig
,
2499 { "OAM Configuration", "oampdu.info.oamConfig",
2500 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2503 { &hf_oampdu_info_oamConfig_mode
,
2504 { "OAM Mode", "oampdu.info.oamConfig.mode",
2505 FT_BOOLEAN
, 8, TFS(&oam_mode
), OAMPDU_INFO_CONFIG_MODE
,
2508 { &hf_oampdu_info_oamConfig_uni
,
2509 { "Unidirectional support", "oampdu.flags.dyingGasp",
2510 FT_BOOLEAN
, 8, TFS(&oam_uni
), OAMPDU_INFO_CONFIG_UNI
,
2513 { &hf_oampdu_info_oamConfig_lpbk
,
2514 { "Loopback support", "oampdu.flags.criticalEvent",
2515 FT_BOOLEAN
, 8, TFS(&oam_lpbk
), OAMPDU_INFO_CONFIG_LPBK
,
2518 { &hf_oampdu_info_oamConfig_event
,
2519 { "Link Events support", "oampdu.flags.localEvaluating",
2520 FT_BOOLEAN
, 8, TFS(&oam_event
), OAMPDU_INFO_CONFIG_EVENT
,
2523 { &hf_oampdu_info_oamConfig_var
,
2524 { "Variable Retrieval", "oampdu.flags.localStable",
2525 FT_BOOLEAN
, 8, TFS(&oam_var
), OAMPDU_INFO_CONFIG_VAR
,
2526 "Variable Retrieval support", HFILL
}},
2528 { &hf_oampdu_info_oampduConfig
,
2529 { "Max OAMPDU Size", "oampdu.info.oampduConfig",
2530 FT_UINT16
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_byte_bytes
), 0x0,
2531 "OAMPDU Configuration", HFILL
}},
2533 { &hf_oampdu_info_oui
,
2534 { "Organizationally Unique Identifier", "oampdu.info.oui",
2535 FT_UINT24
, BASE_OUI
, NULL
, 0x0,
2538 { &hf_oampdu_info_vendor
,
2539 { "Vendor Specific Information", "oampdu.info.vendor",
2540 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2544 * Reserved for future use:
2545 { &hf_oampdu_info_dpoe_oam_version,
2546 { "DPoE OAM Version", "oampdu.info.dpoe_oam_version",
2547 FT_UINT8, BASE_DEC, NULL, 0x0,
2551 * Event notification definitions
2553 { &hf_oampdu_event_sequence
,
2554 { "Sequence Number", "oampdu.event.sequence",
2555 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2556 "Identifies the Event Notification TLVs", HFILL
}},
2558 { &hf_oampdu_event_type
,
2559 { "Event Type", "oampdu.event.type",
2560 FT_UINT8
, BASE_HEX
, VALS(event_type_vals
), 0x0,
2561 "Identifies the TLV type", HFILL
}},
2563 { &hf_oampdu_event_length
,
2564 { "Event Length", "oampdu.event.length",
2565 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2566 "This field indicates the length in octets of the TLV-tuple", HFILL
}},
2568 { &hf_oampdu_event_timeStamp
,
2569 { "Event Timestamp (100ms)", "oampdu.event.timestamp",
2570 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2571 "Event Time Stamp in term of 100 ms intervals", HFILL
}},
2573 /* Errored Symbol Period Event TLV */
2574 { &hf_oampdu_event_espeWindow
,
2575 { "Errored Symbol Window", "oampdu.event.espeWindow",
2576 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
2577 "Number of symbols in the period", HFILL
}},
2579 { &hf_oampdu_event_espeThreshold
,
2580 { "Errored Symbol Threshold", "oampdu.event.espeThreshold",
2581 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
2582 "Number of symbols required to generate the Event", HFILL
}},
2584 { &hf_oampdu_event_espeErrors
,
2585 { "Errored Symbols", "oampdu.event.espeErrors",
2586 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
2587 "Number of symbols in error", HFILL
}},
2589 { &hf_oampdu_event_espeTotalErrors
,
2590 { "Error Running Total", "oampdu.event.espeTotalErrors",
2591 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
2592 "Number of symbols in error since reset of the sublayer", HFILL
}},
2594 { &hf_oampdu_event_espeTotalEvents
,
2595 { "Event Running Total", "oampdu.event.espeTotalEvents",
2596 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
2597 "Total Event generated since reset of the sublayer", HFILL
}},
2599 /* Errored Frame Event TLV */
2600 { &hf_oampdu_event_efeWindow
,
2601 { "Errored Frame Window", "oampdu.event.efeWindow",
2602 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2603 "Number of symbols in the period", HFILL
}},
2605 { &hf_oampdu_event_efeThreshold
,
2606 { "Errored Frame Threshold", "oampdu.event.efeThreshold",
2607 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
2608 "Number of frames required to generate the Event", HFILL
}},
2610 { &hf_oampdu_event_efeErrors
,
2611 { "Errored Frames", "oampdu.event.efeErrors",
2612 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
2613 "Number of symbols in error", HFILL
}},
2615 { &hf_oampdu_event_efeTotalErrors
,
2616 { "Error Running Total", "oampdu.event.efeTotalErrors",
2617 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
2618 "Number of frames in error since reset of the sublayer", HFILL
}},
2620 { &hf_oampdu_event_efeTotalEvents
,
2621 { "Event Running Total", "oampdu.event.efeTotalEvents",
2622 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
2623 "Total Event generated since reset of the sublayer", HFILL
}},
2625 /* Errored Frame Period Event TLV */
2626 { &hf_oampdu_event_efpeWindow
,
2627 { "Errored Frame Window", "oampdu.event.efpeWindow",
2628 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
2629 "Number of frame in error during the period", HFILL
}},
2631 { &hf_oampdu_event_efpeThreshold
,
2632 { "Errored Frame Threshold", "oampdu.event.efpeThreshold",
2633 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
2634 "Number of frames required to generate the Event", HFILL
}},
2636 { &hf_oampdu_event_efpeErrors
,
2637 { "Errored Frames", "oampdu.event.efeErrors",
2638 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
2639 "Number of symbols in error", HFILL
}},
2641 { &hf_oampdu_event_efpeTotalErrors
,
2642 { "Error Running Total", "oampdu.event.efpeTotalErrors",
2643 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
2644 "Number of frames in error since reset of the sublayer", HFILL
}},
2646 { &hf_oampdu_event_efpeTotalEvents
,
2647 { "Event Running Total", "oampdu.event.efpeTotalEvents",
2648 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
2649 "Total Event generated since reset of the sublayer", HFILL
}},
2651 /* Errored Frame Second Summary Event TLV */
2652 { &hf_oampdu_event_efsseWindow
,
2653 { "Errored Frame Window", "oampdu.event.efsseWindow",
2654 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2655 "Number of frame in error during the period", HFILL
}},
2657 { &hf_oampdu_event_efsseThreshold
,
2658 { "Errored Frame Threshold", "oampdu.event.efsseThreshold",
2659 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2660 "Number of frames required to generate the Event", HFILL
}},
2662 { &hf_oampdu_event_efsseErrors
,
2663 { "Errored Frames", "oampdu.event.efeErrors",
2664 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2665 "Number of symbols in error", HFILL
}},
2667 { &hf_oampdu_event_efsseTotalErrors
,
2668 { "Error Running Total", "oampdu.event.efsseTotalErrors",
2669 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
2670 "Number of frames in error since reset of the sublayer", HFILL
}},
2672 { &hf_oampdu_event_efsseTotalEvents
,
2673 { "Event Running Total", "oampdu.event.efsseTotalEvents",
2674 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
2675 "Total Event generated since reset of the sublayer", HFILL
}},
2677 /* Variable request and response definitions*/
2678 { &hf_oampdu_variable_branch
,
2679 { "Branch", "oampdu.variable.branch",
2680 FT_UINT8
, BASE_HEX
, VALS(branch_vals
), 0x0,
2681 "Variable Branch, derived from the CMIP protocol in Annex 30A", HFILL
}},
2683 { &hf_oampdu_variable_object
,
2684 { "Leaf", "oampdu.variable.object",
2685 FT_UINT16
, BASE_HEX
, VALS(object_vals
), 0x0,
2686 "Object, derived from the CMIP protocol in Annex 30A", HFILL
}},
2688 { &hf_oampdu_variable_package
,
2689 { "Leaf", "oampdu.variable.package",
2690 FT_UINT16
, BASE_HEX
, VALS(package_vals
), 0x0,
2691 "Package, derived from the CMIP protocol in Annex 30A", HFILL
}},
2693 { &hf_oampdu_variable_binding
,
2694 { "Leaf", "oampdu.variable.binding",
2695 FT_UINT16
, BASE_HEX
, VALS(binding_vals
), 0x0,
2696 "Binding, derived from the CMIP protocol in Annex 30A", HFILL
}},
2698 { &hf_oampdu_variable_attribute
,
2699 { "Leaf", "oampdu.variable.attribute",
2700 FT_UINT16
, BASE_HEX
|BASE_EXT_STRING
, &attribute_vals_ext
, 0x0,
2701 "Attribute, derived from the CMIP protocol in Annex 30A", HFILL
}},
2703 { &hf_oampdu_variable_width
,
2704 { "Variable Width", "oampdu.variable.width",
2705 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
2708 { &hf_oampdu_variable_indication
,
2709 { "Variable indication", "oampdu.variable.indication",
2710 FT_UINT8
, BASE_HEX
, VALS(indication_vals
), 0x0,
2713 { &hf_oampdu_variable_value
,
2714 { "Variable Value", "oampdu.variable.value",
2715 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2718 /* Loopback Control definitions*/
2720 { "Commands", "oampdu.lpbk.commands",
2721 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2722 "The List of Loopback Commands", HFILL
}},
2724 { &hf_oampdu_lpbk_enable
,
2725 { "Enable Remote Loopback", "oampdu.lpbk.commands.enable",
2726 FT_BOOLEAN
, 8, NULL
, OAMPDU_LPBK_ENABLE
,
2727 "Enable Remote Loopback Command", HFILL
}},
2729 { &hf_oampdu_lpbk_disable
,
2730 { "Disable Remote Loopback", "oampdu.lpbk.commands.disable",
2731 FT_BOOLEAN
, 8, NULL
, OAMPDU_LPBK_DISABLE
,
2732 "Disable Remote Loopback Command", HFILL
}},
2734 /* Vendor-Specific definitions */
2735 { &hf_oampdu_vendor_specific_dpoe_opcode
,
2736 { "DPoE Opcode", "oampdu.vendor.specific.opcode",
2737 FT_UINT8
, BASE_HEX
, VALS(vendor_specific_opcode_vals
),
2738 0x0, NULL
, HFILL
}},
2740 { &hf_oampdu_vendor_specific_dpoe_evt_code
,
2741 { "Event Code", "oampdu.vendor.specific.dpoe.evt.code",
2742 FT_UINT8
, BASE_HEX
, VALS(dpoe_evt_code_vals
),
2743 0x0, NULL
, HFILL
}},
2745 { &hf_oampdu_vendor_specific_dpoe_evt_raised
,
2746 { "Raised", "oampdu.vendor.specific.dpoe.evt.raised",
2747 FT_BOOLEAN
, BASE_NONE
, NULL
,
2748 0x0, NULL
, HFILL
}},
2750 { &hf_oampdu_vendor_specific_dpoe_evt_object_type
,
2751 { "Object Type", "oampdu.vendor.specific.dpoe.evt.object_type",
2752 FT_UINT16
, BASE_HEX
, VALS(dpoe_oam_object_type_vals
),
2753 0x0, NULL
, HFILL
}},
2755 /* DPoE Variable Descriptor */
2756 { &hf_dpoe_variable_descriptor
,
2757 { "Variable Descriptor", "oampdu.variable.descriptor",
2758 FT_UINT24
, BASE_HEX
, VALS(dpoe_variable_descriptor_vals
),
2759 0x0, NULL
, HFILL
}},
2761 { &hf_dpoe_variable_response_code
,
2762 { "Response Code", "oampdu.variable.response.code",
2763 FT_UINT8
, BASE_HEX
, VALS(dpoe_variable_response_code_vals
),
2764 0x0, NULL
, HFILL
}},
2766 { &hf_oam_dpoe_response_eth
,
2767 { "OAM Response Value", "oampdu.response.eth",
2768 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
2771 { &hf_oam_dpoe_response_int
,
2772 { "OAM Response Value", "oampdu.response.int",
2773 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2776 { &hf_oam_dpoe_fw_info_boot_version
,
2777 { "Boot Version", "oampdu.fw.boot_version",
2778 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
2781 { &hf_oam_dpoe_fw_info_boot_crc
,
2782 { "Boot CRC", "oampdu.fw.boot_crc",
2783 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
2786 { &hf_oam_dpoe_fw_info_fw_version
,
2787 { "FW Version", "oampdu.fw.fw_version",
2788 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
2791 { &hf_oam_dpoe_fw_info_fw_crc
,
2792 { "FW CRC", "oampdu.fw.fw_crc",
2793 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
2796 { &hf_oam_dpoe_chipset_jedec_id
,
2797 { "JEDEC ID", "oampdu.chipset.jedec_id",
2798 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
2801 { &hf_oam_dpoe_chipset_chip_model
,
2802 { "Chip Model", "oampdu.chipset.chip_model",
2803 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
2806 { &hf_oam_dpoe_chipset_chip_version
,
2807 { "Chip Version", "oampdu.chipset.chip_version",
2808 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
2811 { &hf_oam_dpoe_mll_b
,
2812 { "Bidirectional", "oampdu.mll.b",
2813 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2816 { &hf_oam_dpoe_mll_do
,
2817 { "Downstream-only", "oampdu.mll.do",
2818 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2821 { &hf_oam_dpoe_pkt_buffer_us_queues
,
2822 { "Upstream Queues", "oampdu.pkt_buf.us_queues",
2823 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
2826 { &hf_oam_dpoe_pkt_buffer_us_queues_max_per_link
,
2827 { "Upstream Queues Max/Link", "oampdu.pkt_buf.us_queues_max_per_link",
2828 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
2831 { &hf_oam_dpoe_pkt_buffer_us_queue_inc
,
2832 { "Upstream Queue Increment", "oampdu.pkt_buf.us_queue_increment",
2833 FT_UINT8
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_1k
), 0x0,
2836 { &hf_oam_dpoe_pkt_buffer_ds_queues
,
2837 { "Downstream Queues", "oampdu.pkt_buf.ds_queues",
2838 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
2841 { &hf_oam_dpoe_pkt_buffer_ds_queues_max_per_link
,
2842 { "Downstream Queues Max/Link", "oampdu.pkt_buf.ds_queues_max_per_link",
2843 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
2846 { &hf_oam_dpoe_pkt_buffer_ds_queue_inc
,
2847 { "Downstream Queue Increment", "oampdu.pkt_buf.ds_queue_increment",
2848 FT_UINT8
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_1k
), 0x0,
2851 { &hf_oam_dpoe_pkt_buffer_total_memory
,
2852 { "Total Memory", "oampdu.pkt_buf.total_memory",
2853 FT_UINT16
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_1k
), 0x0,
2856 { &hf_oam_dpoe_pkt_buffer_us_memory_max
,
2857 { "Upstream Memory Max", "oampdu.pkt_buf.us_memory_max",
2858 FT_UINT16
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_1k
), 0x0,
2861 { &hf_oam_dpoe_pkt_buffer_ds_memory_max
,
2862 { "Downstream Memory Max", "oampdu.pkt_buf.ds_memory_max",
2863 FT_UINT16
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_1k
), 0x0,
2866 { &hf_oam_dpoe_frame_rate_maximum
,
2867 { "Maximum OAM Rate", "oampdu.frame.rate.min",
2868 FT_UINT16
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_num_100ms
), 0x0,
2871 { &hf_oam_dpoe_frame_rate_minimum
,
2872 { "Minimum OAM Rate", "oampdu.frame.rate.max",
2873 FT_UINT16
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_pdus_100ms
), 0x0,
2876 { &hf_oam_dpoe_mfg_org_name
,
2877 { "Mfg Organization Name", "oampdu.mfg_org_name",
2878 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
2881 { &hf_oam_dpoe_tvc_code_access_start
,
2882 { "Code Access Start", "oampdu.tvc.code_access_start",
2883 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
2886 { &hf_oam_dpoe_tvc_cvc_access_start
,
2887 { "CVC Access Start", "oampdu.tvc.cvc_access_start",
2888 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
2891 { &hf_oam_dpoe_vendor_name
,
2892 { "Vendor Name", "oampdu.vendor_name",
2893 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
2896 { &hf_oam_dpoe_model_number
,
2897 { "Model Number", "oampdu.model_number",
2898 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
2901 { &hf_oam_dpoe_hw_version
,
2902 { "HW Version", "oampdu.hw_version",
2903 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
2906 { &hf_oam_dpoe_sw_bundle
,
2907 { "SW Bundle", "oampdu.sw_bundle",
2908 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
2911 { &hf_oam_dpoe_mfg_info_serial_number
,
2912 {"Serial Number", "oampdu.mfg_info.serial_number",
2913 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
2916 { &hf_oam_dpoe_mfg_info_vendor_specific
,
2917 { "Vendor Specific", "oampdu.mfg_info.vendor_specific",
2918 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2921 { &hf_oam_dpoe_date_of_manufacture
,
2922 {"Date of Manufacture", "oampdu.date_of_manufacture",
2923 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
2926 { &hf_oam_dpoe_repthr_nqs
,
2927 { "Number of Queue Sets", "oampdu.report.threshold.queue",
2928 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
2931 { &hf_oam_dpoe_repthr_rvpqs
,
2932 { "Report Values Per Queue Set", "oampdu.report.threshold.queue.values",
2933 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2936 { &hf_oam_dpoe_report_threshold
,
2937 { "Report Threshold", "oampdu.report.threshold",
2938 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2941 { &hf_oam_dpoe_ll_fwd_state
,
2942 { "Link State", "oampdu.link_state",
2943 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
2946 { &hf_oam_dpoe_s1_autoneg
,
2947 { "Auto-Negotiation Capability", "oampdu.s1.autoneg",
2948 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
2951 { &hf_oam_dpoe_s1_autoneg_hd
,
2952 { "Half Duplex", "oampdu.s1.autoneg.hd",
2953 FT_BOOLEAN
, 16, TFS(&tfs_yes_no
), 0x0001,
2956 { &hf_oam_dpoe_s1_autoneg_fd
,
2957 { "Full Duplex", "oampdu.s1.autoneg.fd",
2958 FT_BOOLEAN
, 16, TFS(&tfs_yes_no
), 0x0002,
2961 { &hf_oam_dpoe_s1_autoneg_10
,
2962 { "10 Mbps", "oampdu.s1.autoneg.10",
2963 FT_BOOLEAN
, 16, TFS(&tfs_yes_no
), 0x0004,
2966 { &hf_oam_dpoe_s1_autoneg_100
,
2967 { "100 Mbps", "oampdu.s1.autoneg.100",
2968 FT_BOOLEAN
, 16, TFS(&tfs_yes_no
), 0x0008,
2971 { &hf_oam_dpoe_s1_autoneg_1000
,
2972 { "1000 Mbps", "oampdu.s1.autoneg.1000",
2973 FT_BOOLEAN
, 16, TFS(&tfs_yes_no
), 0x0010,
2976 { &hf_oam_dpoe_s1_autoneg_10000
,
2977 { "10Gbps", "oampdu.s1.autoneg.10000",
2978 FT_BOOLEAN
, 16, TFS(&tfs_yes_no
), 0x0020,
2981 { &hf_oam_dpoe_s1_autoneg_fc
,
2982 { "Flow Control", "oampdu.s1.autoneg.fc",
2983 FT_BOOLEAN
, 16, TFS(&tfs_yes_no
), 0x0040,
2986 { &hf_oam_dpoe_s1_autoneg_mdi
,
2987 { "Auto MDI/MDI-X", "oampdu.s1.autoneg.mdi",
2988 FT_BOOLEAN
, 16, TFS(&tfs_yes_no
), 0x0080,
2991 { &hf_oam_dpoe_user_port_object
,
2992 { "UNI Number", "oampdu.user.port.object",
2993 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2996 { &hf_oam_dpoe_user_port_object_subtype
,
2997 { "Subtype", "oampdu.user.port.object.subtype",
2998 FT_UINT16
, BASE_DEC
, VALS(user_port_object_subtype_vals
), 0x0,
3001 { &hf_oam_dpoe_user_port_object_header_precedence
,
3002 { "Precedence", "oampdu.user.port.object.header.precedence",
3003 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
3006 { &hf_oam_dpoe_user_port_object_clause_fc
,
3007 { "Field Code", "oampdu.user.port.object.clause.fc",
3008 FT_UINT8
, BASE_HEX
, VALS(user_port_object_clause_fc_vals
), 0x0,
3011 { &hf_oam_dpoe_user_port_object_clause_fi
,
3012 { "Field Instance", "oampdu.user.port.object.clause.fi",
3013 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
3016 { &hf_oam_dpoe_user_port_object_clause_msbm
,
3017 { "MSB Mask", "oampdu.user.port.object.clause.msbm",
3018 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
3021 { &hf_oam_dpoe_user_port_object_clause_lsbm
,
3022 { "LSB Mask", "oampdu.user.port.object.clause.lsbm",
3023 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
3026 { &hf_oam_dpoe_user_port_object_clause_operator
,
3027 { "Operator", "oampdu.user.port.object.clause.operator",
3028 FT_UINT8
, BASE_HEX
, VALS(user_port_object_clause_operator_vals
), 0x0,
3031 { &hf_oam_dpoe_user_port_object_clause_mvl
,
3032 { "Match Value Length", "oampdu.user.port.object.clause.mvl",
3033 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
3036 { &hf_oam_dpoe_user_port_object_clause_mv
,
3037 { "Match Value", "oampdu.user.port.object.clause.mv",
3038 FT_BYTES
, SEP_SPACE
, NULL
, 0x0,
3041 { &hf_oam_dpoe_user_port_object_result_rr
,
3042 { "Rule Result", "oampdu.user.port.object.result.rr",
3043 FT_UINT8
, BASE_HEX
, VALS(user_port_object_result_rr_vals
), 0x0,
3046 { &hf_oam_dpoe_user_port_object_result_rr_queue_obj_type
,
3047 { "Object Type", "oampdu.user.port.object.result.rr.queue.object_type",
3048 FT_UINT16
, BASE_HEX
, VALS(dpoe_oam_object_type_vals
), 0x0,
3051 { &hf_oam_dpoe_user_port_object_result_rr_queue_obj_inst
,
3052 { "Object Instance", "oampdu.user.port.object.result.rr.queue.object_instance",
3053 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
3056 { &hf_oam_dpoe_user_port_object_result_rr_queue_queue_index
,
3057 { "Queue Number", "oampdu.user.port.object.result.rr.queue.queue_index",
3058 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
3061 { &hf_oam_dpoe_user_port_object_result_rr_set_fc
,
3062 { "Field Code", "oampdu.user.port.object.result.rr.set.fc",
3063 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
3066 { &hf_oam_dpoe_user_port_object_result_rr_set_fi
,
3067 { "Field Instance", "oampdu.user.port.object.result.rr.set.fi",
3068 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
3071 { &hf_oam_dpoe_user_port_object_result_rr_copy
,
3072 { "Field Code to set from field used in last clause of rule", "oampdu.user.port.object.result.rr.copy",
3073 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
3076 { &hf_oam_dpoe_user_port_object_result_rr_delete
,
3077 { "Field Code to remove from frame", "oampdu.user.port.object.result.rr.delete",
3078 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
3081 { &hf_oam_dpoe_user_port_object_result_rr_insert
,
3082 { "Field Code to insert into frame", "oampdu.user.port.object.result.rr.insert",
3083 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
3086 { &hf_oam_dpoe_user_port_object_result_rr_replace
,
3087 { "Field Code to replace", "oampdu.user.port.object.result.rr.replace",
3088 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
3091 { &hf_oam_dpoe_user_port_object_result_rr_cd
,
3092 { "Field Code not to delete", "oampdu.user.port.object.result.rr.cd",
3093 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
3096 { &hf_oam_dpoe_user_port_object_result_rr_ci
,
3097 { "Field Code not to insert", "oampdu.user.port.object.result.rr.ci",
3098 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
3101 { &hf_oam_dpoe_qc_ll_u
,
3102 { "Upstream Logical Links", "oampdu.queue_configuration.logical_links.upstream",
3103 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
3106 { &hf_oam_dpoe_qc_ports_d
,
3107 { "Downstream Ports", "oampdu.queue_configuration.ports.downstream",
3108 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
3111 { &hf_oam_dpoe_qc_nq
,
3112 {"Number of queues", "oampdu.queue_configuration.queues",
3113 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
3116 { &hf_oam_dpoe_qc_queue_size
,
3117 {"Queue size (in 4KB units)", "oampdu.queue_configuration.size",
3118 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
3121 { &hf_oam_dpoe_fw_filename
,
3122 {"Firmware Filename", "oampdu.fw_filename",
3123 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
3126 { &hf_oam_dpoe_onu_port_config_llid_count
,
3127 { "LLID Count", "oampdu.onu_port.llid_count",
3128 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
3131 { &hf_oam_dpoe_onu_port_config_uni_count
,
3132 { "UNI Count", "oampdu.onu_port.uni_count",
3133 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
3136 { &hf_oam_dpoe_1904_1_mac_enable_status
,
3137 { "MAC Enable Status", "oampdu.1904_1.mac_enable_status",
3138 FT_UINT8
, BASE_DEC
, VALS(dpoe_1904_1_mac_enable_status_vals
), 0x0,
3141 { &hf_oam_dpoe_1904_1_a_phy_type
,
3142 { "PHY Type", "oampdu.1904_1.a_phy_type",
3143 FT_UINT8
, BASE_HEX
, VALS(dpoe_1904_1_a_phy_type_vals
), 0x0,
3146 { &hf_oam_dpoe_1904_1_media_available
,
3147 { "Media Available", "oampdu.1904_1.media_available",
3148 FT_UINT8
, BASE_DEC
, VALS(dpoe_1904_1_media_available_vals
), 0x0,
3151 { &hf_oam_dpoe_1904_1_autoneg_admstate
,
3152 { "Auto-Negotiation Admin State", "oampdu.1904_1.autoneg_admstate",
3153 FT_UINT32
, BASE_DEC
, VALS(dpoe_1904_1_autoneg_admstate_vals
), 0x0,
3156 { &hf_oam_dpoe_1904_1_duplex_status
,
3157 { "Duplex Status", "oampdu.1904_1.duplex_status",
3158 FT_UINT8
, BASE_DEC
, VALS(dpoe_1904_1_duplex_status_vals
), 0x0,
3161 { &hf_oam_dpoe_1904_1_mac_control_functions_supported
,
3162 { "MAC Control Functions Supported", "oampdu.1904_1.mac_control_functions_supported",
3163 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
3166 { &hf_oam_dpoe_1904_1_cfg_mcast_llid_action
,
3167 { "Config MCast LLID Action", "oampdu.1904_1.cfg_mcast_llid_action",
3168 FT_UINT8
, BASE_DEC
, VALS(dpoe_1904_1_cfg_mcast_llid_action
), 0x0,
3171 { &hf_oam_dpoe_1904_1_cfg_mcast_llid_value
,
3172 { "Config MCast LLID Value", "oampdu.1904_1.cfg_mcast_llid_value",
3173 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
3176 { &hf_oam_dpoe_1904_1_read_write_mac_address
,
3177 { "Read Write MAC Address", "oampdu.1904_1.read_write_mac_address",
3178 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
3181 { &hf_oam_dpoe_1904_1_qc_queue_size
,
3182 { "Queue Size", "oampdu.1904_1.queue_size",
3183 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
3188 /* Setup protocol subtree array */
3190 static int *ett
[] = {
3193 &ett_oampdu_local_info
,
3194 &ett_oampdu_local_info_state
,
3195 &ett_oampdu_local_info_config
,
3196 &ett_oampdu_remote_info
,
3197 &ett_oampdu_remote_info_state
,
3198 &ett_oampdu_remote_info_config
,
3199 &ett_oampdu_org_info
,
3200 &ett_oampdu_event_espe
,
3201 &ett_oampdu_event_efe
,
3202 &ett_oampdu_event_efpe
,
3203 &ett_oampdu_event_efsse
,
3204 &ett_oampdu_event_ose
,
3205 &ett_oampdu_lpbk_ctrl
,
3206 &ett_oampdu_vendor_specific
,
3208 &ett_dpoe_opcode_response
,
3209 &ett_oam_dpoe_s1_autoneg
,
3212 &ett_oam_dpoe_qc_nq
,
3215 static ei_register_info ei
[] = {
3216 { &ei_oampdu_event_length_bad
, { "oampdu.event.length.bad", PI_MALFORMED
, PI_ERROR
, "Event length should be at least 2", EXPFILL
}},
3217 { &ei_oampdu_mvl_length_zero
, { "oampdu.event.mvl.zero", PI_UNDECODED
, PI_CHAT
, "Match Value Field Length is Zero, Match Value Field not Decoded", EXPFILL
}},
3220 expert_module_t
* expert_oampdu
;
3222 /* Register the protocol name and description */
3224 proto_oampdu
= proto_register_protocol("Ethernet OAM PDU", "OAMPDU", "oampdu");
3226 /* Required function calls to register the header fields and subtrees used */
3228 proto_register_field_array(proto_oampdu
, hf
, array_length(hf
));
3229 proto_register_subtree_array(ett
, array_length(ett
));
3230 expert_oampdu
= expert_register_protocol(proto_oampdu
);
3231 expert_register_field_array(expert_oampdu
, ei
, array_length(ei
));
3233 oampdu_handle
= register_dissector("oampdu", dissect_oampdu
, proto_oampdu
);
3237 proto_reg_handoff_oampdu(void)
3239 dissector_add_uint("slow.subtype", OAM_SUBTYPE
, oampdu_handle
);
3243 * Editor modelines - https://www.wireshark.org/tools/modelines.html
3248 * indent-tabs-mode: nil
3251 * vi: set shiftwidth=4 tabstop=8 expandtab:
3252 * :indentSize=4:tabSize=8:noTabs=true: