Documentation ¶
Index ¶
- Constants
- Variables
- func ArpKey(iface, ipAddr string) string
- func ParseStaticLinkLocalRouteKey(key string) (dstNetAddr *net.IPNet, outgoingInterface string, isRouteKey bool)
- func RouteKey(dstNetwork, outgoingInterface string) string
- func RouteKeyFromTemplate(template, dstAddr, outgoingInterface string) string
- func StaticLinkLocalRouteKey(dstAddr, 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 (dst *ARPEntry) XXX_Merge(src proto.Message)
- func (*ARPEntry) XXX_MessageName() string
- 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 (dst *Route) XXX_Merge(src proto.Message)
- func (*Route) XXX_MessageName() string
- 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}}{{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) (dstNetAddr *net.IPNet, 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 RouteKeyFromTemplate ¶
RouteKeyFromTemplate fills key template with route attributes.
func StaticLinkLocalRouteKey ¶
StaticLinkLocalRouteKey returns a derived key used to represent link-local route.
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_MessageName ¶
func (*ARPEntry) XXX_Unmarshal ¶
type Route ¶
type Route struct { OutgoingInterface string `protobuf:"bytes,1,opt,name=outgoing_interface,json=outgoingInterface,proto3" json:"outgoing_interface,omitempty"` Scope Route_Scope `protobuf:"varint,2,opt,name=scope,proto3,enum=linux.l3.Route_Scope" json:"scope,omitempty"` DstNetwork string `protobuf:"bytes,3,opt,name=dst_network,json=dstNetwork,proto3" json:"dst_network,omitempty"` GwAddr string `protobuf:"bytes,4,opt,name=gw_addr,json=gwAddr,proto3" json:"gw_addr,omitempty"` 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_MessageName ¶
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.