Documentation ¶
Index ¶
- Constants
- Variables
- func ArpKey(iface, ipAddr string) string
- func ParseStaticLinkLocalRouteKey(key string) (dstAddr string, outgoingInterface string, isRouteKey bool)
- func RouteKey(dstNetwork, outgoingInterface string) string
- func StaticLinkLocalRouteKey(dstAddr, outgoingInterface string) string
- func StaticLinkLocalRoutePrefix(outgoingInterface string) string
- type ARPEntry
- func (*ARPEntry) Descriptor() ([]byte, []int)deprecated
- func (x *ARPEntry) GetHwAddress() string
- func (x *ARPEntry) GetInterface() string
- func (x *ARPEntry) GetIpAddress() string
- func (*ARPEntry) ProtoMessage()
- func (x *ARPEntry) ProtoReflect() protoreflect.Message
- func (x *ARPEntry) Reset()
- func (x *ARPEntry) String() string
- type Route
- func (*Route) Descriptor() ([]byte, []int)deprecated
- func (x *Route) GetDstNetwork() string
- func (x *Route) GetGwAddr() string
- func (x *Route) GetMetric() uint32
- func (x *Route) GetOutgoingInterface() string
- func (x *Route) GetScope() Route_Scope
- func (*Route) ProtoMessage()
- func (x *Route) ProtoReflect() protoreflect.Message
- func (x *Route) Reset()
- func (x *Route) String() string
- type Route_Scope
- func (Route_Scope) Descriptor() protoreflect.EnumDescriptor
- func (x Route_Scope) Enum() *Route_Scope
- func (Route_Scope) EnumDescriptor() ([]byte, []int)deprecated
- func (x Route_Scope) Number() protoreflect.EnumNumber
- func (x Route_Scope) String() string
- func (Route_Scope) Type() protoreflect.EnumType
Constants ¶
View Source
const (
// StaticLinkLocalRouteKeyPrefix is a prefix for keys derived from link-local routes.
LinkLocalRouteKeyPrefix = "linux/link-local-route/"
)
View Source
const ModuleName = "linux.l3"
ModuleName is the module name used for models.
Variables ¶
View Source
var ( ModelARPEntry = models.Register(&ARPEntry{}, models.Spec{ Module: ModuleName, Version: "v2", Type: "arp", }, models.WithNameTemplate("{{.Interface}}/{{.IpAddress}}")) ModelRoute = models.Register(&Route{}, models.Spec{ Module: ModuleName, Version: "v2", Type: "route", }, models.WithNameTemplate( `{{with ipnet .DstNetwork}}{{printf "%s/%d" .IP .MaskSize}}`+ `{{else}}{{.DstNetwork}}{{end}}/{{.OutgoingInterface}}`, )) )
View Source
var ( Route_Scope_name = map[int32]string{ 0: "UNDEFINED", 1: "GLOBAL", 2: "SITE", 3: "LINK", 4: "HOST", } Route_Scope_value = map[string]int32{ "UNDEFINED": 0, "GLOBAL": 1, "SITE": 2, "LINK": 3, "HOST": 4, } )
Enum value maps for Route_Scope.
View Source
var File_ligato_linux_l3_arp_proto protoreflect.FileDescriptor
View Source
var File_ligato_linux_l3_route_proto protoreflect.FileDescriptor
Functions ¶
func ArpKey ¶
ArpKey returns the key used in ETCD to store configuration of a particular Linux ARP entry.
func ParseStaticLinkLocalRouteKey ¶
func ParseStaticLinkLocalRouteKey(key string) (dstAddr string, outgoingInterface string, isRouteKey bool)
ParseStaticLinkLocalRouteKey parses route attributes from a key derived from link-local route.
func RouteKey ¶
RouteKey returns the key used in ETCD to store configuration of a particular Linux route.
func StaticLinkLocalRouteKey ¶
StaticLinkLocalRouteKey returns a derived key used to represent link-local route.
func StaticLinkLocalRoutePrefix ¶
StaticLinkLocalRoutePrefix returns longest-common prefix of keys representing link-local routes that have the given outgoing Linux interface.
Types ¶
type ARPEntry ¶
type ARPEntry struct { Interface string `protobuf:"bytes,1,opt,name=interface,proto3" json:"interface,omitempty"` IpAddress string `protobuf:"bytes,2,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"` HwAddress string `protobuf:"bytes,3,opt,name=hw_address,json=hwAddress,proto3" json:"hw_address,omitempty"` // contains filtered or unexported fields }
func (*ARPEntry) Descriptor
deprecated
func (*ARPEntry) GetHwAddress ¶
func (*ARPEntry) GetInterface ¶
func (*ARPEntry) GetIpAddress ¶
func (*ARPEntry) ProtoMessage ¶
func (*ARPEntry) ProtoMessage()
func (*ARPEntry) ProtoReflect ¶ added in v3.2.0
func (x *ARPEntry) ProtoReflect() protoreflect.Message
type Route ¶
type Route struct { // Outgoing interface logical name (mandatory). OutgoingInterface string `protobuf:"bytes,1,opt,name=outgoing_interface,json=outgoingInterface,proto3" json:"outgoing_interface,omitempty"` // The scope of the area where the link is valid. Scope Route_Scope `protobuf:"varint,2,opt,name=scope,proto3,enum=ligato.linux.l3.Route_Scope" json:"scope,omitempty"` // Destination network address in the format <address>/<prefix> (mandatory) // Address can be also allocated via netalloc plugin and referenced here, // see: api/models/netalloc/netalloc.proto DstNetwork string `protobuf:"bytes,3,opt,name=dst_network,json=dstNetwork,proto3" json:"dst_network,omitempty"` // Gateway IP address (without mask, optional). // Address can be also allocated via netalloc plugin and referenced here, // see: api/models/netalloc/netalloc.proto GwAddr string `protobuf:"bytes,4,opt,name=gw_addr,json=gwAddr,proto3" json:"gw_addr,omitempty"` // routing metric (weight) Metric uint32 `protobuf:"varint,5,opt,name=metric,proto3" json:"metric,omitempty"` // contains filtered or unexported fields }
func (*Route) Descriptor
deprecated
func (*Route) GetDstNetwork ¶
func (*Route) GetOutgoingInterface ¶
func (*Route) GetScope ¶
func (x *Route) GetScope() Route_Scope
func (*Route) ProtoMessage ¶
func (*Route) ProtoMessage()
func (*Route) ProtoReflect ¶ added in v3.2.0
func (x *Route) ProtoReflect() protoreflect.Message
type Route_Scope ¶
type Route_Scope int32
const ( Route_UNDEFINED Route_Scope = 0 Route_GLOBAL Route_Scope = 1 Route_SITE Route_Scope = 2 Route_LINK Route_Scope = 3 Route_HOST Route_Scope = 4 )
func (Route_Scope) Descriptor ¶ added in v3.2.0
func (Route_Scope) Descriptor() protoreflect.EnumDescriptor
func (Route_Scope) Enum ¶ added in v3.2.0
func (x Route_Scope) Enum() *Route_Scope
func (Route_Scope) EnumDescriptor
deprecated
func (Route_Scope) EnumDescriptor() ([]byte, []int)
Deprecated: Use Route_Scope.Descriptor instead.
func (Route_Scope) Number ¶ added in v3.2.0
func (x Route_Scope) Number() protoreflect.EnumNumber
func (Route_Scope) String ¶
func (x Route_Scope) String() string
func (Route_Scope) Type ¶ added in v3.2.0
func (Route_Scope) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.