diff --git a/cmd/ris/api/ris.pb.go b/cmd/ris/api/ris.pb.go index f8fc098c..ded5d706 100644 --- a/cmd/ris/api/ris.pb.go +++ b/cmd/ris/api/ris.pb.go @@ -955,6 +955,115 @@ func (x *GetRoutersResponse) GetRouters() []*Router { return nil } +type ObserveRoutersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ObserveRoutersRequest) Reset() { + *x = ObserveRoutersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cmd_ris_api_ris_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ObserveRoutersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ObserveRoutersRequest) ProtoMessage() {} + +func (x *ObserveRoutersRequest) ProtoReflect() protoreflect.Message { + mi := &file_cmd_ris_api_ris_proto_msgTypes[14] + 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 ObserveRoutersRequest.ProtoReflect.Descriptor instead. +func (*ObserveRoutersRequest) Descriptor() ([]byte, []int) { + return file_cmd_ris_api_ris_proto_rawDescGZIP(), []int{14} +} + +type RouterUpdate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Advertisement bool `protobuf:"varint,1,opt,name=advertisement,proto3" json:"advertisement,omitempty"` + Router *Router `protobuf:"bytes,2,opt,name=router,proto3" json:"router,omitempty"` + IsGone bool `protobuf:"varint,3,opt,name=is_gone,json=isGone,proto3" json:"is_gone,omitempty"` + IsInitialDump bool `protobuf:"varint,4,opt,name=is_initial_dump,json=isInitialDump,proto3" json:"is_initial_dump,omitempty"` +} + +func (x *RouterUpdate) Reset() { + *x = RouterUpdate{} + if protoimpl.UnsafeEnabled { + mi := &file_cmd_ris_api_ris_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RouterUpdate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RouterUpdate) ProtoMessage() {} + +func (x *RouterUpdate) ProtoReflect() protoreflect.Message { + mi := &file_cmd_ris_api_ris_proto_msgTypes[15] + 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 RouterUpdate.ProtoReflect.Descriptor instead. +func (*RouterUpdate) Descriptor() ([]byte, []int) { + return file_cmd_ris_api_ris_proto_rawDescGZIP(), []int{15} +} + +func (x *RouterUpdate) GetAdvertisement() bool { + if x != nil { + return x.Advertisement + } + return false +} + +func (x *RouterUpdate) GetRouter() *Router { + if x != nil { + return x.Router + } + return nil +} + +func (x *RouterUpdate) GetIsGone() bool { + if x != nil { + return x.IsGone + } + return false +} + +func (x *RouterUpdate) GetIsInitialDump() bool { + if x != nil { + return x.IsInitialDump + } + return false +} + var File_cmd_ris_api_ris_proto protoreflect.FileDescriptor var file_cmd_ris_api_ris_proto_rawDesc = []byte{ @@ -1056,35 +1165,52 @@ var file_cmd_ris_api_ris_proto_rawDesc = []byte{ 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x69, 0x6f, 0x2e, 0x72, 0x69, 0x73, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, - 0x52, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x32, 0x8f, 0x03, 0x0a, 0x19, 0x52, 0x6f, - 0x75, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x03, 0x4c, 0x50, 0x4d, 0x12, 0x13, - 0x2e, 0x62, 0x69, 0x6f, 0x2e, 0x72, 0x69, 0x73, 0x2e, 0x4c, 0x50, 0x4d, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x69, 0x6f, 0x2e, 0x72, 0x69, 0x73, 0x2e, 0x4c, 0x50, - 0x4d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x03, 0x47, - 0x65, 0x74, 0x12, 0x13, 0x2e, 0x62, 0x69, 0x6f, 0x2e, 0x72, 0x69, 0x73, 0x2e, 0x47, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x69, 0x6f, 0x2e, 0x72, 0x69, - 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x47, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x2e, - 0x62, 0x69, 0x6f, 0x2e, 0x72, 0x69, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x69, 0x6f, 0x2e, - 0x72, 0x69, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4c, - 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x12, 0x19, 0x2e, 0x62, 0x69, 0x6f, 0x2e, 0x72, 0x69, 0x73, 0x2e, - 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1a, 0x2e, 0x62, 0x69, 0x6f, 0x2e, 0x72, 0x69, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, - 0x6e, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3e, - 0x0a, 0x0a, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x49, 0x42, 0x12, 0x1a, 0x2e, 0x62, - 0x69, 0x6f, 0x2e, 0x72, 0x69, 0x73, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x49, - 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x62, 0x69, 0x6f, 0x2e, 0x72, - 0x69, 0x73, 0x2e, 0x52, 0x49, 0x42, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x30, 0x01, 0x12, 0x3b, - 0x0a, 0x07, 0x44, 0x75, 0x6d, 0x70, 0x52, 0x49, 0x42, 0x12, 0x17, 0x2e, 0x62, 0x69, 0x6f, 0x2e, - 0x72, 0x69, 0x73, 0x2e, 0x44, 0x75, 0x6d, 0x70, 0x52, 0x49, 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x69, 0x6f, 0x2e, 0x72, 0x69, 0x73, 0x2e, 0x44, 0x75, 0x6d, - 0x70, 0x52, 0x49, 0x42, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x30, 0x01, 0x42, 0x2b, 0x5a, 0x29, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x69, 0x6f, 0x2d, 0x72, 0x6f, - 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x62, 0x69, 0x6f, 0x2d, 0x72, 0x64, 0x2f, 0x63, 0x6d, 0x64, - 0x2f, 0x72, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x22, 0x17, 0x0a, 0x15, 0x4f, 0x62, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x9e, 0x01, 0x0a, 0x0c, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x61, 0x64, 0x76, 0x65, + 0x72, 0x74, 0x69, 0x73, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x06, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x69, 0x6f, 0x2e, + 0x72, 0x69, 0x73, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x67, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x47, 0x6f, 0x6e, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x69, + 0x73, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x44, + 0x75, 0x6d, 0x70, 0x32, 0xda, 0x03, 0x0a, 0x19, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x49, + 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x32, 0x0a, 0x03, 0x4c, 0x50, 0x4d, 0x12, 0x13, 0x2e, 0x62, 0x69, 0x6f, 0x2e, 0x72, + 0x69, 0x73, 0x2e, 0x4c, 0x50, 0x4d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, + 0x62, 0x69, 0x6f, 0x2e, 0x72, 0x69, 0x73, 0x2e, 0x4c, 0x50, 0x4d, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x13, 0x2e, 0x62, + 0x69, 0x6f, 0x2e, 0x72, 0x69, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x69, 0x6f, 0x2e, 0x72, 0x69, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0a, 0x47, 0x65, 0x74, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x2e, 0x62, 0x69, 0x6f, 0x2e, 0x72, 0x69, + 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x69, 0x6f, 0x2e, 0x72, 0x69, 0x73, 0x2e, 0x47, 0x65, + 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x44, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x12, + 0x19, 0x2e, 0x62, 0x69, 0x6f, 0x2e, 0x72, 0x69, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6e, + 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x62, 0x69, 0x6f, + 0x2e, 0x72, 0x69, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0a, 0x4f, 0x62, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x52, 0x49, 0x42, 0x12, 0x1a, 0x2e, 0x62, 0x69, 0x6f, 0x2e, 0x72, 0x69, 0x73, + 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x49, 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x62, 0x69, 0x6f, 0x2e, 0x72, 0x69, 0x73, 0x2e, 0x52, 0x49, 0x42, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x30, 0x01, 0x12, 0x3b, 0x0a, 0x07, 0x44, 0x75, 0x6d, 0x70, + 0x52, 0x49, 0x42, 0x12, 0x17, 0x2e, 0x62, 0x69, 0x6f, 0x2e, 0x72, 0x69, 0x73, 0x2e, 0x44, 0x75, + 0x6d, 0x70, 0x52, 0x49, 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, + 0x69, 0x6f, 0x2e, 0x72, 0x69, 0x73, 0x2e, 0x44, 0x75, 0x6d, 0x70, 0x52, 0x49, 0x42, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x30, 0x01, 0x12, 0x49, 0x0a, 0x0e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1e, 0x2e, 0x62, 0x69, 0x6f, 0x2e, 0x72, 0x69, + 0x73, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x69, 0x6f, 0x2e, 0x72, 0x69, + 0x73, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x30, 0x01, + 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, + 0x69, 0x6f, 0x2d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x62, 0x69, 0x6f, 0x2d, 0x72, + 0x64, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x72, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1100,7 +1226,7 @@ func file_cmd_ris_api_ris_proto_rawDescGZIP() []byte { } var file_cmd_ris_api_ris_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_cmd_ris_api_ris_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_cmd_ris_api_ris_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_cmd_ris_api_ris_proto_goTypes = []interface{}{ (ObserveRIBRequest_AFISAFI)(0), // 0: bio.ris.ObserveRIBRequest.AFISAFI (DumpRIBRequest_AFISAFI)(0), // 1: bio.ris.DumpRIBRequest.AFISAFI @@ -1118,39 +1244,44 @@ var file_cmd_ris_api_ris_proto_goTypes = []interface{}{ (*GetRoutersRequest)(nil), // 13: bio.ris.GetRoutersRequest (*Router)(nil), // 14: bio.ris.Router (*GetRoutersResponse)(nil), // 15: bio.ris.GetRoutersResponse - (*api.Prefix)(nil), // 16: bio.net.Prefix - (*api1.Route)(nil), // 17: bio.route.Route + (*ObserveRoutersRequest)(nil), // 16: bio.ris.ObserveRoutersRequest + (*RouterUpdate)(nil), // 17: bio.ris.RouterUpdate + (*api.Prefix)(nil), // 18: bio.net.Prefix + (*api1.Route)(nil), // 19: bio.route.Route } var file_cmd_ris_api_ris_proto_depIdxs = []int32{ - 16, // 0: bio.ris.LPMRequest.pfx:type_name -> bio.net.Prefix - 17, // 1: bio.ris.LPMResponse.routes:type_name -> bio.route.Route - 16, // 2: bio.ris.GetRequest.pfx:type_name -> bio.net.Prefix - 17, // 3: bio.ris.GetResponse.routes:type_name -> bio.route.Route - 16, // 4: bio.ris.GetLongerRequest.pfx:type_name -> bio.net.Prefix - 17, // 5: bio.ris.GetLongerResponse.routes:type_name -> bio.route.Route + 18, // 0: bio.ris.LPMRequest.pfx:type_name -> bio.net.Prefix + 19, // 1: bio.ris.LPMResponse.routes:type_name -> bio.route.Route + 18, // 2: bio.ris.GetRequest.pfx:type_name -> bio.net.Prefix + 19, // 3: bio.ris.GetResponse.routes:type_name -> bio.route.Route + 18, // 4: bio.ris.GetLongerRequest.pfx:type_name -> bio.net.Prefix + 19, // 5: bio.ris.GetLongerResponse.routes:type_name -> bio.route.Route 0, // 6: bio.ris.ObserveRIBRequest.afisafi:type_name -> bio.ris.ObserveRIBRequest.AFISAFI - 17, // 7: bio.ris.RIBUpdate.route:type_name -> bio.route.Route + 19, // 7: bio.ris.RIBUpdate.route:type_name -> bio.route.Route 1, // 8: bio.ris.DumpRIBRequest.afisafi:type_name -> bio.ris.DumpRIBRequest.AFISAFI 9, // 9: bio.ris.DumpRIBRequest.filter:type_name -> bio.ris.RIBFilter - 17, // 10: bio.ris.DumpRIBReply.route:type_name -> bio.route.Route + 19, // 10: bio.ris.DumpRIBReply.route:type_name -> bio.route.Route 14, // 11: bio.ris.GetRoutersResponse.routers:type_name -> bio.ris.Router - 2, // 12: bio.ris.RoutingInformationService.LPM:input_type -> bio.ris.LPMRequest - 4, // 13: bio.ris.RoutingInformationService.Get:input_type -> bio.ris.GetRequest - 13, // 14: bio.ris.RoutingInformationService.GetRouters:input_type -> bio.ris.GetRoutersRequest - 6, // 15: bio.ris.RoutingInformationService.GetLonger:input_type -> bio.ris.GetLongerRequest - 8, // 16: bio.ris.RoutingInformationService.ObserveRIB:input_type -> bio.ris.ObserveRIBRequest - 11, // 17: bio.ris.RoutingInformationService.DumpRIB:input_type -> bio.ris.DumpRIBRequest - 3, // 18: bio.ris.RoutingInformationService.LPM:output_type -> bio.ris.LPMResponse - 5, // 19: bio.ris.RoutingInformationService.Get:output_type -> bio.ris.GetResponse - 15, // 20: bio.ris.RoutingInformationService.GetRouters:output_type -> bio.ris.GetRoutersResponse - 7, // 21: bio.ris.RoutingInformationService.GetLonger:output_type -> bio.ris.GetLongerResponse - 10, // 22: bio.ris.RoutingInformationService.ObserveRIB:output_type -> bio.ris.RIBUpdate - 12, // 23: bio.ris.RoutingInformationService.DumpRIB:output_type -> bio.ris.DumpRIBReply - 18, // [18:24] is the sub-list for method output_type - 12, // [12:18] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name + 14, // 12: bio.ris.RouterUpdate.router:type_name -> bio.ris.Router + 2, // 13: bio.ris.RoutingInformationService.LPM:input_type -> bio.ris.LPMRequest + 4, // 14: bio.ris.RoutingInformationService.Get:input_type -> bio.ris.GetRequest + 13, // 15: bio.ris.RoutingInformationService.GetRouters:input_type -> bio.ris.GetRoutersRequest + 6, // 16: bio.ris.RoutingInformationService.GetLonger:input_type -> bio.ris.GetLongerRequest + 8, // 17: bio.ris.RoutingInformationService.ObserveRIB:input_type -> bio.ris.ObserveRIBRequest + 11, // 18: bio.ris.RoutingInformationService.DumpRIB:input_type -> bio.ris.DumpRIBRequest + 16, // 19: bio.ris.RoutingInformationService.ObserveRouters:input_type -> bio.ris.ObserveRoutersRequest + 3, // 20: bio.ris.RoutingInformationService.LPM:output_type -> bio.ris.LPMResponse + 5, // 21: bio.ris.RoutingInformationService.Get:output_type -> bio.ris.GetResponse + 15, // 22: bio.ris.RoutingInformationService.GetRouters:output_type -> bio.ris.GetRoutersResponse + 7, // 23: bio.ris.RoutingInformationService.GetLonger:output_type -> bio.ris.GetLongerResponse + 10, // 24: bio.ris.RoutingInformationService.ObserveRIB:output_type -> bio.ris.RIBUpdate + 12, // 25: bio.ris.RoutingInformationService.DumpRIB:output_type -> bio.ris.DumpRIBReply + 17, // 26: bio.ris.RoutingInformationService.ObserveRouters:output_type -> bio.ris.RouterUpdate + 20, // [20:27] is the sub-list for method output_type + 13, // [13:20] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_cmd_ris_api_ris_proto_init() } @@ -1327,6 +1458,30 @@ func file_cmd_ris_api_ris_proto_init() { return nil } } + file_cmd_ris_api_ris_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveRoutersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cmd_ris_api_ris_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RouterUpdate); 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{ @@ -1334,7 +1489,7 @@ func file_cmd_ris_api_ris_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cmd_ris_api_ris_proto_rawDesc, NumEnums: 2, - NumMessages: 14, + NumMessages: 16, NumExtensions: 0, NumServices: 1, }, diff --git a/cmd/ris/api/ris.proto b/cmd/ris/api/ris.proto index ee59870f..d3aed645 100644 --- a/cmd/ris/api/ris.proto +++ b/cmd/ris/api/ris.proto @@ -13,6 +13,7 @@ service RoutingInformationService { rpc GetLonger(GetLongerRequest) returns (GetLongerResponse) {}; rpc ObserveRIB(ObserveRIBRequest) returns (stream RIBUpdate); rpc DumpRIB(DumpRIBRequest) returns (stream DumpRIBReply); + rpc ObserveRouters(ObserveRoutersRequest) returns (stream RouterUpdate); } message LPMRequest { @@ -104,3 +105,13 @@ message GetRoutersResponse { repeated Router routers = 1; } +message ObserveRoutersRequest { + +} + +message RouterUpdate { + bool advertisement = 1; + Router router = 2; + bool is_gone = 3; + bool is_initial_dump = 4; +} \ No newline at end of file diff --git a/cmd/ris/api/ris_grpc.pb.go b/cmd/ris/api/ris_grpc.pb.go index 20fc7e7b..92c317a4 100644 --- a/cmd/ris/api/ris_grpc.pb.go +++ b/cmd/ris/api/ris_grpc.pb.go @@ -24,6 +24,7 @@ type RoutingInformationServiceClient interface { GetLonger(ctx context.Context, in *GetLongerRequest, opts ...grpc.CallOption) (*GetLongerResponse, error) ObserveRIB(ctx context.Context, in *ObserveRIBRequest, opts ...grpc.CallOption) (RoutingInformationService_ObserveRIBClient, error) DumpRIB(ctx context.Context, in *DumpRIBRequest, opts ...grpc.CallOption) (RoutingInformationService_DumpRIBClient, error) + ObserveRouters(ctx context.Context, in *ObserveRoutersRequest, opts ...grpc.CallOption) (RoutingInformationService_ObserveRoutersClient, error) } type routingInformationServiceClient struct { @@ -134,6 +135,38 @@ func (x *routingInformationServiceDumpRIBClient) Recv() (*DumpRIBReply, error) { return m, nil } +func (c *routingInformationServiceClient) ObserveRouters(ctx context.Context, in *ObserveRoutersRequest, opts ...grpc.CallOption) (RoutingInformationService_ObserveRoutersClient, error) { + stream, err := c.cc.NewStream(ctx, &RoutingInformationService_ServiceDesc.Streams[2], "/bio.ris.RoutingInformationService/ObserveRouters", opts...) + if err != nil { + return nil, err + } + x := &routingInformationServiceObserveRoutersClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type RoutingInformationService_ObserveRoutersClient interface { + Recv() (*RouterUpdate, error) + grpc.ClientStream +} + +type routingInformationServiceObserveRoutersClient struct { + grpc.ClientStream +} + +func (x *routingInformationServiceObserveRoutersClient) Recv() (*RouterUpdate, error) { + m := new(RouterUpdate) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + // RoutingInformationServiceServer is the server API for RoutingInformationService service. // All implementations must embed UnimplementedRoutingInformationServiceServer // for forward compatibility @@ -144,6 +177,7 @@ type RoutingInformationServiceServer interface { GetLonger(context.Context, *GetLongerRequest) (*GetLongerResponse, error) ObserveRIB(*ObserveRIBRequest, RoutingInformationService_ObserveRIBServer) error DumpRIB(*DumpRIBRequest, RoutingInformationService_DumpRIBServer) error + ObserveRouters(*ObserveRoutersRequest, RoutingInformationService_ObserveRoutersServer) error mustEmbedUnimplementedRoutingInformationServiceServer() } @@ -169,6 +203,9 @@ func (UnimplementedRoutingInformationServiceServer) ObserveRIB(*ObserveRIBReques func (UnimplementedRoutingInformationServiceServer) DumpRIB(*DumpRIBRequest, RoutingInformationService_DumpRIBServer) error { return status.Errorf(codes.Unimplemented, "method DumpRIB not implemented") } +func (UnimplementedRoutingInformationServiceServer) ObserveRouters(*ObserveRoutersRequest, RoutingInformationService_ObserveRoutersServer) error { + return status.Errorf(codes.Unimplemented, "method ObserveRouters not implemented") +} func (UnimplementedRoutingInformationServiceServer) mustEmbedUnimplementedRoutingInformationServiceServer() { } @@ -297,6 +334,27 @@ func (x *routingInformationServiceDumpRIBServer) Send(m *DumpRIBReply) error { return x.ServerStream.SendMsg(m) } +func _RoutingInformationService_ObserveRouters_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ObserveRoutersRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(RoutingInformationServiceServer).ObserveRouters(m, &routingInformationServiceObserveRoutersServer{stream}) +} + +type RoutingInformationService_ObserveRoutersServer interface { + Send(*RouterUpdate) error + grpc.ServerStream +} + +type routingInformationServiceObserveRoutersServer struct { + grpc.ServerStream +} + +func (x *routingInformationServiceObserveRoutersServer) Send(m *RouterUpdate) error { + return x.ServerStream.SendMsg(m) +} + // RoutingInformationService_ServiceDesc is the grpc.ServiceDesc for RoutingInformationService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -332,6 +390,11 @@ var RoutingInformationService_ServiceDesc = grpc.ServiceDesc{ Handler: _RoutingInformationService_DumpRIB_Handler, ServerStreams: true, }, + { + StreamName: "ObserveRouters", + Handler: _RoutingInformationService_ObserveRouters_Handler, + ServerStreams: true, + }, }, Metadata: "cmd/ris/api/ris.proto", }