diff --git a/pkg/apis/gateway.pb.go b/pkg/apis/gateway.pb.go new file mode 100644 index 0000000..7fc5696 --- /dev/null +++ b/pkg/apis/gateway.pb.go @@ -0,0 +1,1132 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: gateway.proto + +package apis + +import ( + context "context" + fmt "fmt" + proto "github.com/golang/protobuf/proto" + any "github.com/golang/protobuf/ptypes/any" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// EndpointType defines supported endpoints' types +type EndpointType int32 + +const ( + EndpointType_UNKNOWN EndpointType = 0 + EndpointType_IPV4 EndpointType = 1 + EndpointType_IPV6 EndpointType = 2 + EndpointType_SID EndpointType = 3 +) + +var EndpointType_name = map[int32]string{ + 0: "UNKNOWN", + 1: "IPV4", + 2: "IPV6", + 3: "SID", +} + +var EndpointType_value = map[string]int32{ + "UNKNOWN": 0, + "IPV4": 1, + "IPV6": 2, + "SID": 3, +} + +func (x EndpointType) String() string { + return proto.EnumName(EndpointType_name, int32(x)) +} + +func (EndpointType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{0} +} + +// Errors defines error codes which a gateway can return to a client +type GatewayErrors int32 + +const ( + GatewayErrors_OK GatewayErrors = 0 + // Returned when a gateway encountered a generic error + GatewayErrors_EIO GatewayErrors = 1 + // Returned when request key does not exist + GatewayErrors_ENOENT GatewayErrors = 2 + // Returned when an operation triggered by the client's requested timed out + // and was canceled + GatewayErrors_ETIMEDOUT GatewayErrors = 3 + // Returned when a gateway cannot reach a DB host + GatewayErrors_EHOSTDOWN GatewayErrors = 4 +) + +var GatewayErrors_name = map[int32]string{ + 0: "OK", + 1: "EIO", + 2: "ENOENT", + 3: "ETIMEDOUT", + 4: "EHOSTDOWN", +} + +var GatewayErrors_value = map[string]int32{ + "OK": 0, + "EIO": 1, + "ENOENT": 2, + "ETIMEDOUT": 3, + "EHOSTDOWN": 4, +} + +func (x GatewayErrors) String() string { + return proto.EnumName(GatewayErrors_name, int32(x)) +} + +func (GatewayErrors) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{1} +} + +// endpoint is an object defining a source or a destination of a communication +// path. The type of the endpoint is defined by EndpointType, it can be ipv4, +// ipv6 addresses or segment routing SIDs etc. The list of supported endpoint +// types may be extended in future. The address of endpoint is stored in a slice +// of bytes and should be decoded according to the endpoint type. +type Endpoint struct { + Type EndpointType `protobuf:"varint,1,opt,name=type,proto3,enum=apis.EndpointType" json:"type,omitempty"` + Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Endpoint) Reset() { *m = Endpoint{} } +func (m *Endpoint) String() string { return proto.CompactTextString(m) } +func (*Endpoint) ProtoMessage() {} +func (*Endpoint) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{0} +} + +func (m *Endpoint) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Endpoint.Unmarshal(m, b) +} +func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Endpoint.Marshal(b, m, deterministic) +} +func (m *Endpoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_Endpoint.Merge(m, src) +} +func (m *Endpoint) XXX_Size() int { + return xxx_messageInfo_Endpoint.Size(m) +} +func (m *Endpoint) XXX_DiscardUnknown() { + xxx_messageInfo_Endpoint.DiscardUnknown(m) +} + +var xxx_messageInfo_Endpoint proto.InternalMessageInfo + +func (m *Endpoint) GetType() EndpointType { + if m != nil { + return m.Type + } + return EndpointType_UNKNOWN +} + +func (m *Endpoint) GetAddress() []byte { + if m != nil { + return m.Address + } + return nil +} + +// latency defines one of available QoE metrics +// value expresses latency value in milliseconds. +// variation expresses percent of the acceptable variation from value. +type Latency struct { + Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + Variation int32 `protobuf:"varint,2,opt,name=variation,proto3" json:"variation,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Latency) Reset() { *m = Latency{} } +func (m *Latency) String() string { return proto.CompactTextString(m) } +func (*Latency) ProtoMessage() {} +func (*Latency) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{1} +} + +func (m *Latency) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Latency.Unmarshal(m, b) +} +func (m *Latency) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Latency.Marshal(b, m, deterministic) +} +func (m *Latency) XXX_Merge(src proto.Message) { + xxx_messageInfo_Latency.Merge(m, src) +} +func (m *Latency) XXX_Size() int { + return xxx_messageInfo_Latency.Size(m) +} +func (m *Latency) XXX_DiscardUnknown() { + xxx_messageInfo_Latency.DiscardUnknown(m) +} + +var xxx_messageInfo_Latency proto.InternalMessageInfo + +func (m *Latency) GetValue() int32 { + if m != nil { + return m.Value + } + return 0 +} + +func (m *Latency) GetVariation() int32 { + if m != nil { + return m.Variation + } + return 0 +} + +// qoe_parameters defines a list of QoE parameters a client can request. +// Currently only latency is supported. +type QoeParameters struct { + Latency *Latency `protobuf:"bytes,1,opt,name=latency,proto3" json:"latency,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *QoeParameters) Reset() { *m = QoeParameters{} } +func (m *QoeParameters) String() string { return proto.CompactTextString(m) } +func (*QoeParameters) ProtoMessage() {} +func (*QoeParameters) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{2} +} + +func (m *QoeParameters) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_QoeParameters.Unmarshal(m, b) +} +func (m *QoeParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_QoeParameters.Marshal(b, m, deterministic) +} +func (m *QoeParameters) XXX_Merge(src proto.Message) { + xxx_messageInfo_QoeParameters.Merge(m, src) +} +func (m *QoeParameters) XXX_Size() int { + return xxx_messageInfo_QoeParameters.Size(m) +} +func (m *QoeParameters) XXX_DiscardUnknown() { + xxx_messageInfo_QoeParameters.DiscardUnknown(m) +} + +var xxx_messageInfo_QoeParameters proto.InternalMessageInfo + +func (m *QoeParameters) GetLatency() *Latency { + if m != nil { + return m.Latency + } + return nil +} + +type Qoe struct { + Src *Endpoint `protobuf:"bytes,1,opt,name=src,proto3" json:"src,omitempty"` + Dst *Endpoint `protobuf:"bytes,2,opt,name=dst,proto3" json:"dst,omitempty"` + Qoe *QoeParameters `protobuf:"bytes,3,opt,name=qoe,proto3" json:"qoe,omitempty"` + Label []uint32 `protobuf:"varint,4,rep,packed,name=label,proto3" json:"label,omitempty"` + Err GatewayErrors `protobuf:"varint,5,opt,name=err,proto3,enum=apis.GatewayErrors" json:"err,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Qoe) Reset() { *m = Qoe{} } +func (m *Qoe) String() string { return proto.CompactTextString(m) } +func (*Qoe) ProtoMessage() {} +func (*Qoe) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{3} +} + +func (m *Qoe) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Qoe.Unmarshal(m, b) +} +func (m *Qoe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Qoe.Marshal(b, m, deterministic) +} +func (m *Qoe) XXX_Merge(src proto.Message) { + xxx_messageInfo_Qoe.Merge(m, src) +} +func (m *Qoe) XXX_Size() int { + return xxx_messageInfo_Qoe.Size(m) +} +func (m *Qoe) XXX_DiscardUnknown() { + xxx_messageInfo_Qoe.DiscardUnknown(m) +} + +var xxx_messageInfo_Qoe proto.InternalMessageInfo + +func (m *Qoe) GetSrc() *Endpoint { + if m != nil { + return m.Src + } + return nil +} + +func (m *Qoe) GetDst() *Endpoint { + if m != nil { + return m.Dst + } + return nil +} + +func (m *Qoe) GetQoe() *QoeParameters { + if m != nil { + return m.Qoe + } + return nil +} + +func (m *Qoe) GetLabel() []uint32 { + if m != nil { + return m.Label + } + return nil +} + +func (m *Qoe) GetErr() GatewayErrors { + if m != nil { + return m.Err + } + return GatewayErrors_OK +} + +// RequestQoE defines the rpc message sent by the client to the gateway. +// Multiple Src/Dst/QoE are supported in a single request. +type RequestQoE struct { + Qoes map[int32]*Qoe `protobuf:"bytes,1,rep,name=qoes,proto3" json:"qoes,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RequestQoE) Reset() { *m = RequestQoE{} } +func (m *RequestQoE) String() string { return proto.CompactTextString(m) } +func (*RequestQoE) ProtoMessage() {} +func (*RequestQoE) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{4} +} + +func (m *RequestQoE) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RequestQoE.Unmarshal(m, b) +} +func (m *RequestQoE) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RequestQoE.Marshal(b, m, deterministic) +} +func (m *RequestQoE) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestQoE.Merge(m, src) +} +func (m *RequestQoE) XXX_Size() int { + return xxx_messageInfo_RequestQoE.Size(m) +} +func (m *RequestQoE) XXX_DiscardUnknown() { + xxx_messageInfo_RequestQoE.DiscardUnknown(m) +} + +var xxx_messageInfo_RequestQoE proto.InternalMessageInfo + +func (m *RequestQoE) GetQoes() map[int32]*Qoe { + if m != nil { + return m.Qoes + } + return nil +} + +// ResponseQoE defines the rpc message sent as a reply to the client. +// it is the same message as request, but the gateway populates labels and +// err for each qoe. +type ResponseQoE struct { + Qoes map[int32]*Qoe `protobuf:"bytes,1,rep,name=qoes,proto3" json:"qoes,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResponseQoE) Reset() { *m = ResponseQoE{} } +func (m *ResponseQoE) String() string { return proto.CompactTextString(m) } +func (*ResponseQoE) ProtoMessage() {} +func (*ResponseQoE) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{5} +} + +func (m *ResponseQoE) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ResponseQoE.Unmarshal(m, b) +} +func (m *ResponseQoE) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ResponseQoE.Marshal(b, m, deterministic) +} +func (m *ResponseQoE) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseQoE.Merge(m, src) +} +func (m *ResponseQoE) XXX_Size() int { + return xxx_messageInfo_ResponseQoE.Size(m) +} +func (m *ResponseQoE) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseQoE.DiscardUnknown(m) +} + +var xxx_messageInfo_ResponseQoE proto.InternalMessageInfo + +func (m *ResponseQoE) GetQoes() map[int32]*Qoe { + if m != nil { + return m.Qoes + } + return nil +} + +type RouteDistinguisherTwoOctetAS struct { + Admin uint32 `protobuf:"varint,1,opt,name=admin,proto3" json:"admin,omitempty"` + Assigned uint32 `protobuf:"varint,2,opt,name=assigned,proto3" json:"assigned,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RouteDistinguisherTwoOctetAS) Reset() { *m = RouteDistinguisherTwoOctetAS{} } +func (m *RouteDistinguisherTwoOctetAS) String() string { return proto.CompactTextString(m) } +func (*RouteDistinguisherTwoOctetAS) ProtoMessage() {} +func (*RouteDistinguisherTwoOctetAS) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{6} +} + +func (m *RouteDistinguisherTwoOctetAS) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteDistinguisherTwoOctetAS.Unmarshal(m, b) +} +func (m *RouteDistinguisherTwoOctetAS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteDistinguisherTwoOctetAS.Marshal(b, m, deterministic) +} +func (m *RouteDistinguisherTwoOctetAS) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteDistinguisherTwoOctetAS.Merge(m, src) +} +func (m *RouteDistinguisherTwoOctetAS) XXX_Size() int { + return xxx_messageInfo_RouteDistinguisherTwoOctetAS.Size(m) +} +func (m *RouteDistinguisherTwoOctetAS) XXX_DiscardUnknown() { + xxx_messageInfo_RouteDistinguisherTwoOctetAS.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteDistinguisherTwoOctetAS proto.InternalMessageInfo + +func (m *RouteDistinguisherTwoOctetAS) GetAdmin() uint32 { + if m != nil { + return m.Admin + } + return 0 +} + +func (m *RouteDistinguisherTwoOctetAS) GetAssigned() uint32 { + if m != nil { + return m.Assigned + } + return 0 +} + +type RouteDistinguisherIPAddress struct { + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` + Assigned uint32 `protobuf:"varint,2,opt,name=assigned,proto3" json:"assigned,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RouteDistinguisherIPAddress) Reset() { *m = RouteDistinguisherIPAddress{} } +func (m *RouteDistinguisherIPAddress) String() string { return proto.CompactTextString(m) } +func (*RouteDistinguisherIPAddress) ProtoMessage() {} +func (*RouteDistinguisherIPAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{7} +} + +func (m *RouteDistinguisherIPAddress) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteDistinguisherIPAddress.Unmarshal(m, b) +} +func (m *RouteDistinguisherIPAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteDistinguisherIPAddress.Marshal(b, m, deterministic) +} +func (m *RouteDistinguisherIPAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteDistinguisherIPAddress.Merge(m, src) +} +func (m *RouteDistinguisherIPAddress) XXX_Size() int { + return xxx_messageInfo_RouteDistinguisherIPAddress.Size(m) +} +func (m *RouteDistinguisherIPAddress) XXX_DiscardUnknown() { + xxx_messageInfo_RouteDistinguisherIPAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteDistinguisherIPAddress proto.InternalMessageInfo + +func (m *RouteDistinguisherIPAddress) GetAdmin() string { + if m != nil { + return m.Admin + } + return "" +} + +func (m *RouteDistinguisherIPAddress) GetAssigned() uint32 { + if m != nil { + return m.Assigned + } + return 0 +} + +type RouteDistinguisherFourOctetAS struct { + Admin uint32 `protobuf:"varint,1,opt,name=admin,proto3" json:"admin,omitempty"` + Assigned uint32 `protobuf:"varint,2,opt,name=assigned,proto3" json:"assigned,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RouteDistinguisherFourOctetAS) Reset() { *m = RouteDistinguisherFourOctetAS{} } +func (m *RouteDistinguisherFourOctetAS) String() string { return proto.CompactTextString(m) } +func (*RouteDistinguisherFourOctetAS) ProtoMessage() {} +func (*RouteDistinguisherFourOctetAS) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{8} +} + +func (m *RouteDistinguisherFourOctetAS) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteDistinguisherFourOctetAS.Unmarshal(m, b) +} +func (m *RouteDistinguisherFourOctetAS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteDistinguisherFourOctetAS.Marshal(b, m, deterministic) +} +func (m *RouteDistinguisherFourOctetAS) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteDistinguisherFourOctetAS.Merge(m, src) +} +func (m *RouteDistinguisherFourOctetAS) XXX_Size() int { + return xxx_messageInfo_RouteDistinguisherFourOctetAS.Size(m) +} +func (m *RouteDistinguisherFourOctetAS) XXX_DiscardUnknown() { + xxx_messageInfo_RouteDistinguisherFourOctetAS.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteDistinguisherFourOctetAS proto.InternalMessageInfo + +func (m *RouteDistinguisherFourOctetAS) GetAdmin() uint32 { + if m != nil { + return m.Admin + } + return 0 +} + +func (m *RouteDistinguisherFourOctetAS) GetAssigned() uint32 { + if m != nil { + return m.Assigned + } + return 0 +} + +type TwoOctetAsSpecificExtended struct { + IsTransitive bool `protobuf:"varint,1,opt,name=is_transitive,json=isTransitive,proto3" json:"is_transitive,omitempty"` + SubType uint32 `protobuf:"varint,2,opt,name=sub_type,json=subType,proto3" json:"sub_type,omitempty"` + As uint32 `protobuf:"varint,3,opt,name=as,proto3" json:"as,omitempty"` + LocalAdmin uint32 `protobuf:"varint,4,opt,name=local_admin,json=localAdmin,proto3" json:"local_admin,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TwoOctetAsSpecificExtended) Reset() { *m = TwoOctetAsSpecificExtended{} } +func (m *TwoOctetAsSpecificExtended) String() string { return proto.CompactTextString(m) } +func (*TwoOctetAsSpecificExtended) ProtoMessage() {} +func (*TwoOctetAsSpecificExtended) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{9} +} + +func (m *TwoOctetAsSpecificExtended) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TwoOctetAsSpecificExtended.Unmarshal(m, b) +} +func (m *TwoOctetAsSpecificExtended) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TwoOctetAsSpecificExtended.Marshal(b, m, deterministic) +} +func (m *TwoOctetAsSpecificExtended) XXX_Merge(src proto.Message) { + xxx_messageInfo_TwoOctetAsSpecificExtended.Merge(m, src) +} +func (m *TwoOctetAsSpecificExtended) XXX_Size() int { + return xxx_messageInfo_TwoOctetAsSpecificExtended.Size(m) +} +func (m *TwoOctetAsSpecificExtended) XXX_DiscardUnknown() { + xxx_messageInfo_TwoOctetAsSpecificExtended.DiscardUnknown(m) +} + +var xxx_messageInfo_TwoOctetAsSpecificExtended proto.InternalMessageInfo + +func (m *TwoOctetAsSpecificExtended) GetIsTransitive() bool { + if m != nil { + return m.IsTransitive + } + return false +} + +func (m *TwoOctetAsSpecificExtended) GetSubType() uint32 { + if m != nil { + return m.SubType + } + return 0 +} + +func (m *TwoOctetAsSpecificExtended) GetAs() uint32 { + if m != nil { + return m.As + } + return 0 +} + +func (m *TwoOctetAsSpecificExtended) GetLocalAdmin() uint32 { + if m != nil { + return m.LocalAdmin + } + return 0 +} + +type IPv4AddressSpecificExtended struct { + IsTransitive bool `protobuf:"varint,1,opt,name=is_transitive,json=isTransitive,proto3" json:"is_transitive,omitempty"` + SubType uint32 `protobuf:"varint,2,opt,name=sub_type,json=subType,proto3" json:"sub_type,omitempty"` + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` + LocalAdmin uint32 `protobuf:"varint,4,opt,name=local_admin,json=localAdmin,proto3" json:"local_admin,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IPv4AddressSpecificExtended) Reset() { *m = IPv4AddressSpecificExtended{} } +func (m *IPv4AddressSpecificExtended) String() string { return proto.CompactTextString(m) } +func (*IPv4AddressSpecificExtended) ProtoMessage() {} +func (*IPv4AddressSpecificExtended) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{10} +} + +func (m *IPv4AddressSpecificExtended) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IPv4AddressSpecificExtended.Unmarshal(m, b) +} +func (m *IPv4AddressSpecificExtended) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IPv4AddressSpecificExtended.Marshal(b, m, deterministic) +} +func (m *IPv4AddressSpecificExtended) XXX_Merge(src proto.Message) { + xxx_messageInfo_IPv4AddressSpecificExtended.Merge(m, src) +} +func (m *IPv4AddressSpecificExtended) XXX_Size() int { + return xxx_messageInfo_IPv4AddressSpecificExtended.Size(m) +} +func (m *IPv4AddressSpecificExtended) XXX_DiscardUnknown() { + xxx_messageInfo_IPv4AddressSpecificExtended.DiscardUnknown(m) +} + +var xxx_messageInfo_IPv4AddressSpecificExtended proto.InternalMessageInfo + +func (m *IPv4AddressSpecificExtended) GetIsTransitive() bool { + if m != nil { + return m.IsTransitive + } + return false +} + +func (m *IPv4AddressSpecificExtended) GetSubType() uint32 { + if m != nil { + return m.SubType + } + return 0 +} + +func (m *IPv4AddressSpecificExtended) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *IPv4AddressSpecificExtended) GetLocalAdmin() uint32 { + if m != nil { + return m.LocalAdmin + } + return 0 +} + +type FourOctetAsSpecificExtended struct { + IsTransitive bool `protobuf:"varint,1,opt,name=is_transitive,json=isTransitive,proto3" json:"is_transitive,omitempty"` + SubType uint32 `protobuf:"varint,2,opt,name=sub_type,json=subType,proto3" json:"sub_type,omitempty"` + As uint32 `protobuf:"varint,3,opt,name=as,proto3" json:"as,omitempty"` + LocalAdmin uint32 `protobuf:"varint,4,opt,name=local_admin,json=localAdmin,proto3" json:"local_admin,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FourOctetAsSpecificExtended) Reset() { *m = FourOctetAsSpecificExtended{} } +func (m *FourOctetAsSpecificExtended) String() string { return proto.CompactTextString(m) } +func (*FourOctetAsSpecificExtended) ProtoMessage() {} +func (*FourOctetAsSpecificExtended) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{11} +} + +func (m *FourOctetAsSpecificExtended) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FourOctetAsSpecificExtended.Unmarshal(m, b) +} +func (m *FourOctetAsSpecificExtended) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FourOctetAsSpecificExtended.Marshal(b, m, deterministic) +} +func (m *FourOctetAsSpecificExtended) XXX_Merge(src proto.Message) { + xxx_messageInfo_FourOctetAsSpecificExtended.Merge(m, src) +} +func (m *FourOctetAsSpecificExtended) XXX_Size() int { + return xxx_messageInfo_FourOctetAsSpecificExtended.Size(m) +} +func (m *FourOctetAsSpecificExtended) XXX_DiscardUnknown() { + xxx_messageInfo_FourOctetAsSpecificExtended.DiscardUnknown(m) +} + +var xxx_messageInfo_FourOctetAsSpecificExtended proto.InternalMessageInfo + +func (m *FourOctetAsSpecificExtended) GetIsTransitive() bool { + if m != nil { + return m.IsTransitive + } + return false +} + +func (m *FourOctetAsSpecificExtended) GetSubType() uint32 { + if m != nil { + return m.SubType + } + return 0 +} + +func (m *FourOctetAsSpecificExtended) GetAs() uint32 { + if m != nil { + return m.As + } + return 0 +} + +func (m *FourOctetAsSpecificExtended) GetLocalAdmin() uint32 { + if m != nil { + return m.LocalAdmin + } + return 0 +} + +type Prefix struct { + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + MaskLength uint32 `protobuf:"varint,2,opt,name=mask_length,json=maskLength,proto3" json:"mask_length,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Prefix) Reset() { *m = Prefix{} } +func (m *Prefix) String() string { return proto.CompactTextString(m) } +func (*Prefix) ProtoMessage() {} +func (*Prefix) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{12} +} + +func (m *Prefix) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Prefix.Unmarshal(m, b) +} +func (m *Prefix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Prefix.Marshal(b, m, deterministic) +} +func (m *Prefix) XXX_Merge(src proto.Message) { + xxx_messageInfo_Prefix.Merge(m, src) +} +func (m *Prefix) XXX_Size() int { + return xxx_messageInfo_Prefix.Size(m) +} +func (m *Prefix) XXX_DiscardUnknown() { + xxx_messageInfo_Prefix.DiscardUnknown(m) +} + +var xxx_messageInfo_Prefix proto.InternalMessageInfo + +func (m *Prefix) GetAddress() []byte { + if m != nil { + return m.Address + } + return nil +} + +func (m *Prefix) GetMaskLength() uint32 { + if m != nil { + return m.MaskLength + } + return 0 +} + +// RequestVPN call used to request L3 VPN entries, identified by one Route +// Distinguisher which can be one of listed below types, and one or more Route +// Targets. +type RequestVPN struct { + // Route Distinguisher must be one of + // RouteDistinguisherTwoOctetAS, + // RouteDistinguisherIPAddressAS, + // or RouteDistinguisherFourOctetAS. + Rd *any.Any `protobuf:"bytes,1,opt,name=rd,proto3" json:"rd,omitempty"` + // List of the Route Targets. Each must be one of + // TwoOctetAsSpecificExtended, + // IPv4AddressSpecificExtended, + // or FourOctetAsSpecificExtended. + Rt []*any.Any `protobuf:"bytes,2,rep,name=rt,proto3" json:"rt,omitempty"` + // vpn_prefix is L3 VPN prefix which vpn label is requested for. + VpnPrefix *Prefix `protobuf:"bytes,3,opt,name=vpn_prefix,json=vpnPrefix,proto3" json:"vpn_prefix,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RequestVPN) Reset() { *m = RequestVPN{} } +func (m *RequestVPN) String() string { return proto.CompactTextString(m) } +func (*RequestVPN) ProtoMessage() {} +func (*RequestVPN) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{13} +} + +func (m *RequestVPN) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RequestVPN.Unmarshal(m, b) +} +func (m *RequestVPN) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RequestVPN.Marshal(b, m, deterministic) +} +func (m *RequestVPN) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestVPN.Merge(m, src) +} +func (m *RequestVPN) XXX_Size() int { + return xxx_messageInfo_RequestVPN.Size(m) +} +func (m *RequestVPN) XXX_DiscardUnknown() { + xxx_messageInfo_RequestVPN.DiscardUnknown(m) +} + +var xxx_messageInfo_RequestVPN proto.InternalMessageInfo + +func (m *RequestVPN) GetRd() *any.Any { + if m != nil { + return m.Rd + } + return nil +} + +func (m *RequestVPN) GetRt() []*any.Any { + if m != nil { + return m.Rt + } + return nil +} + +func (m *RequestVPN) GetVpnPrefix() *Prefix { + if m != nil { + return m.VpnPrefix + } + return nil +} + +type ResponseVPNEntry struct { + // Route Distinguisher must be one of + // RouteDistinguisherTwoOctetAS, + // RouteDistinguisherIPAddressAS, + // or RouteDistinguisherFourOctetAS. + Rd *any.Any `protobuf:"bytes,1,opt,name=rd,proto3" json:"rd,omitempty"` + // List of the Route Targets. Each must be one of + // TwoOctetAsSpecificExtended, + // IPv4AddressSpecificExtended, + // or FourOctetAsSpecificExtended. + Rt []*any.Any `protobuf:"bytes,2,rep,name=rt,proto3" json:"rt,omitempty"` + Label uint32 `protobuf:"varint,3,opt,name=label,proto3" json:"label,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResponseVPNEntry) Reset() { *m = ResponseVPNEntry{} } +func (m *ResponseVPNEntry) String() string { return proto.CompactTextString(m) } +func (*ResponseVPNEntry) ProtoMessage() {} +func (*ResponseVPNEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{14} +} + +func (m *ResponseVPNEntry) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ResponseVPNEntry.Unmarshal(m, b) +} +func (m *ResponseVPNEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ResponseVPNEntry.Marshal(b, m, deterministic) +} +func (m *ResponseVPNEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseVPNEntry.Merge(m, src) +} +func (m *ResponseVPNEntry) XXX_Size() int { + return xxx_messageInfo_ResponseVPNEntry.Size(m) +} +func (m *ResponseVPNEntry) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseVPNEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_ResponseVPNEntry proto.InternalMessageInfo + +func (m *ResponseVPNEntry) GetRd() *any.Any { + if m != nil { + return m.Rd + } + return nil +} + +func (m *ResponseVPNEntry) GetRt() []*any.Any { + if m != nil { + return m.Rt + } + return nil +} + +func (m *ResponseVPNEntry) GetLabel() uint32 { + if m != nil { + return m.Label + } + return 0 +} + +func init() { + proto.RegisterEnum("apis.EndpointType", EndpointType_name, EndpointType_value) + proto.RegisterEnum("apis.GatewayErrors", GatewayErrors_name, GatewayErrors_value) + proto.RegisterType((*Endpoint)(nil), "apis.endpoint") + proto.RegisterType((*Latency)(nil), "apis.latency") + proto.RegisterType((*QoeParameters)(nil), "apis.qoe_parameters") + proto.RegisterType((*Qoe)(nil), "apis.qoe") + proto.RegisterType((*RequestQoE)(nil), "apis.RequestQoE") + proto.RegisterMapType((map[int32]*Qoe)(nil), "apis.RequestQoE.QoesEntry") + proto.RegisterType((*ResponseQoE)(nil), "apis.ResponseQoE") + proto.RegisterMapType((map[int32]*Qoe)(nil), "apis.ResponseQoE.QoesEntry") + proto.RegisterType((*RouteDistinguisherTwoOctetAS)(nil), "apis.RouteDistinguisherTwoOctetAS") + proto.RegisterType((*RouteDistinguisherIPAddress)(nil), "apis.RouteDistinguisherIPAddress") + proto.RegisterType((*RouteDistinguisherFourOctetAS)(nil), "apis.RouteDistinguisherFourOctetAS") + proto.RegisterType((*TwoOctetAsSpecificExtended)(nil), "apis.TwoOctetAsSpecificExtended") + proto.RegisterType((*IPv4AddressSpecificExtended)(nil), "apis.IPv4AddressSpecificExtended") + proto.RegisterType((*FourOctetAsSpecificExtended)(nil), "apis.FourOctetAsSpecificExtended") + proto.RegisterType((*Prefix)(nil), "apis.Prefix") + proto.RegisterType((*RequestVPN)(nil), "apis.RequestVPN") + proto.RegisterType((*ResponseVPNEntry)(nil), "apis.ResponseVPNEntry") +} + +func init() { proto.RegisterFile("gateway.proto", fileDescriptor_f1a937782ebbded5) } + +var fileDescriptor_f1a937782ebbded5 = []byte{ + // 827 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x5d, 0x6f, 0x23, 0x35, + 0x14, 0xdd, 0x99, 0x49, 0x9a, 0xe4, 0xa6, 0x13, 0x0d, 0xa6, 0x42, 0xd9, 0x74, 0xd1, 0x46, 0xc3, + 0x57, 0x55, 0xa4, 0x14, 0xca, 0x0a, 0x2d, 0x48, 0x3c, 0x14, 0x3a, 0x40, 0xd8, 0x25, 0x49, 0x9d, + 0x6c, 0x79, 0x8c, 0x9c, 0x8c, 0x9b, 0xb5, 0x36, 0xb5, 0xa7, 0xb6, 0x93, 0xdd, 0xbc, 0x21, 0x24, + 0x1e, 0xe1, 0x99, 0x5f, 0xc1, 0x6f, 0x44, 0xb6, 0x67, 0xa6, 0x0d, 0x45, 0x80, 0x50, 0x91, 0xf6, + 0x6d, 0xee, 0xf5, 0xf1, 0xf1, 0xf1, 0x71, 0xee, 0x09, 0x84, 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+ 0x00, 0xff, 0xff, 0x23, 0x51, 0xb2, 0x66, 0xa5, 0x07, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// GatewayServiceClient is the client API for GatewayService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type GatewayServiceClient interface { + // API to request specified Quality of Experience + QoE(ctx context.Context, in *RequestQoE, opts ...grpc.CallOption) (*ResponseQoE, error) + // API to request L3 VPN label for specified VRF, identified by Route + // Distinguisher + VPN(ctx context.Context, in *RequestVPN, opts ...grpc.CallOption) (GatewayService_VPNClient, error) +} + +type gatewayServiceClient struct { + cc *grpc.ClientConn +} + +func NewGatewayServiceClient(cc *grpc.ClientConn) GatewayServiceClient { + return &gatewayServiceClient{cc} +} + +func (c *gatewayServiceClient) QoE(ctx context.Context, in *RequestQoE, opts ...grpc.CallOption) (*ResponseQoE, error) { + out := new(ResponseQoE) + err := c.cc.Invoke(ctx, "/apis.GatewayService/QoE", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gatewayServiceClient) VPN(ctx context.Context, in *RequestVPN, opts ...grpc.CallOption) (GatewayService_VPNClient, error) { + stream, err := c.cc.NewStream(ctx, &_GatewayService_serviceDesc.Streams[0], "/apis.GatewayService/VPN", opts...) + if err != nil { + return nil, err + } + x := &gatewayServiceVPNClient{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 GatewayService_VPNClient interface { + Recv() (*ResponseVPNEntry, error) + grpc.ClientStream +} + +type gatewayServiceVPNClient struct { + grpc.ClientStream +} + +func (x *gatewayServiceVPNClient) Recv() (*ResponseVPNEntry, error) { + m := new(ResponseVPNEntry) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// GatewayServiceServer is the server API for GatewayService service. +type GatewayServiceServer interface { + // API to request specified Quality of Experience + QoE(context.Context, *RequestQoE) (*ResponseQoE, error) + // API to request L3 VPN label for specified VRF, identified by Route + // Distinguisher + VPN(*RequestVPN, GatewayService_VPNServer) error +} + +// UnimplementedGatewayServiceServer can be embedded to have forward compatible implementations. +type UnimplementedGatewayServiceServer struct { +} + +func (*UnimplementedGatewayServiceServer) QoE(ctx context.Context, req *RequestQoE) (*ResponseQoE, error) { + return nil, status.Errorf(codes.Unimplemented, "method QoE not implemented") +} +func (*UnimplementedGatewayServiceServer) VPN(req *RequestVPN, srv GatewayService_VPNServer) error { + return status.Errorf(codes.Unimplemented, "method VPN not implemented") +} + +func RegisterGatewayServiceServer(s *grpc.Server, srv GatewayServiceServer) { + s.RegisterService(&_GatewayService_serviceDesc, srv) +} + +func _GatewayService_QoE_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RequestQoE) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GatewayServiceServer).QoE(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/apis.GatewayService/QoE", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GatewayServiceServer).QoE(ctx, req.(*RequestQoE)) + } + return interceptor(ctx, in, info, handler) +} + +func _GatewayService_VPN_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(RequestVPN) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(GatewayServiceServer).VPN(m, &gatewayServiceVPNServer{stream}) +} + +type GatewayService_VPNServer interface { + Send(*ResponseVPNEntry) error + grpc.ServerStream +} + +type gatewayServiceVPNServer struct { + grpc.ServerStream +} + +func (x *gatewayServiceVPNServer) Send(m *ResponseVPNEntry) error { + return x.ServerStream.SendMsg(m) +} + +var _GatewayService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "apis.GatewayService", + HandlerType: (*GatewayServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "QoE", + Handler: _GatewayService_QoE_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "VPN", + Handler: _GatewayService_VPN_Handler, + ServerStreams: true, + }, + }, + Metadata: "gateway.proto", +} diff --git a/pkg/apis/gateway.proto b/pkg/apis/gateway.proto new file mode 100644 index 0000000..1aaabba --- /dev/null +++ b/pkg/apis/gateway.proto @@ -0,0 +1,138 @@ +syntax = "proto3"; + +import "google/protobuf/any.proto"; + +package apis; + +// EndpointType defines supported endpoints' types +enum EndpointType { + UNKNOWN = 0; + IPV4 = 1; + IPV6 = 2; + SID = 3; +} + +// Errors defines error codes which a gateway can return to a client +enum GatewayErrors { + OK = 0; + // Returned when a gateway encountered a generic error + EIO = 1; + // Returned when request key does not exist + ENOENT = 2; + // Returned when an operation triggered by the client's requested timed out + // and was canceled + ETIMEDOUT = 3; + // Returned when a gateway cannot reach a DB host + EHOSTDOWN = 4; +} +// endpoint is an object defining a source or a destination of a communication +// path. The type of the endpoint is defined by EndpointType, it can be ipv4, +// ipv6 addresses or segment routing SIDs etc. The list of supported endpoint +// types may be extended in future. The address of endpoint is stored in a slice +// of bytes and should be decoded according to the endpoint type. +message endpoint { + EndpointType type = 1; + bytes address = 2; +} +// latency defines one of available QoE metrics +// value expresses latency value in milliseconds. +// variation expresses percent of the acceptable variation from value. +message latency { + int32 value = 1; + int32 variation = 2; +} +// qoe_parameters defines a list of QoE parameters a client can request. +// Currently only latency is supported. +message qoe_parameters { latency latency = 1; } +message qoe { + endpoint src = 1; + endpoint dst = 2; + qoe_parameters qoe = 3; + repeated uint32 label = 4; + GatewayErrors err = 5; +} +// RequestQoE defines the rpc message sent by the client to the gateway. +// Multiple Src/Dst/QoE are supported in a single request. +message RequestQoE { map qoes = 1; } +// ResponseQoE defines the rpc message sent as a reply to the client. +// it is the same message as request, but the gateway populates labels and +// err for each qoe. +message ResponseQoE { map qoes = 1; } + +message RouteDistinguisherTwoOctetAS { + uint32 admin = 1; + uint32 assigned = 2; +} +message RouteDistinguisherIPAddress { + string admin = 1; + uint32 assigned = 2; +} +message RouteDistinguisherFourOctetAS { + uint32 admin = 1; + uint32 assigned = 2; +} +message TwoOctetAsSpecificExtended { + bool is_transitive = 1; + uint32 sub_type = 2; + uint32 as = 3; + uint32 local_admin = 4; +} + +message IPv4AddressSpecificExtended { + bool is_transitive = 1; + uint32 sub_type = 2; + string address = 3; + uint32 local_admin = 4; +} + +message FourOctetAsSpecificExtended { + bool is_transitive = 1; + uint32 sub_type = 2; + uint32 as = 3; + uint32 local_admin = 4; +} + +message Prefix { + bytes address = 1; + uint32 mask_length = 2; +} +// RequestVPN call used to request L3 VPN entries, identified by one Route +// Distinguisher which can be one of listed below types, and one or more Route +// Targets. +message RequestVPN { + // Route Distinguisher must be one of + // RouteDistinguisherTwoOctetAS, + // RouteDistinguisherIPAddressAS, + // or RouteDistinguisherFourOctetAS. + google.protobuf.Any rd = 1; + // List of the Route Targets. Each must be one of + // TwoOctetAsSpecificExtended, + // IPv4AddressSpecificExtended, + // or FourOctetAsSpecificExtended. + repeated google.protobuf.Any rt = 2; + // vpn_prefix is L3 VPN prefix which vpn label is requested for. + Prefix vpn_prefix = 3; +} + +message ResponseVPNEntry { + // Route Distinguisher must be one of + // RouteDistinguisherTwoOctetAS, + // RouteDistinguisherIPAddressAS, + // or RouteDistinguisherFourOctetAS. + google.protobuf.Any rd = 1; + // List of the Route Targets. Each must be one of + // TwoOctetAsSpecificExtended, + // IPv4AddressSpecificExtended, + // or FourOctetAsSpecificExtended. + repeated google.protobuf.Any rt = 2; + uint32 label = 3; +} + +// GatewayService lists rpc services supported by the gateway api +service GatewayService { + // API to request specified Quality of Experience + rpc QoE(RequestQoE) returns (ResponseQoE); + // API to request L3 VPN label for specified VRF, identified by Route + // Distinguisher + rpc VPN(RequestVPN) returns (stream ResponseVPNEntry); +} \ No newline at end of file