diff --git a/go/info/ntpsources.pb.go b/go/info/ntpsources.pb.go new file mode 100644 index 00000000..7f27bbd9 --- /dev/null +++ b/go/info/ntpsources.pb.go @@ -0,0 +1,602 @@ +// Copyright(c) 2024 Zededa, Inc. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v4.23.4 +// source: info/ntpsources.proto + +package info + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Enum for describing the NTP peer state +type NTPPeerStateType int32 + +const ( + NTPPeerStateType_NTP_PEER_STATE_SYNC NTPPeerStateType = 0 + NTPPeerStateType_NTP_PEER_STATE_UNREACH NTPPeerStateType = 1 + NTPPeerStateType_NTP_PEER_STATE_FALSETICKER NTPPeerStateType = 2 + NTPPeerStateType_NTP_PEER_STATE_JITTERY NTPPeerStateType = 3 + NTPPeerStateType_NTP_PEER_STATE_CANDIDATE NTPPeerStateType = 4 + NTPPeerStateType_NTP_PEER_STATE_OUTLIER NTPPeerStateType = 5 +) + +// Enum value maps for NTPPeerStateType. +var ( + NTPPeerStateType_name = map[int32]string{ + 0: "NTP_PEER_STATE_SYNC", + 1: "NTP_PEER_STATE_UNREACH", + 2: "NTP_PEER_STATE_FALSETICKER", + 3: "NTP_PEER_STATE_JITTERY", + 4: "NTP_PEER_STATE_CANDIDATE", + 5: "NTP_PEER_STATE_OUTLIER", + } + NTPPeerStateType_value = map[string]int32{ + "NTP_PEER_STATE_SYNC": 0, + "NTP_PEER_STATE_UNREACH": 1, + "NTP_PEER_STATE_FALSETICKER": 2, + "NTP_PEER_STATE_JITTERY": 3, + "NTP_PEER_STATE_CANDIDATE": 4, + "NTP_PEER_STATE_OUTLIER": 5, + } +) + +func (x NTPPeerStateType) Enum() *NTPPeerStateType { + p := new(NTPPeerStateType) + *p = x + return p +} + +func (x NTPPeerStateType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NTPPeerStateType) Descriptor() protoreflect.EnumDescriptor { + return file_info_ntpsources_proto_enumTypes[0].Descriptor() +} + +func (NTPPeerStateType) Type() protoreflect.EnumType { + return &file_info_ntpsources_proto_enumTypes[0] +} + +func (x NTPPeerStateType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use NTPPeerStateType.Descriptor instead. +func (NTPPeerStateType) EnumDescriptor() ([]byte, []int) { + return file_info_ntpsources_proto_rawDescGZIP(), []int{0} +} + +// Flags from RFC 5905 + defined by chrony +type NTPPeerFlagBitmap int32 + +const ( + NTPPeerFlagBitmap_NTP_PEER_PKT_FLAG_UNKNOWN NTPPeerFlagBitmap = 0 + NTPPeerFlagBitmap_NTP_PEER_PKT_FLAG_DUP NTPPeerFlagBitmap = 1 + NTPPeerFlagBitmap_NTP_PEER_PKT_FLAG_BOGUS NTPPeerFlagBitmap = 2 + NTPPeerFlagBitmap_NTP_PEER_PKT_FLAG_INVALID NTPPeerFlagBitmap = 4 + NTPPeerFlagBitmap_NTP_PEER_PKT_FLAG_AUTH NTPPeerFlagBitmap = 8 + NTPPeerFlagBitmap_NTP_PEER_PKT_FLAG_STRATUM NTPPeerFlagBitmap = 16 + NTPPeerFlagBitmap_NTP_PEER_PKT_FLAG_HEADER NTPPeerFlagBitmap = 32 + NTPPeerFlagBitmap_NTP_PEER_TST_FLAG_MAX_DELAY NTPPeerFlagBitmap = 64 + NTPPeerFlagBitmap_NTP_PEER_TST_FLAG_DELAY_RATIO NTPPeerFlagBitmap = 128 + NTPPeerFlagBitmap_NTP_PEER_TST_FLAG_DELAY_DEV_RATION NTPPeerFlagBitmap = 256 + NTPPeerFlagBitmap_NTP_PEER_TST_FLAG_SYNC_LOOP NTPPeerFlagBitmap = 512 +) + +// Enum value maps for NTPPeerFlagBitmap. +var ( + NTPPeerFlagBitmap_name = map[int32]string{ + 0: "NTP_PEER_PKT_FLAG_UNKNOWN", + 1: "NTP_PEER_PKT_FLAG_DUP", + 2: "NTP_PEER_PKT_FLAG_BOGUS", + 4: "NTP_PEER_PKT_FLAG_INVALID", + 8: "NTP_PEER_PKT_FLAG_AUTH", + 16: "NTP_PEER_PKT_FLAG_STRATUM", + 32: "NTP_PEER_PKT_FLAG_HEADER", + 64: "NTP_PEER_TST_FLAG_MAX_DELAY", + 128: "NTP_PEER_TST_FLAG_DELAY_RATIO", + 256: "NTP_PEER_TST_FLAG_DELAY_DEV_RATION", + 512: "NTP_PEER_TST_FLAG_SYNC_LOOP", + } + NTPPeerFlagBitmap_value = map[string]int32{ + "NTP_PEER_PKT_FLAG_UNKNOWN": 0, + "NTP_PEER_PKT_FLAG_DUP": 1, + "NTP_PEER_PKT_FLAG_BOGUS": 2, + "NTP_PEER_PKT_FLAG_INVALID": 4, + "NTP_PEER_PKT_FLAG_AUTH": 8, + "NTP_PEER_PKT_FLAG_STRATUM": 16, + "NTP_PEER_PKT_FLAG_HEADER": 32, + "NTP_PEER_TST_FLAG_MAX_DELAY": 64, + "NTP_PEER_TST_FLAG_DELAY_RATIO": 128, + "NTP_PEER_TST_FLAG_DELAY_DEV_RATION": 256, + "NTP_PEER_TST_FLAG_SYNC_LOOP": 512, + } +) + +func (x NTPPeerFlagBitmap) Enum() *NTPPeerFlagBitmap { + p := new(NTPPeerFlagBitmap) + *p = x + return p +} + +func (x NTPPeerFlagBitmap) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NTPPeerFlagBitmap) Descriptor() protoreflect.EnumDescriptor { + return file_info_ntpsources_proto_enumTypes[1].Descriptor() +} + +func (NTPPeerFlagBitmap) Type() protoreflect.EnumType { + return &file_info_ntpsources_proto_enumTypes[1] +} + +func (x NTPPeerFlagBitmap) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use NTPPeerFlagBitmap.Descriptor instead. +func (NTPPeerFlagBitmap) EnumDescriptor() ([]byte, []int) { + return file_info_ntpsources_proto_rawDescGZIP(), []int{1} +} + +// As described in http://doc.ntp.org/current-stable/ntpq.html +type NTPPeer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Authenticated bool `protobuf:"varint,1,opt,name=authenticated,proto3" json:"authenticated,omitempty"` + Reachable bool `protobuf:"varint,2,opt,name=reachable,proto3" json:"reachable,omitempty"` // (reachability == 0xff), i.e. 8 attempts + Reachability uint32 `protobuf:"varint,3,opt,name=reachability,proto3" json:"reachability,omitempty"` + State NTPPeerStateType `protobuf:"varint,4,opt,name=state,proto3,enum=org.lfedge.eve.info.NTPPeerStateType" json:"state,omitempty"` + Hostname string `protobuf:"bytes,5,opt,name=hostname,proto3" json:"hostname,omitempty"` + SrcAddr string `protobuf:"bytes,6,opt,name=src_addr,json=srcAddr,proto3" json:"src_addr,omitempty"` + SrcPort uint32 `protobuf:"varint,7,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` + DstAddr string `protobuf:"bytes,8,opt,name=dst_addr,json=dstAddr,proto3" json:"dst_addr,omitempty"` + DstPort uint32 `protobuf:"varint,9,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` + Leap uint32 `protobuf:"varint,10,opt,name=leap,proto3" json:"leap,omitempty"` + Stratum uint32 `protobuf:"varint,11,opt,name=stratum,proto3" json:"stratum,omitempty"` + Precision uint32 `protobuf:"varint,12,opt,name=precision,proto3" json:"precision,omitempty"` + RefId string `protobuf:"bytes,13,opt,name=ref_id,json=refId,proto3" json:"ref_id,omitempty"` + RefTime *timestamppb.Timestamp `protobuf:"bytes,14,opt,name=ref_time,json=refTime,proto3" json:"ref_time,omitempty"` + Poll int32 `protobuf:"zigzag32,15,opt,name=poll,proto3" json:"poll,omitempty"` + Flags uint32 `protobuf:"varint,16,opt,name=flags,proto3" json:"flags,omitempty"` // bitmap from NTPPeerFlagBitmap + Offset float64 `protobuf:"fixed64,17,opt,name=offset,proto3" json:"offset,omitempty"` + Delay float64 `protobuf:"fixed64,18,opt,name=delay,proto3" json:"delay,omitempty"` + Dispersion float64 `protobuf:"fixed64,19,opt,name=dispersion,proto3" json:"dispersion,omitempty"` + Jitter float64 `protobuf:"fixed64,20,opt,name=jitter,proto3" json:"jitter,omitempty"` + RootDelay float64 `protobuf:"fixed64,21,opt,name=root_delay,json=rootDelay,proto3" json:"root_delay,omitempty"` + RootDisp float64 `protobuf:"fixed64,22,opt,name=root_disp,json=rootDisp,proto3" json:"root_disp,omitempty"` +} + +func (x *NTPPeer) Reset() { + *x = NTPPeer{} + if protoimpl.UnsafeEnabled { + mi := &file_info_ntpsources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NTPPeer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NTPPeer) ProtoMessage() {} + +func (x *NTPPeer) ProtoReflect() protoreflect.Message { + mi := &file_info_ntpsources_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NTPPeer.ProtoReflect.Descriptor instead. +func (*NTPPeer) Descriptor() ([]byte, []int) { + return file_info_ntpsources_proto_rawDescGZIP(), []int{0} +} + +func (x *NTPPeer) GetAuthenticated() bool { + if x != nil { + return x.Authenticated + } + return false +} + +func (x *NTPPeer) GetReachable() bool { + if x != nil { + return x.Reachable + } + return false +} + +func (x *NTPPeer) GetReachability() uint32 { + if x != nil { + return x.Reachability + } + return 0 +} + +func (x *NTPPeer) GetState() NTPPeerStateType { + if x != nil { + return x.State + } + return NTPPeerStateType_NTP_PEER_STATE_SYNC +} + +func (x *NTPPeer) GetHostname() string { + if x != nil { + return x.Hostname + } + return "" +} + +func (x *NTPPeer) GetSrcAddr() string { + if x != nil { + return x.SrcAddr + } + return "" +} + +func (x *NTPPeer) GetSrcPort() uint32 { + if x != nil { + return x.SrcPort + } + return 0 +} + +func (x *NTPPeer) GetDstAddr() string { + if x != nil { + return x.DstAddr + } + return "" +} + +func (x *NTPPeer) GetDstPort() uint32 { + if x != nil { + return x.DstPort + } + return 0 +} + +func (x *NTPPeer) GetLeap() uint32 { + if x != nil { + return x.Leap + } + return 0 +} + +func (x *NTPPeer) GetStratum() uint32 { + if x != nil { + return x.Stratum + } + return 0 +} + +func (x *NTPPeer) GetPrecision() uint32 { + if x != nil { + return x.Precision + } + return 0 +} + +func (x *NTPPeer) GetRefId() string { + if x != nil { + return x.RefId + } + return "" +} + +func (x *NTPPeer) GetRefTime() *timestamppb.Timestamp { + if x != nil { + return x.RefTime + } + return nil +} + +func (x *NTPPeer) GetPoll() int32 { + if x != nil { + return x.Poll + } + return 0 +} + +func (x *NTPPeer) GetFlags() uint32 { + if x != nil { + return x.Flags + } + return 0 +} + +func (x *NTPPeer) GetOffset() float64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *NTPPeer) GetDelay() float64 { + if x != nil { + return x.Delay + } + return 0 +} + +func (x *NTPPeer) GetDispersion() float64 { + if x != nil { + return x.Dispersion + } + return 0 +} + +func (x *NTPPeer) GetJitter() float64 { + if x != nil { + return x.Jitter + } + return 0 +} + +func (x *NTPPeer) GetRootDelay() float64 { + if x != nil { + return x.RootDelay + } + return 0 +} + +func (x *NTPPeer) GetRootDisp() float64 { + if x != nil { + return x.RootDisp + } + return 0 +} + +type ZInfoNTPSources struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NtpPeers []*NTPPeer `protobuf:"bytes,1,rep,name=ntp_peers,json=ntpPeers,proto3" json:"ntp_peers,omitempty"` +} + +func (x *ZInfoNTPSources) Reset() { + *x = ZInfoNTPSources{} + if protoimpl.UnsafeEnabled { + mi := &file_info_ntpsources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ZInfoNTPSources) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ZInfoNTPSources) ProtoMessage() {} + +func (x *ZInfoNTPSources) ProtoReflect() protoreflect.Message { + mi := &file_info_ntpsources_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ZInfoNTPSources.ProtoReflect.Descriptor instead. +func (*ZInfoNTPSources) Descriptor() ([]byte, []int) { + return file_info_ntpsources_proto_rawDescGZIP(), []int{1} +} + +func (x *ZInfoNTPSources) GetNtpPeers() []*NTPPeer { + if x != nil { + return x.NtpPeers + } + return nil +} + +var File_info_ntpsources_proto protoreflect.FileDescriptor + +var file_info_ntpsources_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x6e, 0x74, 0x70, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x6f, 0x72, 0x67, 0x2e, 0x6c, 0x66, 0x65, + 0x64, 0x67, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x05, + 0x0a, 0x07, 0x4e, 0x54, 0x50, 0x50, 0x65, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, + 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x22, 0x0a, + 0x0c, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x25, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x6c, 0x66, 0x65, 0x64, 0x67, 0x65, 0x2e, 0x65, 0x76, + 0x65, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x4e, 0x54, 0x50, 0x50, 0x65, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x72, + 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x72, + 0x63, 0x41, 0x64, 0x64, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x72, 0x63, 0x5f, 0x70, 0x6f, 0x72, + 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x73, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, + 0x12, 0x19, 0x0a, 0x08, 0x64, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x64, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x64, + 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x64, + 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x65, 0x61, 0x70, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6c, 0x65, 0x61, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x75, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x65, 0x66, 0x5f, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x72, 0x65, 0x66, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x66, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x72, 0x65, 0x66, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x6c, 0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x11, 0x52, 0x04, + 0x70, 0x6f, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x12, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x73, 0x70, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x64, 0x69, + 0x73, 0x70, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6a, 0x69, 0x74, 0x74, + 0x65, 0x72, 0x18, 0x14, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, + 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x15, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x72, 0x6f, 0x6f, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, + 0x1b, 0x0a, 0x09, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x18, 0x16, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x08, 0x72, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x73, 0x70, 0x22, 0x4c, 0x0a, 0x0f, + 0x5a, 0x49, 0x6e, 0x66, 0x6f, 0x4e, 0x54, 0x50, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, + 0x39, 0x0a, 0x09, 0x6e, 0x74, 0x70, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x6c, 0x66, 0x65, 0x64, 0x67, 0x65, 0x2e, + 0x65, 0x76, 0x65, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x4e, 0x54, 0x50, 0x50, 0x65, 0x65, 0x72, + 0x52, 0x08, 0x6e, 0x74, 0x70, 0x50, 0x65, 0x65, 0x72, 0x73, 0x2a, 0xbd, 0x01, 0x0a, 0x10, 0x4e, + 0x54, 0x50, 0x50, 0x65, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x17, 0x0a, 0x13, 0x4e, 0x54, 0x50, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x45, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x4e, 0x54, 0x50, 0x5f, + 0x50, 0x45, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x52, 0x45, 0x41, + 0x43, 0x48, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x4e, 0x54, 0x50, 0x5f, 0x50, 0x45, 0x45, 0x52, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x4c, 0x53, 0x45, 0x54, 0x49, 0x43, 0x4b, + 0x45, 0x52, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x4e, 0x54, 0x50, 0x5f, 0x50, 0x45, 0x45, 0x52, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x4a, 0x49, 0x54, 0x54, 0x45, 0x52, 0x59, 0x10, 0x03, + 0x12, 0x1c, 0x0a, 0x18, 0x4e, 0x54, 0x50, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x10, 0x04, 0x12, 0x1a, + 0x0a, 0x16, 0x4e, 0x54, 0x50, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, + 0x5f, 0x4f, 0x55, 0x54, 0x4c, 0x49, 0x45, 0x52, 0x10, 0x05, 0x2a, 0xf2, 0x02, 0x0a, 0x11, 0x4e, + 0x54, 0x50, 0x50, 0x65, 0x65, 0x72, 0x46, 0x6c, 0x61, 0x67, 0x42, 0x69, 0x74, 0x6d, 0x61, 0x70, + 0x12, 0x1d, 0x0a, 0x19, 0x4e, 0x54, 0x50, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x5f, 0x50, 0x4b, 0x54, + 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, + 0x19, 0x0a, 0x15, 0x4e, 0x54, 0x50, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x5f, 0x50, 0x4b, 0x54, 0x5f, + 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x44, 0x55, 0x50, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x4e, 0x54, + 0x50, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x5f, 0x50, 0x4b, 0x54, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, + 0x42, 0x4f, 0x47, 0x55, 0x53, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19, 0x4e, 0x54, 0x50, 0x5f, 0x50, + 0x45, 0x45, 0x52, 0x5f, 0x50, 0x4b, 0x54, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x49, 0x4e, 0x56, + 0x41, 0x4c, 0x49, 0x44, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x4e, 0x54, 0x50, 0x5f, 0x50, 0x45, + 0x45, 0x52, 0x5f, 0x50, 0x4b, 0x54, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x41, 0x55, 0x54, 0x48, + 0x10, 0x08, 0x12, 0x1d, 0x0a, 0x19, 0x4e, 0x54, 0x50, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x5f, 0x50, + 0x4b, 0x54, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x55, 0x4d, 0x10, + 0x10, 0x12, 0x1c, 0x0a, 0x18, 0x4e, 0x54, 0x50, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x5f, 0x50, 0x4b, + 0x54, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x20, 0x12, + 0x1f, 0x0a, 0x1b, 0x4e, 0x54, 0x50, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x5f, 0x54, 0x53, 0x54, 0x5f, + 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x44, 0x45, 0x4c, 0x41, 0x59, 0x10, 0x40, + 0x12, 0x22, 0x0a, 0x1d, 0x4e, 0x54, 0x50, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x5f, 0x54, 0x53, 0x54, + 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x44, 0x45, 0x4c, 0x41, 0x59, 0x5f, 0x52, 0x41, 0x54, 0x49, + 0x4f, 0x10, 0x80, 0x01, 0x12, 0x27, 0x0a, 0x22, 0x4e, 0x54, 0x50, 0x5f, 0x50, 0x45, 0x45, 0x52, + 0x5f, 0x54, 0x53, 0x54, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x44, 0x45, 0x4c, 0x41, 0x59, 0x5f, + 0x44, 0x45, 0x56, 0x5f, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x80, 0x02, 0x12, 0x20, 0x0a, + 0x1b, 0x4e, 0x54, 0x50, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x5f, 0x54, 0x53, 0x54, 0x5f, 0x46, 0x4c, + 0x41, 0x47, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x10, 0x80, 0x04, 0x42, + 0x39, 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e, 0x6c, 0x66, 0x65, 0x64, 0x67, 0x65, 0x2e, 0x65, 0x76, + 0x65, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6c, 0x66, 0x2d, 0x65, 0x64, 0x67, 0x65, 0x2f, 0x65, 0x76, 0x65, 0x2d, 0x61, + 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_info_ntpsources_proto_rawDescOnce sync.Once + file_info_ntpsources_proto_rawDescData = file_info_ntpsources_proto_rawDesc +) + +func file_info_ntpsources_proto_rawDescGZIP() []byte { + file_info_ntpsources_proto_rawDescOnce.Do(func() { + file_info_ntpsources_proto_rawDescData = protoimpl.X.CompressGZIP(file_info_ntpsources_proto_rawDescData) + }) + return file_info_ntpsources_proto_rawDescData +} + +var file_info_ntpsources_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_info_ntpsources_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_info_ntpsources_proto_goTypes = []interface{}{ + (NTPPeerStateType)(0), // 0: org.lfedge.eve.info.NTPPeerStateType + (NTPPeerFlagBitmap)(0), // 1: org.lfedge.eve.info.NTPPeerFlagBitmap + (*NTPPeer)(nil), // 2: org.lfedge.eve.info.NTPPeer + (*ZInfoNTPSources)(nil), // 3: org.lfedge.eve.info.ZInfoNTPSources + (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp +} +var file_info_ntpsources_proto_depIdxs = []int32{ + 0, // 0: org.lfedge.eve.info.NTPPeer.state:type_name -> org.lfedge.eve.info.NTPPeerStateType + 4, // 1: org.lfedge.eve.info.NTPPeer.ref_time:type_name -> google.protobuf.Timestamp + 2, // 2: org.lfedge.eve.info.ZInfoNTPSources.ntp_peers:type_name -> org.lfedge.eve.info.NTPPeer + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_info_ntpsources_proto_init() } +func file_info_ntpsources_proto_init() { + if File_info_ntpsources_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_info_ntpsources_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NTPPeer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_info_ntpsources_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ZInfoNTPSources); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_info_ntpsources_proto_rawDesc, + NumEnums: 2, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_info_ntpsources_proto_goTypes, + DependencyIndexes: file_info_ntpsources_proto_depIdxs, + EnumInfos: file_info_ntpsources_proto_enumTypes, + MessageInfos: file_info_ntpsources_proto_msgTypes, + }.Build() + File_info_ntpsources_proto = out.File + file_info_ntpsources_proto_rawDesc = nil + file_info_ntpsources_proto_goTypes = nil + file_info_ntpsources_proto_depIdxs = nil +} diff --git a/python/info/ntpsources_pb2.py b/python/info/ntpsources_pb2.py new file mode 100644 index 00000000..1de5366a --- /dev/null +++ b/python/info/ntpsources_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: info/ntpsources.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15info/ntpsources.proto\x12\x13org.lfedge.eve.info\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd0\x03\n\x07NTPPeer\x12\x15\n\rauthenticated\x18\x01 \x01(\x08\x12\x11\n\treachable\x18\x02 \x01(\x08\x12\x14\n\x0creachability\x18\x03 \x01(\r\x12\x34\n\x05state\x18\x04 \x01(\x0e\x32%.org.lfedge.eve.info.NTPPeerStateType\x12\x10\n\x08hostname\x18\x05 \x01(\t\x12\x10\n\x08src_addr\x18\x06 \x01(\t\x12\x10\n\x08src_port\x18\x07 \x01(\r\x12\x10\n\x08\x64st_addr\x18\x08 \x01(\t\x12\x10\n\x08\x64st_port\x18\t \x01(\r\x12\x0c\n\x04leap\x18\n \x01(\r\x12\x0f\n\x07stratum\x18\x0b \x01(\r\x12\x11\n\tprecision\x18\x0c \x01(\r\x12\x0e\n\x06ref_id\x18\r \x01(\t\x12,\n\x08ref_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04poll\x18\x0f \x01(\x11\x12\r\n\x05\x66lags\x18\x10 \x01(\r\x12\x0e\n\x06offset\x18\x11 \x01(\x01\x12\r\n\x05\x64\x65lay\x18\x12 \x01(\x01\x12\x12\n\ndispersion\x18\x13 \x01(\x01\x12\x0e\n\x06jitter\x18\x14 \x01(\x01\x12\x12\n\nroot_delay\x18\x15 \x01(\x01\x12\x11\n\troot_disp\x18\x16 \x01(\x01\"B\n\x0fZInfoNTPSources\x12/\n\tntp_peers\x18\x01 \x03(\x0b\x32\x1c.org.lfedge.eve.info.NTPPeer*\xbd\x01\n\x10NTPPeerStateType\x12\x17\n\x13NTP_PEER_STATE_SYNC\x10\x00\x12\x1a\n\x16NTP_PEER_STATE_UNREACH\x10\x01\x12\x1e\n\x1aNTP_PEER_STATE_FALSETICKER\x10\x02\x12\x1a\n\x16NTP_PEER_STATE_JITTERY\x10\x03\x12\x1c\n\x18NTP_PEER_STATE_CANDIDATE\x10\x04\x12\x1a\n\x16NTP_PEER_STATE_OUTLIER\x10\x05*\xf2\x02\n\x11NTPPeerFlagBitmap\x12\x1d\n\x19NTP_PEER_PKT_FLAG_UNKNOWN\x10\x00\x12\x19\n\x15NTP_PEER_PKT_FLAG_DUP\x10\x01\x12\x1b\n\x17NTP_PEER_PKT_FLAG_BOGUS\x10\x02\x12\x1d\n\x19NTP_PEER_PKT_FLAG_INVALID\x10\x04\x12\x1a\n\x16NTP_PEER_PKT_FLAG_AUTH\x10\x08\x12\x1d\n\x19NTP_PEER_PKT_FLAG_STRATUM\x10\x10\x12\x1c\n\x18NTP_PEER_PKT_FLAG_HEADER\x10 \x12\x1f\n\x1bNTP_PEER_TST_FLAG_MAX_DELAY\x10@\x12\"\n\x1dNTP_PEER_TST_FLAG_DELAY_RATIO\x10\x80\x01\x12\'\n\"NTP_PEER_TST_FLAG_DELAY_DEV_RATION\x10\x80\x02\x12 \n\x1bNTP_PEER_TST_FLAG_SYNC_LOOP\x10\x80\x04\x42\x39\n\x13org.lfedge.eve.infoZ\"github.com/lf-edge/eve-api/go/infob\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'info.ntpsources_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\023org.lfedge.eve.infoZ\"github.com/lf-edge/eve-api/go/info' + _globals['_NTPPEERSTATETYPE']._serialized_start=615 + _globals['_NTPPEERSTATETYPE']._serialized_end=804 + _globals['_NTPPEERFLAGBITMAP']._serialized_start=807 + _globals['_NTPPEERFLAGBITMAP']._serialized_end=1177 + _globals['_NTPPEER']._serialized_start=80 + _globals['_NTPPEER']._serialized_end=544 + _globals['_ZINFONTPSOURCES']._serialized_start=546 + _globals['_ZINFONTPSOURCES']._serialized_end=612 +# @@protoc_insertion_point(module_scope)