Documentation ¶
Index ¶
- Constants
- Variables
- func InterfaceAddressKey(ifName string, address string) string
- func InterfaceAddressPrefix(iface string) string
- func InterfaceHostNameKey(hostName string) string
- func InterfaceKey(name string) string
- func InterfaceStateKey(ifName string, ifIsUp bool) string
- func ParseInterfaceAddressKey(key string) (ifName string, ifAddr *net.IPNet, isAddrKey bool)
- func ParseInterfaceStateKey(key string) (ifName string, ifIsUp bool, isStateKey bool)
- type Interface
- func (*Interface) Descriptor() ([]byte, []int)
- func (m *Interface) GetEnabled() bool
- func (m *Interface) GetHostIfName() string
- func (m *Interface) GetIpAddresses() []string
- func (m *Interface) GetLink() isInterface_Link
- func (m *Interface) GetMtu() uint32
- func (m *Interface) GetName() string
- func (m *Interface) GetNamespace() *namespace.NetNamespace
- func (m *Interface) GetPhysAddress() string
- func (m *Interface) GetTap() *TapLink
- func (m *Interface) GetType() Interface_Type
- func (m *Interface) GetVeth() *VethLink
- func (m *Interface) MarshalJSON() ([]byte, error)
- func (*Interface) ProtoMessage()
- func (m *Interface) Reset()
- func (m *Interface) String() string
- func (m *Interface) UnmarshalJSON(data []byte) error
- func (m *Interface) XXX_DiscardUnknown()
- func (m *Interface) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Interface) XXX_Merge(src proto.Message)
- func (*Interface) XXX_MessageName() string
- func (*Interface) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- func (m *Interface) XXX_Size() int
- func (m *Interface) XXX_Unmarshal(b []byte) error
- type Interface_Tap
- type Interface_Type
- type Interface_Veth
- type TapLink
- func (*TapLink) Descriptor() ([]byte, []int)
- func (m *TapLink) GetVppTapIfName() string
- func (*TapLink) ProtoMessage()
- func (m *TapLink) Reset()
- func (m *TapLink) String() string
- func (m *TapLink) XXX_DiscardUnknown()
- func (m *TapLink) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *TapLink) XXX_Merge(src proto.Message)
- func (*TapLink) XXX_MessageName() string
- func (m *TapLink) XXX_Size() int
- func (m *TapLink) XXX_Unmarshal(b []byte) error
- type VethLink
- func (*VethLink) Descriptor() ([]byte, []int)
- func (m *VethLink) GetPeerIfName() string
- func (m *VethLink) GetRxChecksumOffloading() VethLink_ChecksumOffloading
- func (m *VethLink) GetTxChecksumOffloading() VethLink_ChecksumOffloading
- func (*VethLink) ProtoMessage()
- func (m *VethLink) Reset()
- func (m *VethLink) String() string
- func (m *VethLink) XXX_DiscardUnknown()
- func (m *VethLink) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *VethLink) XXX_Merge(src proto.Message)
- func (*VethLink) XXX_MessageName() string
- func (m *VethLink) XXX_Size() int
- func (m *VethLink) XXX_Unmarshal(b []byte) error
- type VethLink_ChecksumOffloading
Constants ¶
const ( // InterfaceHostNameKeyPrefix is the common prefix of all keys representing // existing Linux interfaces in the default namespace (referenced by host names). InterfaceHostNameKeyPrefix = "linux/interface/host-name/" // InterfaceStateKeyPrefix is used as a common prefix for keys derived from // interfaces to represent the interface admin state (up/down). InterfaceStateKeyPrefix = "linux/interface/state/" // InterfaceAddressKeyPrefix is used as a common prefix for keys derived from // interfaces to represent assigned IP addresses. InterfaceAddressKeyPrefix = "linux/interface/address/" )
const ModuleName = "linux.interfaces"
ModuleName is the module name used for models.
Variables ¶
var Interface_Type_name = map[int32]string{
0: "UNDEFINED",
1: "VETH",
2: "TAP_TO_VPP",
3: "LOOPBACK",
}
var Interface_Type_value = map[string]int32{
"UNDEFINED": 0,
"VETH": 1,
"TAP_TO_VPP": 2,
"LOOPBACK": 3,
}
var ( ModelInterface = models.Register(&Interface{}, models.Spec{ Module: ModuleName, Version: "v2", Type: "interface", }) )
var VethLink_ChecksumOffloading_name = map[int32]string{
0: "CHKSM_OFFLOAD_DEFAULT",
1: "CHKSM_OFFLOAD_ENABLED",
2: "CHKSM_OFFLOAD_DISABLED",
}
var VethLink_ChecksumOffloading_value = map[string]int32{
"CHKSM_OFFLOAD_DEFAULT": 0,
"CHKSM_OFFLOAD_ENABLED": 1,
"CHKSM_OFFLOAD_DISABLED": 2,
}
Functions ¶
func InterfaceAddressKey ¶
InterfaceAddressKey returns key representing IP address assigned to Linux interface.
func InterfaceAddressPrefix ¶
InterfaceAddressPrefix returns longest-common prefix of keys representing assigned IP addresses to a specific Linux interface.
func InterfaceHostNameKey ¶
InterfaceHostNameKey returns key representing Linux interface host name.
func InterfaceKey ¶
InterfaceKey returns the key used in ETCD to store configuration of a particular Linux interface.
func InterfaceStateKey ¶
InterfaceStateKey returns key representing admin state of a Linux interface.
func ParseInterfaceAddressKey ¶
ParseInterfaceAddressKey parses interface address from key derived from interface by InterfaceAddressKey().
Types ¶
type Interface ¶
type Interface struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Type Interface_Type `protobuf:"varint,2,opt,name=type,proto3,enum=linux.interfaces.Interface_Type" json:"type,omitempty"` Namespace *namespace.NetNamespace `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` HostIfName string `protobuf:"bytes,4,opt,name=host_if_name,json=hostIfName,proto3" json:"host_if_name,omitempty"` Enabled bool `protobuf:"varint,5,opt,name=enabled,proto3" json:"enabled,omitempty"` IpAddresses []string `protobuf:"bytes,6,rep,name=ip_addresses,json=ipAddresses,proto3" json:"ip_addresses,omitempty"` PhysAddress string `protobuf:"bytes,7,opt,name=phys_address,json=physAddress,proto3" json:"phys_address,omitempty"` Mtu uint32 `protobuf:"varint,8,opt,name=mtu,proto3" json:"mtu,omitempty"` // Types that are valid to be assigned to Link: // *Interface_Veth // *Interface_Tap Link isInterface_Link `protobuf_oneof:"link"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Interface) Descriptor ¶
func (*Interface) GetEnabled ¶
func (*Interface) GetHostIfName ¶
func (*Interface) GetIpAddresses ¶
func (*Interface) GetNamespace ¶
func (m *Interface) GetNamespace() *namespace.NetNamespace
func (*Interface) GetPhysAddress ¶
func (*Interface) GetType ¶
func (m *Interface) GetType() Interface_Type
func (*Interface) MarshalJSON ¶
MarshalJSON ensures that field of type 'oneOf' is correctly marshaled by using gogo lib marshaller
func (*Interface) ProtoMessage ¶
func (*Interface) ProtoMessage()
func (*Interface) UnmarshalJSON ¶
UnmarshalJSON ensures that field of type 'oneOf' is correctly unmarshaled
func (*Interface) XXX_DiscardUnknown ¶
func (m *Interface) XXX_DiscardUnknown()
func (*Interface) XXX_Marshal ¶
func (*Interface) XXX_MessageName ¶
func (*Interface) XXX_OneofFuncs ¶
func (*Interface) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
func (*Interface) XXX_Unmarshal ¶
type Interface_Tap ¶
type Interface_Tap struct {
Tap *TapLink `protobuf:"bytes,21,opt,name=tap,proto3,oneof"`
}
type Interface_Type ¶
type Interface_Type int32
const ( Interface_UNDEFINED Interface_Type = 0 Interface_VETH Interface_Type = 1 Interface_TAP_TO_VPP Interface_Type = 2 Interface_LOOPBACK Interface_Type = 3 )
func (Interface_Type) EnumDescriptor ¶
func (Interface_Type) EnumDescriptor() ([]byte, []int)
func (Interface_Type) String ¶
func (x Interface_Type) String() string
type Interface_Veth ¶
type Interface_Veth struct {
Veth *VethLink `protobuf:"bytes,20,opt,name=veth,proto3,oneof"`
}
type TapLink ¶
type TapLink struct { VppTapIfName string `protobuf:"bytes,1,opt,name=vpp_tap_if_name,json=vppTapIfName,proto3" json:"vpp_tap_if_name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TapLink) Descriptor ¶
func (*TapLink) GetVppTapIfName ¶
func (*TapLink) ProtoMessage ¶
func (*TapLink) ProtoMessage()
func (*TapLink) XXX_DiscardUnknown ¶
func (m *TapLink) XXX_DiscardUnknown()
func (*TapLink) XXX_Marshal ¶
func (*TapLink) XXX_MessageName ¶
func (*TapLink) XXX_Unmarshal ¶
type VethLink ¶
type VethLink struct { PeerIfName string `protobuf:"bytes,1,opt,name=peer_if_name,json=peerIfName,proto3" json:"peer_if_name,omitempty"` RxChecksumOffloading VethLink_ChecksumOffloading `` /* 174-byte string literal not displayed */ TxChecksumOffloading VethLink_ChecksumOffloading `` /* 174-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*VethLink) Descriptor ¶
func (*VethLink) GetPeerIfName ¶
func (*VethLink) GetRxChecksumOffloading ¶
func (m *VethLink) GetRxChecksumOffloading() VethLink_ChecksumOffloading
func (*VethLink) GetTxChecksumOffloading ¶
func (m *VethLink) GetTxChecksumOffloading() VethLink_ChecksumOffloading
func (*VethLink) ProtoMessage ¶
func (*VethLink) ProtoMessage()
func (*VethLink) XXX_DiscardUnknown ¶
func (m *VethLink) XXX_DiscardUnknown()
func (*VethLink) XXX_Marshal ¶
func (*VethLink) XXX_MessageName ¶
func (*VethLink) XXX_Unmarshal ¶
type VethLink_ChecksumOffloading ¶
type VethLink_ChecksumOffloading int32
const ( VethLink_CHKSM_OFFLOAD_DEFAULT VethLink_ChecksumOffloading = 0 VethLink_CHKSM_OFFLOAD_ENABLED VethLink_ChecksumOffloading = 1 VethLink_CHKSM_OFFLOAD_DISABLED VethLink_ChecksumOffloading = 2 )
func (VethLink_ChecksumOffloading) EnumDescriptor ¶
func (VethLink_ChecksumOffloading) EnumDescriptor() ([]byte, []int)
func (VethLink_ChecksumOffloading) String ¶
func (x VethLink_ChecksumOffloading) String() string