diff --git a/pkg/api/networkservice/connectioncontext.pb.go b/pkg/api/networkservice/connectioncontext.pb.go index 3abee49..baf088b 100644 --- a/pkg/api/networkservice/connectioncontext.pb.go +++ b/pkg/api/networkservice/connectioncontext.pb.go @@ -312,6 +312,77 @@ func (x *ExtraPrefixRequest) GetRequestedNumber() uint32 { return 0 } +type PolicyRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` // source ip address. This must be an IP that NSM has placed on the nsm interface or empty (in which case it applies to all IPs NSM puts on the interface + Proto uint32 `protobuf:"varint,2,opt,name=proto,proto3" json:"proto,omitempty"` // ip protocol number + Port uint32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"` // destination port + Routes []*Route `protobuf:"bytes,4,rep,name=routes,proto3" json:"routes,omitempty"` // list of destination based routes, if empty becomes a default route, but only for things matching both from and proto +} + +func (x *PolicyRoute) Reset() { + *x = PolicyRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_connectioncontext_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PolicyRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PolicyRoute) ProtoMessage() {} + +func (x *PolicyRoute) ProtoReflect() protoreflect.Message { + mi := &file_connectioncontext_proto_msgTypes[4] + 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 PolicyRoute.ProtoReflect.Descriptor instead. +func (*PolicyRoute) Descriptor() ([]byte, []int) { + return file_connectioncontext_proto_rawDescGZIP(), []int{4} +} + +func (x *PolicyRoute) GetFrom() string { + if x != nil { + return x.From + } + return "" +} + +func (x *PolicyRoute) GetProto() uint32 { + if x != nil { + return x.Proto + } + return 0 +} + +func (x *PolicyRoute) GetPort() uint32 { + if x != nil { + return x.Port + } + return 0 +} + +func (x *PolicyRoute) GetRoutes() []*Route { + if x != nil { + return x.Routes + } + return nil +} + type IPContext struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -327,12 +398,13 @@ type IPContext struct { IpNeighbors []*IpNeighbor `protobuf:"bytes,8,rep,name=ip_neighbors,json=ipNeighbors,proto3" json:"ip_neighbors,omitempty"` // A lists of ARP table neighbours addresses ExtraPrefixRequest []*ExtraPrefixRequest `protobuf:"bytes,9,rep,name=extra_prefix_request,json=extraPrefixRequest,proto3" json:"extra_prefix_request,omitempty"` // A request for NSE to provide extra prefixes ExtraPrefixes []string `protobuf:"bytes,10,rep,name=extra_prefixes,json=extraPrefixes,proto3" json:"extra_prefixes,omitempty"` // A list of extra prefixes requested + Policies []*PolicyRoute `protobuf:"bytes,11,rep,name=policies,proto3" json:"policies,omitempty"` // A list of route policies } func (x *IPContext) Reset() { *x = IPContext{} if protoimpl.UnsafeEnabled { - mi := &file_connectioncontext_proto_msgTypes[4] + mi := &file_connectioncontext_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -345,7 +417,7 @@ func (x *IPContext) String() string { func (*IPContext) ProtoMessage() {} func (x *IPContext) ProtoReflect() protoreflect.Message { - mi := &file_connectioncontext_proto_msgTypes[4] + mi := &file_connectioncontext_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -358,7 +430,7 @@ func (x *IPContext) ProtoReflect() protoreflect.Message { // Deprecated: Use IPContext.ProtoReflect.Descriptor instead. func (*IPContext) Descriptor() ([]byte, []int) { - return file_connectioncontext_proto_rawDescGZIP(), []int{4} + return file_connectioncontext_proto_rawDescGZIP(), []int{5} } func (x *IPContext) GetSrcIpAddrs() []string { @@ -431,6 +503,13 @@ func (x *IPContext) GetExtraPrefixes() []string { return nil } +func (x *IPContext) GetPolicies() []*PolicyRoute { + if x != nil { + return x.Policies + } + return nil +} + type DNSConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -445,7 +524,7 @@ type DNSConfig struct { func (x *DNSConfig) Reset() { *x = DNSConfig{} if protoimpl.UnsafeEnabled { - mi := &file_connectioncontext_proto_msgTypes[5] + mi := &file_connectioncontext_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -458,7 +537,7 @@ func (x *DNSConfig) String() string { func (*DNSConfig) ProtoMessage() {} func (x *DNSConfig) ProtoReflect() protoreflect.Message { - mi := &file_connectioncontext_proto_msgTypes[5] + mi := &file_connectioncontext_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -471,7 +550,7 @@ func (x *DNSConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use DNSConfig.ProtoReflect.Descriptor instead. func (*DNSConfig) Descriptor() ([]byte, []int) { - return file_connectioncontext_proto_rawDescGZIP(), []int{5} + return file_connectioncontext_proto_rawDescGZIP(), []int{6} } func (x *DNSConfig) GetDnsServerIps() []string { @@ -499,7 +578,7 @@ type DNSContext struct { func (x *DNSContext) Reset() { *x = DNSContext{} if protoimpl.UnsafeEnabled { - mi := &file_connectioncontext_proto_msgTypes[6] + mi := &file_connectioncontext_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -512,7 +591,7 @@ func (x *DNSContext) String() string { func (*DNSContext) ProtoMessage() {} func (x *DNSContext) ProtoReflect() protoreflect.Message { - mi := &file_connectioncontext_proto_msgTypes[6] + mi := &file_connectioncontext_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -525,7 +604,7 @@ func (x *DNSContext) ProtoReflect() protoreflect.Message { // Deprecated: Use DNSContext.ProtoReflect.Descriptor instead. func (*DNSContext) Descriptor() ([]byte, []int) { - return file_connectioncontext_proto_rawDescGZIP(), []int{6} + return file_connectioncontext_proto_rawDescGZIP(), []int{7} } func (x *DNSContext) GetConfigs() []*DNSConfig { @@ -548,7 +627,7 @@ type EthernetContext struct { func (x *EthernetContext) Reset() { *x = EthernetContext{} if protoimpl.UnsafeEnabled { - mi := &file_connectioncontext_proto_msgTypes[7] + mi := &file_connectioncontext_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -561,7 +640,7 @@ func (x *EthernetContext) String() string { func (*EthernetContext) ProtoMessage() {} func (x *EthernetContext) ProtoReflect() protoreflect.Message { - mi := &file_connectioncontext_proto_msgTypes[7] + mi := &file_connectioncontext_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -574,7 +653,7 @@ func (x *EthernetContext) ProtoReflect() protoreflect.Message { // Deprecated: Use EthernetContext.ProtoReflect.Descriptor instead. func (*EthernetContext) Descriptor() ([]byte, []int) { - return file_connectioncontext_proto_rawDescGZIP(), []int{7} + return file_connectioncontext_proto_rawDescGZIP(), []int{8} } func (x *EthernetContext) GetSrcMac() string { @@ -613,7 +692,7 @@ type ConnectionContext struct { func (x *ConnectionContext) Reset() { *x = ConnectionContext{} if protoimpl.UnsafeEnabled { - mi := &file_connectioncontext_proto_msgTypes[8] + mi := &file_connectioncontext_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -626,7 +705,7 @@ func (x *ConnectionContext) String() string { func (*ConnectionContext) ProtoMessage() {} func (x *ConnectionContext) ProtoReflect() protoreflect.Message { - mi := &file_connectioncontext_proto_msgTypes[8] + mi := &file_connectioncontext_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -639,7 +718,7 @@ func (x *ConnectionContext) ProtoReflect() protoreflect.Message { // Deprecated: Use ConnectionContext.ProtoReflect.Descriptor instead. func (*ConnectionContext) Descriptor() ([]byte, []int) { - return file_connectioncontext_proto_rawDescGZIP(), []int{8} + return file_connectioncontext_proto_rawDescGZIP(), []int{9} } func (x *ConnectionContext) GetIpContext() *IPContext { @@ -709,85 +788,97 @@ var file_connectioncontext_proto_rawDesc = []byte{ 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x80, - 0x04, 0x0a, 0x09, 0x49, 0x50, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x20, 0x0a, 0x0c, - 0x73, 0x72, 0x63, 0x5f, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0a, 0x73, 0x72, 0x63, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x73, 0x12, 0x20, - 0x0a, 0x0c, 0x64, 0x73, 0x74, 0x5f, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x73, 0x74, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x73, - 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x72, 0x63, 0x5f, 0x69, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x72, 0x63, 0x49, 0x70, - 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x64, 0x73, 0x74, 0x5f, - 0x69, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0d, 0x64, 0x73, 0x74, 0x49, 0x70, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, - 0x12, 0x37, 0x0a, 0x0a, 0x73, 0x72, 0x63, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x09, - 0x73, 0x72, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x0a, 0x64, 0x73, 0x74, - 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x09, 0x64, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x5f, 0x70, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x65, - 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x12, - 0x40, 0x0a, 0x0c, 0x69, 0x70, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x18, - 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x49, 0x70, 0x4e, 0x65, 0x69, 0x67, - 0x68, 0x62, 0x6f, 0x72, 0x52, 0x0b, 0x69, 0x70, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, - 0x73, 0x12, 0x57, 0x0a, 0x14, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x12, 0x65, 0x78, 0x74, 0x72, 0x61, 0x50, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, - 0x74, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x74, 0x72, 0x61, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, - 0x73, 0x22, 0x58, 0x0a, 0x09, 0x44, 0x4e, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x24, - 0x0a, 0x0e, 0x64, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x70, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x49, 0x70, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x64, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x22, 0x44, 0x0a, 0x0a, 0x44, - 0x4e, 0x53, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x44, - 0x4e, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x73, 0x22, 0x5e, 0x0a, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x72, 0x63, 0x5f, 0x6d, 0x61, 0x63, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x72, 0x63, 0x4d, 0x61, 0x63, 0x12, 0x17, 0x0a, - 0x07, 0x64, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x64, 0x73, 0x74, 0x4d, 0x61, 0x63, 0x12, 0x19, 0x0a, 0x08, 0x76, 0x6c, 0x61, 0x6e, 0x5f, 0x74, - 0x61, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x6c, 0x61, 0x6e, 0x54, 0x61, - 0x67, 0x22, 0x8f, 0x03, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x3b, 0x0a, 0x0a, 0x69, 0x70, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x7d, + 0x0a, 0x0b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, + 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, - 0x49, 0x50, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x09, 0x69, 0x70, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x64, 0x6e, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x44, 0x4e, - 0x53, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x0a, 0x64, 0x6e, 0x73, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x12, 0x4d, 0x0a, 0x10, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, 0xbc, 0x04, + 0x0a, 0x09, 0x49, 0x50, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x20, 0x0a, 0x0c, 0x73, + 0x72, 0x63, 0x5f, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0a, 0x73, 0x72, 0x63, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x73, 0x12, 0x20, 0x0a, + 0x0c, 0x64, 0x73, 0x74, 0x5f, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x73, 0x74, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x73, 0x12, + 0x26, 0x0a, 0x0f, 0x73, 0x72, 0x63, 0x5f, 0x69, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x72, 0x63, 0x49, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x64, 0x73, 0x74, 0x5f, 0x69, + 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0d, 0x64, 0x73, 0x74, 0x49, 0x70, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, + 0x37, 0x0a, 0x0a, 0x73, 0x72, 0x63, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x09, 0x73, + 0x72, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x0a, 0x64, 0x73, 0x74, 0x5f, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x09, 0x64, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x5f, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x65, 0x78, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x12, 0x40, + 0x0a, 0x0c, 0x69, 0x70, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x18, 0x08, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x49, 0x70, 0x4e, 0x65, 0x69, 0x67, 0x68, + 0x62, 0x6f, 0x72, 0x52, 0x0b, 0x69, 0x70, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, + 0x12, 0x57, 0x0a, 0x14, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x52, 0x0f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x12, 0x5b, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x72, 0x61, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x54, 0x55, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x4d, - 0x54, 0x55, 0x1a, 0x3f, 0x0a, 0x11, 0x45, 0x78, 0x74, 0x72, 0x61, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x78, 0x74, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x12, 0x65, 0x78, 0x74, 0x72, 0x61, 0x50, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x74, + 0x72, 0x61, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0d, 0x65, 0x78, 0x74, 0x72, 0x61, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, + 0x12, 0x3a, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x22, 0x58, 0x0a, 0x09, + 0x44, 0x4e, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x24, 0x0a, 0x0e, 0x64, 0x6e, 0x73, + 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0c, 0x64, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x70, 0x73, 0x12, + 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, + 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x22, 0x44, 0x0a, 0x0a, 0x44, 0x4e, 0x53, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x44, 0x4e, 0x53, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x22, 0x5e, 0x0a, 0x0f, + 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, + 0x17, 0x0a, 0x07, 0x73, 0x72, 0x63, 0x5f, 0x6d, 0x61, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x72, 0x63, 0x4d, 0x61, 0x63, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x73, 0x74, 0x5f, + 0x6d, 0x61, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x73, 0x74, 0x4d, 0x61, + 0x63, 0x12, 0x19, 0x0a, 0x08, 0x76, 0x6c, 0x61, 0x6e, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x6c, 0x61, 0x6e, 0x54, 0x61, 0x67, 0x22, 0x8f, 0x03, 0x0a, + 0x11, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x12, 0x3b, 0x0a, 0x0a, 0x69, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x49, 0x50, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x52, 0x09, 0x69, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, + 0x3e, 0x0a, 0x0b, 0x64, 0x6e, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x44, 0x4e, 0x53, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x52, 0x0a, 0x64, 0x6e, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, + 0x4d, 0x0a, 0x10, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x45, 0x74, + 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x0f, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x5b, + 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x45, 0x78, 0x74, 0x72, + 0x61, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x65, + 0x78, 0x74, 0x72, 0x61, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x4d, + 0x54, 0x55, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x4d, 0x54, 0x55, 0x1a, 0x3f, 0x0a, + 0x11, 0x45, 0x78, 0x74, 0x72, 0x61, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x3a, + 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -803,37 +894,40 @@ func file_connectioncontext_proto_rawDescGZIP() []byte { } var file_connectioncontext_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_connectioncontext_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_connectioncontext_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_connectioncontext_proto_goTypes = []interface{}{ (IpFamily_Family)(0), // 0: connectioncontext.IpFamily.Family (*IpNeighbor)(nil), // 1: connectioncontext.IpNeighbor (*Route)(nil), // 2: connectioncontext.Route (*IpFamily)(nil), // 3: connectioncontext.IpFamily (*ExtraPrefixRequest)(nil), // 4: connectioncontext.ExtraPrefixRequest - (*IPContext)(nil), // 5: connectioncontext.IPContext - (*DNSConfig)(nil), // 6: connectioncontext.DNSConfig - (*DNSContext)(nil), // 7: connectioncontext.DNSContext - (*EthernetContext)(nil), // 8: connectioncontext.EthernetContext - (*ConnectionContext)(nil), // 9: connectioncontext.ConnectionContext - nil, // 10: connectioncontext.ConnectionContext.ExtraContextEntry + (*PolicyRoute)(nil), // 5: connectioncontext.PolicyRoute + (*IPContext)(nil), // 6: connectioncontext.IPContext + (*DNSConfig)(nil), // 7: connectioncontext.DNSConfig + (*DNSContext)(nil), // 8: connectioncontext.DNSContext + (*EthernetContext)(nil), // 9: connectioncontext.EthernetContext + (*ConnectionContext)(nil), // 10: connectioncontext.ConnectionContext + nil, // 11: connectioncontext.ConnectionContext.ExtraContextEntry } var file_connectioncontext_proto_depIdxs = []int32{ 0, // 0: connectioncontext.IpFamily.family:type_name -> connectioncontext.IpFamily.Family 3, // 1: connectioncontext.ExtraPrefixRequest.addr_family:type_name -> connectioncontext.IpFamily - 2, // 2: connectioncontext.IPContext.src_routes:type_name -> connectioncontext.Route - 2, // 3: connectioncontext.IPContext.dst_routes:type_name -> connectioncontext.Route - 1, // 4: connectioncontext.IPContext.ip_neighbors:type_name -> connectioncontext.IpNeighbor - 4, // 5: connectioncontext.IPContext.extra_prefix_request:type_name -> connectioncontext.ExtraPrefixRequest - 6, // 6: connectioncontext.DNSContext.configs:type_name -> connectioncontext.DNSConfig - 5, // 7: connectioncontext.ConnectionContext.ip_context:type_name -> connectioncontext.IPContext - 7, // 8: connectioncontext.ConnectionContext.dns_context:type_name -> connectioncontext.DNSContext - 8, // 9: connectioncontext.ConnectionContext.ethernet_context:type_name -> connectioncontext.EthernetContext - 10, // 10: connectioncontext.ConnectionContext.extra_context:type_name -> connectioncontext.ConnectionContext.ExtraContextEntry - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name + 2, // 2: connectioncontext.PolicyRoute.routes:type_name -> connectioncontext.Route + 2, // 3: connectioncontext.IPContext.src_routes:type_name -> connectioncontext.Route + 2, // 4: connectioncontext.IPContext.dst_routes:type_name -> connectioncontext.Route + 1, // 5: connectioncontext.IPContext.ip_neighbors:type_name -> connectioncontext.IpNeighbor + 4, // 6: connectioncontext.IPContext.extra_prefix_request:type_name -> connectioncontext.ExtraPrefixRequest + 5, // 7: connectioncontext.IPContext.policies:type_name -> connectioncontext.PolicyRoute + 7, // 8: connectioncontext.DNSContext.configs:type_name -> connectioncontext.DNSConfig + 6, // 9: connectioncontext.ConnectionContext.ip_context:type_name -> connectioncontext.IPContext + 8, // 10: connectioncontext.ConnectionContext.dns_context:type_name -> connectioncontext.DNSContext + 9, // 11: connectioncontext.ConnectionContext.ethernet_context:type_name -> connectioncontext.EthernetContext + 11, // 12: connectioncontext.ConnectionContext.extra_context:type_name -> connectioncontext.ConnectionContext.ExtraContextEntry + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] 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_connectioncontext_proto_init() } @@ -891,7 +985,7 @@ func file_connectioncontext_proto_init() { } } file_connectioncontext_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IPContext); i { + switch v := v.(*PolicyRoute); i { case 0: return &v.state case 1: @@ -903,7 +997,7 @@ func file_connectioncontext_proto_init() { } } file_connectioncontext_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DNSConfig); i { + switch v := v.(*IPContext); i { case 0: return &v.state case 1: @@ -915,7 +1009,7 @@ func file_connectioncontext_proto_init() { } } file_connectioncontext_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DNSContext); i { + switch v := v.(*DNSConfig); i { case 0: return &v.state case 1: @@ -927,7 +1021,7 @@ func file_connectioncontext_proto_init() { } } file_connectioncontext_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EthernetContext); i { + switch v := v.(*DNSContext); i { case 0: return &v.state case 1: @@ -939,6 +1033,18 @@ func file_connectioncontext_proto_init() { } } file_connectioncontext_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EthernetContext); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_connectioncontext_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ConnectionContext); i { case 0: return &v.state @@ -957,7 +1063,7 @@ func file_connectioncontext_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_connectioncontext_proto_rawDesc, NumEnums: 1, - NumMessages: 10, + NumMessages: 11, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/networkservice/connectioncontext.proto b/pkg/api/networkservice/connectioncontext.proto index 4d7a951..f6058e6 100644 --- a/pkg/api/networkservice/connectioncontext.proto +++ b/pkg/api/networkservice/connectioncontext.proto @@ -47,6 +47,13 @@ message ExtraPrefixRequest { uint32 requested_number = 4; } +message PolicyRoute { + string from = 1; /* source ip address. This must be an IP that NSM has placed on the nsm interface or empty (in which case it applies to all IPs NSM puts on the interface */ + uint32 proto = 2; /* ip protocol number */ + uint32 port = 3; /* destination port */ + repeated Route routes = 4; /* list of destination based routes, if empty becomes a default route, but only for things matching both from and proto */ +} + message IPContext { repeated string src_ip_addrs = 1; /* source ip address + prefix in format
/ */ repeated string dst_ip_addrs = 2; /* destination ip address + prefix in format
/ */ @@ -63,6 +70,8 @@ message IPContext { repeated ExtraPrefixRequest extra_prefix_request = 9; /* A request for NSE to provide extra prefixes */ repeated string extra_prefixes = 10; /* A list of extra prefixes requested */ + + repeated PolicyRoute policies = 11; /* A list of route policies */ } message DNSConfig {