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)
- func (m *ARPEntry) GetHwAddress() string
- func (m *ARPEntry) GetInterface() string
- func (m *ARPEntry) GetIpAddress() string
- func (*ARPEntry) ProtoMessage()
- func (m *ARPEntry) Reset()
- func (m *ARPEntry) String() string
- func (m *ARPEntry) XXX_DiscardUnknown()
- func (m *ARPEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ARPEntry) XXX_Merge(src proto.Message)
- func (m *ARPEntry) XXX_Size() int
- func (m *ARPEntry) XXX_Unmarshal(b []byte) error
- type Route
- func (*Route) Descriptor() ([]byte, []int)
- func (m *Route) GetDstNetwork() string
- func (m *Route) GetGwAddr() string
- func (m *Route) GetMetric() uint32
- func (m *Route) GetOutgoingInterface() string
- func (m *Route) GetScope() Route_Scope
- func (*Route) ProtoMessage()
- func (m *Route) Reset()
- func (m *Route) String() string
- func (m *Route) XXX_DiscardUnknown()
- func (m *Route) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Route) XXX_Merge(src proto.Message)
- func (m *Route) XXX_Size() int
- func (m *Route) XXX_Unmarshal(b []byte) error
- type Route_Scope
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",
}
View Source
var Route_Scope_value = map[string]int32{
"UNDEFINED": 0,
"GLOBAL": 1,
"SITE": 2,
"LINK": 3,
"HOST": 4,
}
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ARPEntry) Descriptor ¶
func (*ARPEntry) GetHwAddress ¶
func (*ARPEntry) GetInterface ¶
func (*ARPEntry) GetIpAddress ¶
func (*ARPEntry) ProtoMessage ¶
func (*ARPEntry) ProtoMessage()
func (*ARPEntry) XXX_DiscardUnknown ¶
func (m *ARPEntry) XXX_DiscardUnknown()
func (*ARPEntry) XXX_Marshal ¶
func (*ARPEntry) XXX_Unmarshal ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Route) Descriptor ¶
func (*Route) GetDstNetwork ¶
func (*Route) GetOutgoingInterface ¶
func (*Route) GetScope ¶
func (m *Route) GetScope() Route_Scope
func (*Route) ProtoMessage ¶
func (*Route) ProtoMessage()
func (*Route) XXX_DiscardUnknown ¶
func (m *Route) XXX_DiscardUnknown()
func (*Route) XXX_Marshal ¶
func (*Route) XXX_Unmarshal ¶
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) EnumDescriptor ¶
func (Route_Scope) EnumDescriptor() ([]byte, []int)
func (Route_Scope) String ¶
func (x Route_Scope) String() string
Click to show internal directories.
Click to hide internal directories.