github.com/psiphon-inc/goarista@v0.0.0-20160825065156-d002785f4c67/lanz/proto/lanz.proto (about) 1 // Copyright (c) 2011 Arista Networks, Inc. All rights reserved. 2 // Use of this source code is governed by the Apache License 2.0 3 // that can be found in the COPYING file. 4 // 5 // This Google Protocol Buffer schema contains the message 6 // that are used for Lanz streaming. 7 // 8 9 syntax = "proto2"; 10 11 option go_package = "proto"; 12 13 package LanzProtobuf; 14 15 message ConfigRecord { 16 required uint64 timestamp = 1; // Time of change in configuration in micro-seconds (UTC) 17 required uint32 lanzVersion = 2; // LANZ feature version 18 required uint32 numOfPorts = 3; // Num of ports in the switch 19 required uint32 segmentSize = 4; // Segement size 20 required uint32 maxQueueSize = 5; // Maximum queue size in segments 21 message PortConfigRecord { 22 required string intfName = 1; // Name of the port 23 required uint32 switchId = 2; // Id of the chip on a multi-chip system 24 required uint32 portId = 3; // Id of the port 25 required bool internalPort = 4; // 'True' if it's an internal port 26 required uint32 highThreshold = 5; // Higher threshold 27 required uint32 lowThreshold = 6; // Lower threshold 28 } 29 repeated PortConfigRecord portConfigRecord = 6; // Lanz config details of each port 30 optional uint32 globalUsageHighThreshold = 7; // High threshold for global usage monitoring 31 optional uint32 globalUsageLowThreshold = 8; // Low threshold for global usage monitoring 32 optional bool globalUsageReportingEnabled = 9; // Global buffer reporting enabled 33 } 34 35 message GlobalBufferUsageRecord { 36 enum EntryType { 37 LOW = 1; 38 UPDATE = 2; 39 HIGH = 3; 40 } 41 optional EntryType entryType = 1; 42 optional uint64 timestamp = 2; // Time of entry in micro-seconds (UTC) 43 optional uint32 bufferSize = 3; // Size of global buffer 44 optional uint32 duration = 4; // duration of buffer usage between high and low 45 } 46 47 message CongestionRecord { 48 required uint64 timestamp = 1; // Time of congestion in micro-seconds (UTC) 49 required string intfName = 2; // Name of the port 50 required uint32 switchId = 3; // Id of the chip on a multi-chip system 51 required uint32 portId = 4; // Id of the port 52 required uint32 queueSize = 5; // Queue size in segments at time of congestion 53 enum EntryType { 54 START = 1; 55 UPDATE = 2; 56 END = 3; 57 } 58 optional EntryType entryType = 6; // Type of entry 59 optional uint32 trafficClass = 7; // Traffic Class 60 optional uint64 timeOfMaxQLen = 8; // Time of max q len since congestion start 61 optional uint32 txLatency = 9; // Transmit latency 62 optional uint32 qDropCount = 10; // Queue drop count 63 optional string fabricPeerIntfName = 11; // Name of the fabric port's peer 64 } 65 66 message ErrorRecord { 67 required uint64 timestamp = 1; // Time of event in micro-seconds (UTC) 68 required string errorMessage = 2; // Text message 69 } 70 71 message LanzRecord { 72 optional ConfigRecord configRecord = 1; 73 optional CongestionRecord congestionRecord = 2; 74 optional ErrorRecord errorRecord = 3; 75 optional GlobalBufferUsageRecord globalBufferUsageRecord = 4; 76 }