Documentation ¶
Overview ¶
** Copyright 2016 Cisco Systems Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
** Copyright 2014 Cisco Systems Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
** Copyright 2014 Cisco Systems Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
** Copyright 2016 Cisco Systems Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
** Copyright 2014 Cisco Systems Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
** Copyright 2014 Cisco Systems Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
** Copyright 2014 Cisco Systems Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
** Copyright 2014 Cisco Systems Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
** Copyright 2014 Cisco Systems Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func BuildGarpPkt(ip net.IP, mac net.HardwareAddr, vlanID uint16) *openflow13.PacketOut
- func DstGroupMetadata(groupId int) (uint64, uint64)
- func ParseCIDR(cidrStr string) (string, uint, error)
- func ParseIPAddrMaskString(ipAddr string) (*net.IP, *net.IP, error)
- func SrcGroupMetadata(groupId int) (uint64, uint64)
- func Vrfmetadata(vrfid uint16) (uint64, uint64)
- type ArpModeT
- type EndpointInfo
- type GARPInfo
- type HostBridge
- func (self *HostBridge) AddHostPort(endpoint EndpointInfo) error
- func (self *HostBridge) DelHostPort(portNo uint32) error
- func (self *HostBridge) Delete() error
- func (self *HostBridge) IsSwitchConnected() bool
- func (self *HostBridge) MultipartReply(sw *ofctrl.OFSwitch, reply *openflow13.MultipartReply)
- func (self *HostBridge) PacketRcvd(sw *ofctrl.OFSwitch, pkt *ofctrl.PacketIn)
- func (self *HostBridge) SwitchConnected(sw *ofctrl.OFSwitch)
- func (self *HostBridge) SwitchDisconnected(sw *ofctrl.OFSwitch)
- func (self *HostBridge) WaitForSwitchConnection()
- type HostPortInfo
- type LinkInfo
- type LinkUpdateInfo
- type NameServer
- type OfnetAgent
- func (self *OfnetAgent) AddBgp(routerIP string, As string, neighborAs string, peer string) error
- func (self *OfnetAgent) AddHostPort(hp HostPortInfo) error
- func (self *OfnetAgent) AddLocalEndpoint(endpoint EndpointInfo) error
- func (self *OfnetAgent) AddLocalProtoRoute(path []*OfnetProtoRouteInfo)
- func (self *OfnetAgent) AddMaster(masterInfo *OfnetNode, ret *bool) error
- func (self *OfnetAgent) AddNameServer(ns NameServer)
- func (self *OfnetAgent) AddNetwork(vlanId uint16, vni uint32, Gw string, Vrf string) error
- func (self *OfnetAgent) AddSvcSpec(svcName string, spec *ServiceSpec) error
- func (self *OfnetAgent) AddUplink(uplinkPort *PortInfo) error
- func (self *OfnetAgent) AddVtepPort(portNo uint32, remoteIp net.IP) error
- func (self *OfnetAgent) DelSvcSpec(svcName string, spec *ServiceSpec) error
- func (self *OfnetAgent) Delete() error
- func (self *OfnetAgent) DeleteBgp() error
- func (self *OfnetAgent) DeleteLocalProtoRoute(path []*OfnetProtoRouteInfo)
- func (self *OfnetAgent) DummyRpc(arg *string, ret *bool) error
- func (self *OfnetAgent) EndpointAdd(epreg *OfnetEndpoint, ret *bool) error
- func (self *OfnetAgent) EndpointDel(epreg *OfnetEndpoint, ret *bool) error
- func (self *OfnetAgent) FlushEndpoints(endpointType int)
- func (self *OfnetAgent) GetEndpointIdByIpVrf(ipAddr net.IP, vrf string) string
- func (self *OfnetAgent) GetEndpointStats() (map[string]*OfnetEndpointStats, error)
- func (self *OfnetAgent) GetRouterInfo() *OfnetProtoRouterInfo
- func (self *OfnetAgent) GlobalConfigUpdate(cfg OfnetGlobalConfig) error
- func (self *OfnetAgent) InjectGARPs(epgID int, resp *bool) error
- func (self *OfnetAgent) InspectBgp() (interface{}, error)
- func (self *OfnetAgent) InspectState() (interface{}, error)
- func (self *OfnetAgent) IsSwitchConnected() bool
- func (self *OfnetAgent) MultipartReply(sw *ofctrl.OFSwitch, reply *openflow13.MultipartReply)
- func (self *OfnetAgent) PacketRcvd(sw *ofctrl.OFSwitch, pkt *ofctrl.PacketIn)
- func (self *OfnetAgent) RemoveHostPort(portNo uint32) error
- func (self *OfnetAgent) RemoveLocalEndpoint(portNo uint32) error
- func (self *OfnetAgent) RemoveLocalEndpointByID(epID string) error
- func (self *OfnetAgent) RemoveMaster(masterInfo *OfnetNode) error
- func (self *OfnetAgent) RemoveNetwork(vlanId uint16, vni uint32, Gw string, Vrf string) error
- func (self *OfnetAgent) RemoveUplink(uplinkName string) error
- func (self *OfnetAgent) RemoveVtepPort(portNo uint32, remoteIp net.IP) error
- func (self *OfnetAgent) SvcProviderUpdate(svcName string, providers []string)
- func (self *OfnetAgent) SwitchConnected(sw *ofctrl.OFSwitch)
- func (self *OfnetAgent) SwitchDisconnected(sw *ofctrl.OFSwitch)
- func (self *OfnetAgent) UpdateLocalEndpoint(endpoint EndpointInfo) error
- func (self *OfnetAgent) UpdateUplink(uplinkName string, portUpds PortUpdates) error
- func (self *OfnetAgent) WaitForSwitchConnection()
- type OfnetBgp
- func (self *OfnetBgp) AddLocalProtoRoute(pathInfo []*OfnetProtoRouteInfo) error
- func (self *OfnetBgp) AddProtoNeighbor(neighborInfo *OfnetProtoNeighborInfo) error
- func (self *OfnetBgp) DeleteLocalProtoRoute(pathInfo []*OfnetProtoRouteInfo) error
- func (self *OfnetBgp) DeleteProtoNeighbor() error
- func (self *OfnetBgp) GetRouterInfo() *OfnetProtoRouterInfo
- func (self *OfnetBgp) InspectProto() (interface{}, error)
- func (self *OfnetBgp) ModifyProtoRib(path interface{})
- func (self *OfnetBgp) SetRouterInfo(uplink *PortInfo) error
- func (self *OfnetBgp) StartProtoServer(routerInfo *OfnetProtoRouterInfo) error
- func (self *OfnetBgp) StopProtoServer() error
- type OfnetBgpInspect
- type OfnetDatapath
- type OfnetDatapathStats
- type OfnetEndpoint
- type OfnetEndpointStats
- type OfnetGlobalConfig
- type OfnetMaster
- func (self *OfnetMaster) AddNode(hostInfo OfnetNode) error
- func (self *OfnetMaster) AddRule(rule *OfnetPolicyRule) error
- func (self *OfnetMaster) ClearNode(host OfnetNode) error
- func (self *OfnetMaster) DelRule(rule *OfnetPolicyRule) error
- func (self *OfnetMaster) Delete() error
- func (self *OfnetMaster) EndpointAdd(ep *OfnetEndpoint, ret *bool) error
- func (self *OfnetMaster) EndpointDel(ep *OfnetEndpoint, ret *bool) error
- func (self *OfnetMaster) InjectGARPs(epgID int)
- func (self *OfnetMaster) InspectState() ([]byte, error)
- func (self *OfnetMaster) MakeDummyRpcCall() error
- func (self *OfnetMaster) RegisterNode(hostInfo *OfnetNode, ret *bool) error
- func (self *OfnetMaster) UnRegisterNode(hostInfo *OfnetNode, ret *bool) error
- type OfnetNode
- type OfnetPolicyRule
- type OfnetProto
- type OfnetProtoNeighborInfo
- type OfnetProtoRouteInfo
- type OfnetProtoRouterInfo
- type OfnetSvcProviderStats
- type OfnetSvcStats
- type OfnetVrfInfo
- type PolicyAgent
- func (self *PolicyAgent) AddEndpoint(endpoint *OfnetEndpoint) error
- func (self *PolicyAgent) AddIpv6Endpoint(endpoint *OfnetEndpoint) error
- func (self *PolicyAgent) AddRule(rule *OfnetPolicyRule, ret *bool) error
- func (self *PolicyAgent) DelEndpoint(endpoint *OfnetEndpoint) error
- func (self *PolicyAgent) DelIpv6Endpoint(endpoint *OfnetEndpoint) error
- func (self *PolicyAgent) DelRule(rule *OfnetPolicyRule, ret *bool) error
- func (self *PolicyAgent) InitTables(nextTblId uint8) error
- func (self *PolicyAgent) SwitchConnected(sw *ofctrl.OFSwitch)
- func (self *PolicyAgent) SwitchDisconnected(sw *ofctrl.OFSwitch)
- type PolicyRule
- type PortInfo
- type PortSpec
- type PortUpdate
- type PortUpdates
- type Providers
- type ServiceProxy
- func (proxy *ServiceProxy) AddSvcSpec(svcName string, spec *ServiceSpec) error
- func (proxy *ServiceProxy) DelEndpoint(endpoint *OfnetEndpoint)
- func (proxy *ServiceProxy) DelSvcSpec(svcName string, spec *ServiceSpec) error
- func (proxy *ServiceProxy) FlowStats(reply *openflow13.MultipartReply)
- func (proxy *ServiceProxy) GetEndpointStats() (map[string]*OfnetEndpointStats, error)
- func (proxy *ServiceProxy) GetSvcProxyMAC(svcIP net.IP) string
- func (proxy *ServiceProxy) HandlePkt(pkt *ofctrl.PacketIn)
- func (proxy *ServiceProxy) InitDNATTable(nextIDdNAT uint8) error
- func (proxy *ServiceProxy) InitSNATTable(nextIDsNAT uint8) error
- func (proxy *ServiceProxy) InspectState() interface{}
- func (proxy *ServiceProxy) ProviderUpdate(svcName string, providers []string)
- func (proxy *ServiceProxy) SwitchConnected(sw *ofctrl.OFSwitch)
- func (proxy *ServiceProxy) SwitchDisconnected(sw *ofctrl.OFSwitch)
- type ServiceSpec
- type Vlan
- type VlanBridge
- func (vl *VlanBridge) AddEndpoint(endpoint *OfnetEndpoint) error
- func (vl *VlanBridge) AddHostPort(hp HostPortInfo) error
- func (vl *VlanBridge) AddLocalEndpoint(endpoint OfnetEndpoint) error
- func (vl *VlanBridge) AddSvcSpec(svcName string, spec *ServiceSpec) error
- func (vl *VlanBridge) AddUplink(uplinkPort *PortInfo) error
- func (vl *VlanBridge) AddVlan(vlanID uint16, vni uint32, vrf string) error
- func (vl *VlanBridge) AddVtepPort(portNo uint32, remoteIP net.IP) error
- func (vl *VlanBridge) DelSvcSpec(svcName string, spec *ServiceSpec) error
- func (vl *VlanBridge) FlushEndpoints(endpointType int)
- func (vl *VlanBridge) GetEndpointStats() (map[string]*OfnetEndpointStats, error)
- func (vl *VlanBridge) GetLink(linkID string) *LinkInfo
- func (vl *VlanBridge) GetUplink(uplinkID string) *PortInfo
- func (vl *VlanBridge) GlobalConfigUpdate(cfg OfnetGlobalConfig) error
- func (vl *VlanBridge) InjectGARPs(epgID int)
- func (vl *VlanBridge) InspectState() (interface{}, error)
- func (vl *VlanBridge) MasterAdded(master *OfnetNode) error
- func (vl *VlanBridge) MultipartReply(sw *ofctrl.OFSwitch, reply *openflow13.MultipartReply)
- func (vl *VlanBridge) PacketRcvd(sw *ofctrl.OFSwitch, pkt *ofctrl.PacketIn)
- func (vl *VlanBridge) RemoveEndpoint(endpoint *OfnetEndpoint) error
- func (vl *VlanBridge) RemoveHostPort(hp uint32) error
- func (vl *VlanBridge) RemoveLocalEndpoint(endpoint OfnetEndpoint) error
- func (vl *VlanBridge) RemoveUplink(uplinkName string) error
- func (vl *VlanBridge) RemoveVlan(vlanID uint16, vni uint32, vrf string) error
- func (vl *VlanBridge) RemoveVtepPort(portNo uint32, remoteIP net.IP) error
- func (vl *VlanBridge) SvcProviderUpdate(svcName string, providers []string)
- func (vl *VlanBridge) SwitchConnected(sw *ofctrl.OFSwitch)
- func (vl *VlanBridge) SwitchDisconnected(sw *ofctrl.OFSwitch)
- func (vl *VlanBridge) UpdateLocalEndpoint(endpoint *OfnetEndpoint, epInfo EndpointInfo) error
- func (vl *VlanBridge) UpdateUplink(uplinkName string, updates PortUpdates) error
- type Vlrouter
- func (vl *Vlrouter) AddEndpoint(endpoint *OfnetEndpoint) error
- func (self *Vlrouter) AddHostPort(hp HostPortInfo) error
- func (vl *Vlrouter) AddLocalEndpoint(endpoint OfnetEndpoint) error
- func (vl *Vlrouter) AddLocalIpv6Flow(endpoint OfnetEndpoint) error
- func (vl *Vlrouter) AddRemoteIpv6Flow(endpoint *OfnetEndpoint) error
- func (vl *Vlrouter) AddSvcSpec(svcName string, spec *ServiceSpec) error
- func (vl *Vlrouter) AddUplink(uplinkPort *PortInfo) error
- func (vl *Vlrouter) AddVlan(vlanId uint16, vni uint32, vrf string) error
- func (vl *Vlrouter) AddVtepPort(portNo uint32, remoteIp net.IP) error
- func (vl *Vlrouter) DelSvcSpec(svcName string, spec *ServiceSpec) error
- func (vl *Vlrouter) FlushEndpoints(endpointType int)
- func (vl *Vlrouter) GetEndpointStats() (map[string]*OfnetEndpointStats, error)
- func (vl *Vlrouter) GetUplink(uplinkID string) *PortInfo
- func (vl *Vlrouter) GlobalConfigUpdate(cfg OfnetGlobalConfig) error
- func (vl *Vlrouter) InjectGARPs(epgID int)
- func (vl *Vlrouter) InspectState() (interface{}, error)
- func (vl *Vlrouter) MasterAdded(master *OfnetNode) error
- func (vl *Vlrouter) MultipartReply(sw *ofctrl.OFSwitch, reply *openflow13.MultipartReply)
- func (vl *Vlrouter) PacketRcvd(sw *ofctrl.OFSwitch, pkt *ofctrl.PacketIn)
- func (vl *Vlrouter) RemoveEndpoint(endpoint *OfnetEndpoint) error
- func (self *Vlrouter) RemoveHostPort(hp uint32) error
- func (vl *Vlrouter) RemoveLocalEndpoint(endpoint OfnetEndpoint) error
- func (vl *Vlrouter) RemoveLocalIpv6Flow(endpoint OfnetEndpoint) error
- func (vl *Vlrouter) RemoveRemoteIpv6Flow(endpoint *OfnetEndpoint) error
- func (vl *Vlrouter) RemoveUplink(uplinkName string) error
- func (vl *Vlrouter) RemoveVlan(vlanId uint16, vni uint32, vrf string) error
- func (vl *Vlrouter) RemoveVtepPort(portNo uint32, remoteIp net.IP) error
- func (vl *Vlrouter) SvcProviderUpdate(svcName string, providers []string)
- func (vl *Vlrouter) SwitchConnected(sw *ofctrl.OFSwitch)
- func (vl *Vlrouter) SwitchDisconnected(sw *ofctrl.OFSwitch)
- func (vl *Vlrouter) UpdateLocalEndpoint(endpoint *OfnetEndpoint, epInfo EndpointInfo) error
- func (vl *Vlrouter) UpdateUplink(uplinkName string, updates PortUpdates) error
- type Vrouter
- func (self *Vrouter) AddEndpoint(endpoint *OfnetEndpoint) error
- func (self *Vrouter) AddHostPort(hp HostPortInfo) error
- func (self *Vrouter) AddLocalEndpoint(endpoint OfnetEndpoint) error
- func (self *Vrouter) AddLocalIpv6Flow(endpoint OfnetEndpoint) error
- func (self *Vrouter) AddRemoteIpv6Flow(endpoint *OfnetEndpoint) error
- func (vr *Vrouter) AddSvcSpec(svcName string, spec *ServiceSpec) error
- func (vr *Vrouter) AddUplink(uplinkPort *PortInfo) error
- func (self *Vrouter) AddVlan(vlanId uint16, vni uint32, vrf string) error
- func (self *Vrouter) AddVtepPort(portNo uint32, remoteIp net.IP) error
- func (vr *Vrouter) DelSvcSpec(svcName string, spec *ServiceSpec) error
- func (self *Vrouter) FlushEndpoints(endpointType int)
- func (vr *Vrouter) GetEndpointStats() (map[string]*OfnetEndpointStats, error)
- func (self *Vrouter) GlobalConfigUpdate(cfg OfnetGlobalConfig) error
- func (self *Vrouter) InjectGARPs(epgID int)
- func (vr *Vrouter) InspectState() (interface{}, error)
- func (self *Vrouter) MasterAdded(master *OfnetNode) error
- func (vr *Vrouter) MultipartReply(sw *ofctrl.OFSwitch, reply *openflow13.MultipartReply)
- func (self *Vrouter) PacketRcvd(sw *ofctrl.OFSwitch, pkt *ofctrl.PacketIn)
- func (self *Vrouter) RemoveEndpoint(endpoint *OfnetEndpoint) error
- func (self *Vrouter) RemoveHostPort(hp uint32) error
- func (self *Vrouter) RemoveLocalEndpoint(endpoint OfnetEndpoint) error
- func (self *Vrouter) RemoveLocalIpv6Flow(endpoint OfnetEndpoint) error
- func (self *Vrouter) RemoveRemoteIpv6Flow(endpoint *OfnetEndpoint) error
- func (vr *Vrouter) RemoveUplink(uplinkName string) error
- func (self *Vrouter) RemoveVlan(vlanId uint16, vni uint32, vrf string) error
- func (self *Vrouter) RemoveVtepPort(portNo uint32, remoteIp net.IP) error
- func (vr *Vrouter) SvcProviderUpdate(svcName string, providers []string)
- func (self *Vrouter) SwitchConnected(sw *ofctrl.OFSwitch)
- func (self *Vrouter) SwitchDisconnected(sw *ofctrl.OFSwitch)
- func (self *Vrouter) UpdateLocalEndpoint(endpoint *OfnetEndpoint, epInfo EndpointInfo) error
- func (vr *Vrouter) UpdateUplink(uplinkName string, updates PortUpdates) error
- type Vxlan
- func (self *Vxlan) AddEndpoint(endpoint *OfnetEndpoint) error
- func (vx *Vxlan) AddHostPort(hp HostPortInfo) error
- func (self *Vxlan) AddLocalEndpoint(endpoint OfnetEndpoint) error
- func (vx *Vxlan) AddSvcSpec(svcName string, spec *ServiceSpec) error
- func (vx *Vxlan) AddUplink(uplinkPort *PortInfo) error
- func (self *Vxlan) AddVlan(vlanId uint16, vni uint32, vrf string) error
- func (self *Vxlan) AddVtepPort(portNo uint32, remoteIp net.IP) error
- func (vx *Vxlan) DelSvcSpec(svcName string, spec *ServiceSpec) error
- func (self *Vxlan) FlushEndpoints(endpointType int)
- func (vx *Vxlan) GetEndpointStats() (map[string]*OfnetEndpointStats, error)
- func (self *Vxlan) GlobalConfigUpdate(cfg OfnetGlobalConfig) error
- func (self *Vxlan) InjectGARPs(epgID int)
- func (vx *Vxlan) InspectState() (interface{}, error)
- func (self *Vxlan) MasterAdded(master *OfnetNode) error
- func (vx *Vxlan) MultipartReply(sw *ofctrl.OFSwitch, reply *openflow13.MultipartReply)
- func (self *Vxlan) PacketRcvd(sw *ofctrl.OFSwitch, pkt *ofctrl.PacketIn)
- func (self *Vxlan) RemoveEndpoint(endpoint *OfnetEndpoint) error
- func (vx *Vxlan) RemoveHostPort(hp uint32) error
- func (self *Vxlan) RemoveLocalEndpoint(endpoint OfnetEndpoint) error
- func (vx *Vxlan) RemoveUplink(uplinkName string) error
- func (self *Vxlan) RemoveVlan(vlanId uint16, vni uint32, vrf string) error
- func (self *Vxlan) RemoveVtepPort(portNo uint32, remoteIp net.IP) error
- func (vx *Vxlan) SvcProviderUpdate(svcName string, providers []string)
- func (self *Vxlan) SwitchConnected(sw *ofctrl.OFSwitch)
- func (self *Vxlan) SwitchDisconnected(sw *ofctrl.OFSwitch)
- func (self *Vxlan) UpdateLocalEndpoint(endpoint *OfnetEndpoint, epInfo EndpointInfo) error
- func (vx *Vxlan) UpdateUplink(uplinkName string, updates PortUpdates) error
Constants ¶
const ( OFNET_INTERNAL = 1 //Internal contiv cluster ep type OFNET_INTERNAL_BGP = 2 //Internal contiv bgp intf ep OFNET_EXTERNAL_BGP = 3 //External contiv bgp neighbor ep OFNET_EXTERNAL = 4 //External eps (non contiv eps) )
const ( // ArpFlood - ARP packets will be flooded in this mode ArpFlood ArpModeT = "flood" // ArpProxy - ARP packets will be redirected to controller ArpProxy ArpModeT = "proxy" // PortType - individual port PortType = "individual" // BondType - bonded port BondType = "bond" // LacpUpdate - for port update info LacpUpdate = "lacp-upd" )
const ( DNS_FLOW_MATCH_PRIORITY = 100 // Priority for dns match flows FLOW_MATCH_PRIORITY = 100 // Priority for all match flows FLOW_FLOOD_PRIORITY = 10 // Priority for flood entries FLOW_MISS_PRIORITY = 1 // priority for table miss flow FLOW_POLICY_PRIORITY_OFFSET = 10 // Priority offset for policy rules LOCAL_ENDPOINT_FLOW_TAGGED_PRIORITY = 103 // Priority for local tagged endpoints (currently used in l3 mode) LOCAL_ENDPOINT_FLOW_PRIORITY = 102 //Priority for local untagged endpoints (currently used in l3 mode) EXTERNAL_FLOW_PRIORITY = 101 // Priority for external flows (eg bgp routes) HOST_SNAT_DENY_PRIORITY = 101 // Priority for host snat deny )
const ( VLAN_TBL_ID = 1 HOST_DNAT_TBL_ID = 2 SRV_PROXY_DNAT_TBL_ID = 3 DST_GRP_TBL_ID = 4 POLICY_TBL_ID = 5 SRV_PROXY_SNAT_TBL_ID = 6 IP_TBL_ID = 7 HOST_SNAT_TBL_ID = 8 MAC_DEST_TBL_ID = 9 )
const ( GARPRepeats = 15 GARPDELAY = 3 )
const DnsMaxRespMsgSize = 1024
const METADATA_RX_VTEP = 0x1
const OFNET_AGENT_VLAN_PORT = 9010
const OFNET_AGENT_VXLAN_PORT = 9002
const OFNET_MASTER_PORT = 9001
Default port numbers
const TCP_FLAG_ACK = 0x10
const TCP_FLAG_SYN = 0x2
const VXLAN_GARP_SUPPORTED = false
Variables ¶
This section is empty.
Functions ¶
func BuildGarpPkt ¶
func BuildGarpPkt(ip net.IP, mac net.HardwareAddr, vlanID uint16) *openflow13.PacketOut
BuildGarpPkt builds a Gratuitous ARP packet
func DstGroupMetadata ¶
DstGroupMetadata returns metadata for dst group
func ParseIPAddrMaskString ¶
ParseIPAddrMaskString Parse IP addr string
func SrcGroupMetadata ¶
SrcGroupMetadata returns metadata for src group
func Vrfmetadata ¶
Types ¶
type EndpointInfo ¶
type EndpointInfo struct { PortNo uint32 // OVS port number EndpointGroup int // Endpoint group ID MacAddr net.HardwareAddr // mac address Vlan uint16 // OVS internal vlan for the network IpAddr net.IP // IPv4 address of the endpoint Ipv6Addr net.IP // IPv6 address of the endpoint Vrf string // VRF name EndpointGroupVlan uint16 // Endpoint group vlan when its different from network vlan Dscp int // DSCP value for the endpoint HostPvtIP net.IP // IPv4 address for NAT access to host }
local End point information
type GARPInfo ¶
type GARPInfo struct {
// contains filtered or unexported fields
}
GARPInfo for each EP
type HostBridge ¶
type HostBridge struct {
// contains filtered or unexported fields
}
hostAgent state
func NewHostBridge ¶
func NewHostBridge(bridgeName, dpName string, ovsPort uint16) (*HostBridge, error)
NewHostBridge Create a new Host agent and initialize it
func (*HostBridge) AddHostPort ¶
func (self *HostBridge) AddHostPort(endpoint EndpointInfo) error
AddHostPort Add a host port for access to host network.
func (*HostBridge) DelHostPort ¶
func (self *HostBridge) DelHostPort(portNo uint32) error
DelHostPort Remove host port
func (*HostBridge) IsSwitchConnected ¶
func (self *HostBridge) IsSwitchConnected() bool
IsSwitchConnected returns true if switch is connected
func (*HostBridge) MultipartReply ¶
func (self *HostBridge) MultipartReply(sw *ofctrl.OFSwitch, reply *openflow13.MultipartReply)
MultipartReply Receives a multi-part reply from the switch.
func (*HostBridge) PacketRcvd ¶
func (self *HostBridge) PacketRcvd(sw *ofctrl.OFSwitch, pkt *ofctrl.PacketIn)
Receive a packet from the switch.
func (*HostBridge) SwitchConnected ¶
func (self *HostBridge) SwitchConnected(sw *ofctrl.OFSwitch)
Handle switch connected event
func (*HostBridge) SwitchDisconnected ¶
func (self *HostBridge) SwitchDisconnected(sw *ofctrl.OFSwitch)
Handle switch disconnect event
func (*HostBridge) WaitForSwitchConnection ¶
func (self *HostBridge) WaitForSwitchConnection()
WaitForSwitchConnection wait till switch connects
type HostPortInfo ¶
type HostPortInfo struct { PortNo uint32 // OVS port number MacAddr net.HardwareAddr // mac address IpAddr string // IP address in the a.b.c.d/N format Kind string // NAT or Regular }
HostPortInfo holds information about a host access port
type OfnetAgent ¶
type OfnetAgent struct { MyPort uint16 // Port where the agent's RPC server is listening MyAddr string // RPC server addr. same as localIp. different in testing environments GARPStats map[int]uint32 // per EPG garp stats. // contains filtered or unexported fields }
OfnetAgent state
func NewOfnetAgent ¶
func NewOfnetAgent(bridgeName string, dpName string, localIp net.IP, rpcPort uint16, ovsPort uint16, uplinkInfo []string) (*OfnetAgent, error)
Create a new Ofnet agent and initialize it
func (*OfnetAgent) AddHostPort ¶
func (self *OfnetAgent) AddHostPort(hp HostPortInfo) error
AddHostPort
func (*OfnetAgent) AddLocalEndpoint ¶
func (self *OfnetAgent) AddLocalEndpoint(endpoint EndpointInfo) error
Add a local endpoint. This takes ofp port number, mac address, vlan , VrfId and IP address of the port.
func (*OfnetAgent) AddLocalProtoRoute ¶
func (self *OfnetAgent) AddLocalProtoRoute(path []*OfnetProtoRouteInfo)
func (*OfnetAgent) AddMaster ¶
func (self *OfnetAgent) AddMaster(masterInfo *OfnetNode, ret *bool) error
Add a master ofnet agent tries to connect to the master and download routes
func (*OfnetAgent) AddNameServer ¶
func (self *OfnetAgent) AddNameServer(ns NameServer)
func (*OfnetAgent) AddNetwork ¶
Add a Network. This is mainly used for mapping vlan id to Vxlan VNI and add gateway for network
func (*OfnetAgent) AddSvcSpec ¶
func (self *OfnetAgent) AddSvcSpec(svcName string, spec *ServiceSpec) error
AddSvcSpec adds a service spec to proxy
func (*OfnetAgent) AddUplink ¶
func (self *OfnetAgent) AddUplink(uplinkPort *PortInfo) error
AddUplink adds an uplink to the switch
func (*OfnetAgent) AddVtepPort ¶
func (self *OfnetAgent) AddVtepPort(portNo uint32, remoteIp net.IP) error
Add virtual tunnel end point. This is mainly used for mapping remote vtep IP to ofp port number.
func (*OfnetAgent) DelSvcSpec ¶
func (self *OfnetAgent) DelSvcSpec(svcName string, spec *ServiceSpec) error
DelSvcSpec removes a service spec from proxy
func (*OfnetAgent) DeleteBgp ¶
func (self *OfnetAgent) DeleteBgp() error
func (*OfnetAgent) DeleteLocalProtoRoute ¶
func (self *OfnetAgent) DeleteLocalProtoRoute(path []*OfnetProtoRouteInfo)
func (*OfnetAgent) EndpointAdd ¶
func (self *OfnetAgent) EndpointAdd(epreg *OfnetEndpoint, ret *bool) error
Add remote endpoint RPC call from master
func (*OfnetAgent) EndpointDel ¶
func (self *OfnetAgent) EndpointDel(epreg *OfnetEndpoint, ret *bool) error
Delete remote endpoint RPC call from master
func (*OfnetAgent) FlushEndpoints ¶
func (self *OfnetAgent) FlushEndpoints(endpointType int)
func (*OfnetAgent) GetEndpointIdByIpVrf ¶
func (self *OfnetAgent) GetEndpointIdByIpVrf(ipAddr net.IP, vrf string) string
GetEndpointIdByIpVrf constructs Endpoint ID from IP and VRF
func (*OfnetAgent) GetEndpointStats ¶
func (self *OfnetAgent) GetEndpointStats() (map[string]*OfnetEndpointStats, error)
GetEndpointStats fetches all endpoint stats
func (*OfnetAgent) GetRouterInfo ¶
func (self *OfnetAgent) GetRouterInfo() *OfnetProtoRouterInfo
func (*OfnetAgent) GlobalConfigUpdate ¶
func (self *OfnetAgent) GlobalConfigUpdate(cfg OfnetGlobalConfig) error
Update global config
func (*OfnetAgent) InjectGARPs ¶
func (self *OfnetAgent) InjectGARPs(epgID int, resp *bool) error
InjectGARPs inject garps for all eps on the epg.
func (*OfnetAgent) InspectBgp ¶
func (self *OfnetAgent) InspectBgp() (interface{}, error)
InspectBgp returns ofnet bgp state
func (*OfnetAgent) InspectState ¶
func (self *OfnetAgent) InspectState() (interface{}, error)
InspectState returns ofnet agent state
func (*OfnetAgent) IsSwitchConnected ¶
func (self *OfnetAgent) IsSwitchConnected() bool
IsSwitchConnected returns true if switch is connected
func (*OfnetAgent) MultipartReply ¶
func (self *OfnetAgent) MultipartReply(sw *ofctrl.OFSwitch, reply *openflow13.MultipartReply)
MultipartReply Receives a multi-part reply from the switch.
func (*OfnetAgent) PacketRcvd ¶
func (self *OfnetAgent) PacketRcvd(sw *ofctrl.OFSwitch, pkt *ofctrl.PacketIn)
Receive a packet from the switch.
func (*OfnetAgent) RemoveHostPort ¶
func (self *OfnetAgent) RemoveHostPort(portNo uint32) error
RemoveHostPort
func (*OfnetAgent) RemoveLocalEndpoint ¶
func (self *OfnetAgent) RemoveLocalEndpoint(portNo uint32) error
Remove local endpoint
func (*OfnetAgent) RemoveLocalEndpointByID ¶
func (self *OfnetAgent) RemoveLocalEndpointByID(epID string) error
Remove local endpoint by ID
- This function is an alternate of deleting endpoint, but not necessarily an optimized one. Use this function only when port number information is not available for the endpoint. Use the RemoveLocalEndpoint for an optimized way.
func (*OfnetAgent) RemoveMaster ¶
func (self *OfnetAgent) RemoveMaster(masterInfo *OfnetNode) error
Remove the master from master DB
func (*OfnetAgent) RemoveNetwork ¶
Remove a vlan from datapath
func (*OfnetAgent) RemoveUplink ¶
func (self *OfnetAgent) RemoveUplink(uplinkName string) error
RemoveUplink remove an uplink to the switch
func (*OfnetAgent) RemoveVtepPort ¶
func (self *OfnetAgent) RemoveVtepPort(portNo uint32, remoteIp net.IP) error
Remove a VTEP port
func (*OfnetAgent) SvcProviderUpdate ¶
func (self *OfnetAgent) SvcProviderUpdate(svcName string, providers []string)
SvcProviderUpdate Service Proxy Back End update
func (*OfnetAgent) SwitchConnected ¶
func (self *OfnetAgent) SwitchConnected(sw *ofctrl.OFSwitch)
Handle switch connected event
func (*OfnetAgent) SwitchDisconnected ¶
func (self *OfnetAgent) SwitchDisconnected(sw *ofctrl.OFSwitch)
Handle switch disconnect event
func (*OfnetAgent) UpdateLocalEndpoint ¶
func (self *OfnetAgent) UpdateLocalEndpoint(endpoint EndpointInfo) error
UpdateLocalEndpoint update state on a local endpoint
func (*OfnetAgent) UpdateUplink ¶
func (self *OfnetAgent) UpdateUplink(uplinkName string, portUpds PortUpdates) error
UpdateUplink Updates an uplink to the switch
func (*OfnetAgent) WaitForSwitchConnection ¶
func (self *OfnetAgent) WaitForSwitchConnection()
WaitForSwitchConnection wait till switch connects
type OfnetBgp ¶
func (*OfnetBgp) AddLocalProtoRoute ¶
func (self *OfnetBgp) AddLocalProtoRoute(pathInfo []*OfnetProtoRouteInfo) error
AddLocalProtoRoute is used to add local endpoint to the protocol RIB
func (*OfnetBgp) AddProtoNeighbor ¶
func (self *OfnetBgp) AddProtoNeighbor(neighborInfo *OfnetProtoNeighborInfo) error
AddProtoNeighbor adds bgp neighbor
func (*OfnetBgp) DeleteLocalProtoRoute ¶
func (self *OfnetBgp) DeleteLocalProtoRoute(pathInfo []*OfnetProtoRouteInfo) error
DeleteLocalProtoRoute withdraws local endpoints from protocol RIB
func (*OfnetBgp) DeleteProtoNeighbor ¶
DeleteProtoNeighbor deletes bgp neighbor for the host
func (*OfnetBgp) GetRouterInfo ¶
func (self *OfnetBgp) GetRouterInfo() *OfnetProtoRouterInfo
GetRouterInfo returns the configured RouterInfo
func (*OfnetBgp) InspectProto ¶
func (*OfnetBgp) ModifyProtoRib ¶
func (self *OfnetBgp) ModifyProtoRib(path interface{})
func (*OfnetBgp) SetRouterInfo ¶
func (*OfnetBgp) StartProtoServer ¶
func (self *OfnetBgp) StartProtoServer(routerInfo *OfnetProtoRouterInfo) error
Bgp serve routine does the following: 1) Creates inb01 router port 2) Add local Bgp endpoint 3) Kicks off routines to monitor route updates and peer state
func (*OfnetBgp) StopProtoServer ¶
type OfnetBgpInspect ¶
type OfnetDatapath ¶
type OfnetDatapath interface { // New master was added. MasterAdded(master *OfnetNode) error // Switch connected notification SwitchConnected(sw *ofctrl.OFSwitch) // Switch disconnected notification SwitchDisconnected(sw *ofctrl.OFSwitch) // Process Incoming packet PacketRcvd(sw *ofctrl.OFSwitch, pkt *ofctrl.PacketIn) // Add a local endpoint to forwarding DB AddLocalEndpoint(endpoint OfnetEndpoint) error // Remove a local endpoint from forwarding DB RemoveLocalEndpoint(endpoint OfnetEndpoint) error // Update a local endpoint state UpdateLocalEndpoint(ep *OfnetEndpoint, epInfo EndpointInfo) error // Add a remote endpoint to forwarding DB AddEndpoint(endpoint *OfnetEndpoint) error // Remove a remote endpoint from forwarding DB RemoveEndpoint(endpoint *OfnetEndpoint) error // Add an remote VTEP AddVtepPort(portNo uint32, remoteIp net.IP) error // Remove remote VTEP RemoveVtepPort(portNo uint32, remoteIp net.IP) error // Add a vlan AddVlan(vlanId uint16, vni uint32, vrf string) error // Remove a vlan RemoveVlan(vlanId uint16, vni uint32, vrf string) error //Add uplink port AddUplink(uplinkPort *PortInfo) error //Update uplink port UpdateUplink(uplinkName string, update PortUpdates) error //Delete uplink port RemoveUplink(uplinkName string) error // AddHostPort AddHostPort(hp HostPortInfo) error // RemoveHostPort RemoveHostPort(portNo uint32) error //Inject GARPs InjectGARPs(epgID int) // Add a service spec to proxy AddSvcSpec(svcName string, spec *ServiceSpec) error // Remove a service spec from proxy DelSvcSpec(svcName string, spec *ServiceSpec) error // Service Proxy Back End update SvcProviderUpdate(svcName string, providers []string) // Handle multipart replies from OVS MultipartReply(sw *ofctrl.OFSwitch, reply *openflow13.MultipartReply) // Get endpoint stats GetEndpointStats() (map[string]*OfnetEndpointStats, error) // Return the datapath state InspectState() (interface{}, error) // Set global config GlobalConfigUpdate(cfg OfnetGlobalConfig) error // flush the endpoints FlushEndpoints(endpointType int) }
Interface implemented by each datapath
type OfnetDatapathStats ¶
type OfnetDatapathStats struct { PacketsIn uint64 BytesIn uint64 PacketsOut uint64 BytesOut uint64 }
OfnetDatapathStats is generic stats struct
type OfnetEndpoint ¶
type OfnetEndpoint struct { EndpointID string // Unique identifier for the endpoint EndpointType int // Type of the endpoint , "external" or "externalRoute" EndpointGroup int // Endpoint group identifier for policies. IpAddr net.IP // IP address of the end point IpMask net.IP // IP mask for the end point Ipv6Addr net.IP // IPv6 address of the end point Ipv6Mask net.IP // IPv6 mask for the end point Vrf string // IP address namespace MacAddrStr string // Mac address of the end point(in string format) Vlan uint16 // Vlan Id for the endpoint Vni uint32 // Vxlan VNI EndpointGroupVlan uint16 // EnpointGroup Vlan, needed in non-Standalone mode of netplugin OriginatorIp net.IP // Originating switch OriginatorMac string // Mac address of the endpoint host PortNo uint32 `json:"-"` // Port number on originating switch Dscp int `json:"-"` // DSCP value for the endpoint Timestamp time.Time // Timestamp of the last event HostPvtIP net.IP `json:"-"` // Private IP }
OfnetEndpoint has info about an endpoint
type OfnetEndpointStats ¶
type OfnetEndpointStats struct { EndpointIP string // Endpoint IP address VrfName string // vrf name PortStats OfnetDatapathStats // Aggregate port stats SvcStats map[string]OfnetSvcStats // Service level stats }
OfnetEndpointStats has stats for local endpoints
type OfnetGlobalConfig ¶
type OfnetGlobalConfig struct {
ArpMode ArpModeT // arp mode: proxy or flood
}
OfnetGlobalConfig has global level configs for ofnet
type OfnetMaster ¶
type OfnetMaster struct {
// contains filtered or unexported fields
}
Ofnet master state
func NewOfnetMaster ¶
func NewOfnetMaster(myAddr string, portNo uint16) *OfnetMaster
Create new Ofnet master
func (*OfnetMaster) AddNode ¶
func (self *OfnetMaster) AddNode(hostInfo OfnetNode) error
AddNode adds a node by calling MasterAdd rpc call on the node
func (*OfnetMaster) AddRule ¶
func (self *OfnetMaster) AddRule(rule *OfnetPolicyRule) error
AddRule adds a new rule to the policyDB
func (*OfnetMaster) ClearNode ¶
func (self *OfnetMaster) ClearNode(host OfnetNode) error
ClearNode clears up the resources on the node for GC
func (*OfnetMaster) DelRule ¶
func (self *OfnetMaster) DelRule(rule *OfnetPolicyRule) error
DelRule removes a rule from policy DB
func (*OfnetMaster) EndpointAdd ¶
func (self *OfnetMaster) EndpointAdd(ep *OfnetEndpoint, ret *bool) error
Add an Endpoint
func (*OfnetMaster) EndpointDel ¶
func (self *OfnetMaster) EndpointDel(ep *OfnetEndpoint, ret *bool) error
Delete an Endpoint
func (*OfnetMaster) InjectGARPs ¶
func (self *OfnetMaster) InjectGARPs(epgID int)
InjectGARPs triggers GARPS in the datapath on the specified epg
func (*OfnetMaster) InspectState ¶
func (self *OfnetMaster) InspectState() ([]byte, error)
InspectState returns current state as json
func (*OfnetMaster) MakeDummyRpcCall ¶
func (self *OfnetMaster) MakeDummyRpcCall() error
Make a dummy RPC call to all agents. for testing purposes..
func (*OfnetMaster) RegisterNode ¶
func (self *OfnetMaster) RegisterNode(hostInfo *OfnetNode, ret *bool) error
RegisterNode registers an agent
func (*OfnetMaster) UnRegisterNode ¶
func (self *OfnetMaster) UnRegisterNode(hostInfo *OfnetNode, ret *bool) error
UnRegisterNode unregisters an agent
type OfnetPolicyRule ¶
type OfnetPolicyRule struct { RuleId string // Unique identifier for the rule Priority int // Priority for the rule (1..100. 100 is highest) SrcEndpointGroup int // Source endpoint group DstEndpointGroup int // Destination endpoint group SrcIpAddr string // source IP addrss and mask DstIpAddr string // Destination IP address and mask IpProtocol uint8 // IP protocol number SrcPort uint16 // Source port DstPort uint16 // destination port TcpFlags string // TCP flags to match: syn || syn,ack || ack || syn,!ack || !syn,ack; Action string // rule action: 'accept' or 'deny' }
OfnetPolicyRule has security rule to be installed
type OfnetProto ¶
type OfnetProto interface { //Create a protocol server StartProtoServer(routerInfo *OfnetProtoRouterInfo) error StopProtoServer() error //Add a Protocol Neighbor AddProtoNeighbor(neighborInfo *OfnetProtoNeighborInfo) error //Delete a Protocol Neighbor DeleteProtoNeighbor() error //Get Protocol router info GetRouterInfo() *OfnetProtoRouterInfo //Set Protocol router info SetRouterInfo(uplinkPort *PortInfo) error //Add Local Route AddLocalProtoRoute(path []*OfnetProtoRouteInfo) error //Delete Local Route DeleteLocalProtoRoute(path []*OfnetProtoRouteInfo) error //Modify protocol Rib (Could be used for testing) ModifyProtoRib(path interface{}) //Inspect bgp InspectProto() (interface{}, error) }
Interface implemented by each control protocol.
type OfnetProtoNeighborInfo ¶
type OfnetProtoNeighborInfo struct { ProtocolType string // type of protocol NeighborIP string // ip address of the neighbor As string // As of neighbor if applicable }
OfnetProtoNeighborInfo has bgp neighbor info
type OfnetProtoRouteInfo ¶
type OfnetProtoRouteInfo struct { ProtocolType string // type of protocol // contains filtered or unexported fields }
OfnetProtoRouteInfo contains a route
type OfnetProtoRouterInfo ¶
type OfnetProtoRouterInfo struct { ProtocolType string // type of protocol RouterIP string // ip address of the router UplinkPort *PortInfo // uplink L2 intf As string // As for Bgp protocol }
OfnetProtoRouterInfo has local router info
type OfnetSvcProviderStats ¶
type OfnetSvcProviderStats struct { ProviderIP string // Provider IP address ServiceIP string // service ip address ServiceVrf string // Provider VRF name OfnetDatapathStats // stats }
OfnetSvcProviderStats has stats for a provider of a service
type OfnetSvcStats ¶
type OfnetSvcStats struct { ServiceIP string // service ip address ServiceVRF string // service vrf name Protocol string // service protocol tcp | udp SvcPort string // Service Port ProvPort string // Provider port SvcStats OfnetDatapathStats // aggregate service stats ProvStats map[string]OfnetSvcProviderStats // per provider stats }
OfnetSvcStats per service stats from one client
type OfnetVrfInfo ¶
type OfnetVrfInfo struct { VrfName string // vrf name VrfId uint16 // local vrf id NumNetworks uint16 // ref count of networks in the vrf }
OfnetVrfInfo has info about a VRF
type PolicyAgent ¶
type PolicyAgent struct { Rules map[string]*PolicyRule // rules database // contains filtered or unexported fields }
PolicyAgent is an instance of a policy agent
func NewPolicyAgent ¶
func NewPolicyAgent(agent *OfnetAgent, rpcServ *rpc.Server) *PolicyAgent
NewPolicyMgr Creates a new policy manager
func (*PolicyAgent) AddEndpoint ¶
func (self *PolicyAgent) AddEndpoint(endpoint *OfnetEndpoint) error
AddEndpoint adds an endpoint to dst group lookup
func (*PolicyAgent) AddIpv6Endpoint ¶
func (self *PolicyAgent) AddIpv6Endpoint(endpoint *OfnetEndpoint) error
AddIpv6Endpoint adds an endpoint to dst group lookup
func (*PolicyAgent) AddRule ¶
func (self *PolicyAgent) AddRule(rule *OfnetPolicyRule, ret *bool) error
AddRule adds a security rule to policy table
func (*PolicyAgent) DelEndpoint ¶
func (self *PolicyAgent) DelEndpoint(endpoint *OfnetEndpoint) error
DelEndpoint deletes an endpoint from dst group lookup
func (*PolicyAgent) DelIpv6Endpoint ¶
func (self *PolicyAgent) DelIpv6Endpoint(endpoint *OfnetEndpoint) error
DelIpv6Endpoint deletes an endpoint from dst group lookup
func (*PolicyAgent) DelRule ¶
func (self *PolicyAgent) DelRule(rule *OfnetPolicyRule, ret *bool) error
DelRule deletes a security rule from policy table
func (*PolicyAgent) InitTables ¶
func (self *PolicyAgent) InitTables(nextTblId uint8) error
InitTables initializes policy table on the switch
func (*PolicyAgent) SwitchConnected ¶
func (self *PolicyAgent) SwitchConnected(sw *ofctrl.OFSwitch)
Handle switch connected notification
func (*PolicyAgent) SwitchDisconnected ¶
func (self *PolicyAgent) SwitchDisconnected(sw *ofctrl.OFSwitch)
Handle switch disconnected notification
type PolicyRule ¶
type PolicyRule struct { Rule *OfnetPolicyRule // rule definition // contains filtered or unexported fields }
PolicyRule has info about single rule
type PortInfo ¶
type PortInfo struct { Name string Type string LinkStatus linkStatus MbrLinks []*LinkInfo ActiveLinks []*LinkInfo }
PortInfo maintains port information
type PortSpec ¶
type PortSpec struct { Protocol string SvcPort uint16 // advertised port ProvPort uint16 // actual port of provider }
PortSpec defines protocol/port info required to host the service
type PortUpdate ¶
type PortUpdate struct { UpdateType string UpdateInfo interface{} }
PortUpdate maintains information about port update
type PortUpdates ¶
type PortUpdates struct { PortName string Updates []PortUpdate }
PortUpdates maintains multiplae port update info
type ServiceProxy ¶
type ServiceProxy struct {
// contains filtered or unexported fields
}
ServiceProxy is an instance of a service proxy
func NewServiceProxy ¶
func NewServiceProxy(agent *OfnetAgent) *ServiceProxy
NewServiceProxy Creates a new service proxy
func (*ServiceProxy) AddSvcSpec ¶
func (proxy *ServiceProxy) AddSvcSpec(svcName string, spec *ServiceSpec) error
AddSvcSpec adds or updates a service spec.
func (*ServiceProxy) DelEndpoint ¶
func (proxy *ServiceProxy) DelEndpoint(endpoint *OfnetEndpoint)
DelEndpoint handles an endpoint delete
func (*ServiceProxy) DelSvcSpec ¶
func (proxy *ServiceProxy) DelSvcSpec(svcName string, spec *ServiceSpec) error
DelSvcSpec deletes a service spec.
func (*ServiceProxy) FlowStats ¶
func (proxy *ServiceProxy) FlowStats(reply *openflow13.MultipartReply)
FlowStats handles a stats response from the switch
func (*ServiceProxy) GetEndpointStats ¶
func (proxy *ServiceProxy) GetEndpointStats() (map[string]*OfnetEndpointStats, error)
GetEndpointStats fetches ep stats
func (*ServiceProxy) GetSvcProxyMAC ¶
func (proxy *ServiceProxy) GetSvcProxyMAC(svcIP net.IP) string
GetSvcProxyMAC looks up the service IP and returns a mac if the IP exists. if the svc IP is not found, returns empty string
func (*ServiceProxy) HandlePkt ¶
func (proxy *ServiceProxy) HandlePkt(pkt *ofctrl.PacketIn)
HandlePkt processes a received pkt from a matching table entry
func (*ServiceProxy) InitDNATTable ¶
func (proxy *ServiceProxy) InitDNATTable(nextIDdNAT uint8) error
InitDNATTable initializes the dNAT table
func (*ServiceProxy) InitSNATTable ¶
func (proxy *ServiceProxy) InitSNATTable(nextIDsNAT uint8) error
InitSNATTable initializes the sNAT table
func (*ServiceProxy) InspectState ¶
func (proxy *ServiceProxy) InspectState() interface{}
InspectState returns current state of svc proxy
func (*ServiceProxy) ProviderUpdate ¶
func (proxy *ServiceProxy) ProviderUpdate(svcName string, providers []string)
ProviderUpdate updates the list of providers of the service
func (*ServiceProxy) SwitchConnected ¶
func (proxy *ServiceProxy) SwitchConnected(sw *ofctrl.OFSwitch)
Handle switch connected notification
func (*ServiceProxy) SwitchDisconnected ¶
func (proxy *ServiceProxy) SwitchDisconnected(sw *ofctrl.OFSwitch)
Handle switch disconnected notification
type ServiceSpec ¶
ServiceSpec defines a service to be proxied
type Vlan ¶
type Vlan struct { Vni uint32 // Vxlan VNI // contains filtered or unexported fields }
Vlan info
type VlanBridge ¶
type VlanBridge struct {
// contains filtered or unexported fields
}
VlanBridge has Vlan state.
func NewVlanBridge ¶
func NewVlanBridge(agent *OfnetAgent, rpcServ *rpc.Server) *VlanBridge
NewVlanBridge Create a new vlan instance
func (*VlanBridge) AddEndpoint ¶
func (vl *VlanBridge) AddEndpoint(endpoint *OfnetEndpoint) error
AddEndpoint Add an endpoint to the datapath
func (*VlanBridge) AddHostPort ¶
func (vl *VlanBridge) AddHostPort(hp HostPortInfo) error
AddHostPort is not implemented
func (*VlanBridge) AddLocalEndpoint ¶
func (vl *VlanBridge) AddLocalEndpoint(endpoint OfnetEndpoint) error
AddLocalEndpoint Add a local endpoint and install associated local route
func (*VlanBridge) AddSvcSpec ¶
func (vl *VlanBridge) AddSvcSpec(svcName string, spec *ServiceSpec) error
AddSvcSpec adds a service spec to proxy
func (*VlanBridge) AddUplink ¶
func (vl *VlanBridge) AddUplink(uplinkPort *PortInfo) error
AddUplink adds an uplink to the switch
func (*VlanBridge) AddVlan ¶
func (vl *VlanBridge) AddVlan(vlanID uint16, vni uint32, vrf string) error
AddVlan Add a vlan.
func (*VlanBridge) AddVtepPort ¶
func (vl *VlanBridge) AddVtepPort(portNo uint32, remoteIP net.IP) error
AddVtepPort Add virtual tunnel end point.
func (*VlanBridge) DelSvcSpec ¶
func (vl *VlanBridge) DelSvcSpec(svcName string, spec *ServiceSpec) error
DelSvcSpec removes a service spec from proxy
func (*VlanBridge) FlushEndpoints ¶
func (vl *VlanBridge) FlushEndpoints(endpointType int)
FlushEndpoints flushes endpoints from ovs
func (*VlanBridge) GetEndpointStats ¶
func (vl *VlanBridge) GetEndpointStats() (map[string]*OfnetEndpointStats, error)
GetEndpointStats fetches ep stats
func (*VlanBridge) GetLink ¶
func (vl *VlanBridge) GetLink(linkID string) *LinkInfo
GetLink API gets the interface with linkID from interface DB
func (*VlanBridge) GetUplink ¶
func (vl *VlanBridge) GetUplink(uplinkID string) *PortInfo
GetUplink API gets the uplink port with uplinkID from uplink DB
func (*VlanBridge) GlobalConfigUpdate ¶
func (vl *VlanBridge) GlobalConfigUpdate(cfg OfnetGlobalConfig) error
Update global config
func (*VlanBridge) InjectGARPs ¶
func (vl *VlanBridge) InjectGARPs(epgID int)
InjectGARPs for all endpoints on the epg
func (*VlanBridge) InspectState ¶
func (vl *VlanBridge) InspectState() (interface{}, error)
InspectState returns current state
func (*VlanBridge) MasterAdded ¶
func (vl *VlanBridge) MasterAdded(master *OfnetNode) error
MasterAdded Handle new master added event
func (*VlanBridge) MultipartReply ¶
func (vl *VlanBridge) MultipartReply(sw *ofctrl.OFSwitch, reply *openflow13.MultipartReply)
MultipartReply handles stats reply
func (*VlanBridge) PacketRcvd ¶
func (vl *VlanBridge) PacketRcvd(sw *ofctrl.OFSwitch, pkt *ofctrl.PacketIn)
PacketRcvd Handle incoming packet
func (*VlanBridge) RemoveEndpoint ¶
func (vl *VlanBridge) RemoveEndpoint(endpoint *OfnetEndpoint) error
RemoveEndpoint removes an endpoint from the datapath
func (*VlanBridge) RemoveHostPort ¶
func (vl *VlanBridge) RemoveHostPort(hp uint32) error
RemoveHostPort is not implemented
func (*VlanBridge) RemoveLocalEndpoint ¶
func (vl *VlanBridge) RemoveLocalEndpoint(endpoint OfnetEndpoint) error
RemoveLocalEndpoint Remove local endpoint
func (*VlanBridge) RemoveUplink ¶
func (vl *VlanBridge) RemoveUplink(uplinkName string) error
RemoveUplink remove an uplink to the switch
func (*VlanBridge) RemoveVlan ¶
func (vl *VlanBridge) RemoveVlan(vlanID uint16, vni uint32, vrf string) error
RemoveVlan Remove a vlan
func (*VlanBridge) RemoveVtepPort ¶
func (vl *VlanBridge) RemoveVtepPort(portNo uint32, remoteIP net.IP) error
RemoveVtepPort Remove a VTEP port
func (*VlanBridge) SvcProviderUpdate ¶
func (vl *VlanBridge) SvcProviderUpdate(svcName string, providers []string)
SvcProviderUpdate Service Proxy Back End update
func (*VlanBridge) SwitchConnected ¶
func (vl *VlanBridge) SwitchConnected(sw *ofctrl.OFSwitch)
SwitchConnected Handle switch connected notification
func (*VlanBridge) SwitchDisconnected ¶
func (vl *VlanBridge) SwitchDisconnected(sw *ofctrl.OFSwitch)
SwitchDisconnected Handle switch disconnected notification
func (*VlanBridge) UpdateLocalEndpoint ¶
func (vl *VlanBridge) UpdateLocalEndpoint(endpoint *OfnetEndpoint, epInfo EndpointInfo) error
UpdateLocalEndpoint update local endpoint state
func (*VlanBridge) UpdateUplink ¶
func (vl *VlanBridge) UpdateUplink(uplinkName string, updates PortUpdates) error
UpdateUplink updates uplink info
type Vlrouter ¶
type Vlrouter struct {
// contains filtered or unexported fields
}
Vlrouter state. One Vlrouter instance exists on each host
func NewVlrouter ¶
func NewVlrouter(agent *OfnetAgent, rpcServ *rpc.Server) *Vlrouter
NewVlrouter creates a new vlrouter instance
func (*Vlrouter) AddEndpoint ¶
func (vl *Vlrouter) AddEndpoint(endpoint *OfnetEndpoint) error
AddEndpoint does the following :
1)Adds a remote endpoint and associated flows to OVS 2)The remotes routes can be 3 endpoint types :
a) internal - json rpc based learning from peer netplugins/ofnetagents in the cluster b) external - remote endpoint learn via BGP c) external-bgp - endpoint of BGP peer
func (*Vlrouter) AddHostPort ¶
func (self *Vlrouter) AddHostPort(hp HostPortInfo) error
AddHostPort is not implemented
func (*Vlrouter) AddLocalEndpoint ¶
func (vl *Vlrouter) AddLocalEndpoint(endpoint OfnetEndpoint) error
func (*Vlrouter) AddLocalIpv6Flow ¶
func (vl *Vlrouter) AddLocalIpv6Flow(endpoint OfnetEndpoint) error
Add IPv6 flows
func (*Vlrouter) AddRemoteIpv6Flow ¶
func (vl *Vlrouter) AddRemoteIpv6Flow(endpoint *OfnetEndpoint) error
Add IPv6 flow for the remote endpoint
func (*Vlrouter) AddSvcSpec ¶
func (vl *Vlrouter) AddSvcSpec(svcName string, spec *ServiceSpec) error
AddSvcSpec adds a service spec to proxy
func (*Vlrouter) AddVtepPort ¶
func (*Vlrouter) DelSvcSpec ¶
func (vl *Vlrouter) DelSvcSpec(svcName string, spec *ServiceSpec) error
DelSvcSpec removes a service spec from proxy
func (*Vlrouter) FlushEndpoints ¶
Flushendpoints - flushes out endpoints from ovs
func (*Vlrouter) GetEndpointStats ¶
func (vl *Vlrouter) GetEndpointStats() (map[string]*OfnetEndpointStats, error)
GetEndpointStats fetches ep stats
func (*Vlrouter) GlobalConfigUpdate ¶
func (vl *Vlrouter) GlobalConfigUpdate(cfg OfnetGlobalConfig) error
GlobalConfigUpdate not implemented
func (*Vlrouter) InjectGARPs ¶
InjectGARPs not implemented
func (*Vlrouter) InspectState ¶
InspectState returns current state
func (*Vlrouter) MasterAdded ¶
MasterAdded handles new master added event
func (*Vlrouter) MultipartReply ¶
func (vl *Vlrouter) MultipartReply(sw *ofctrl.OFSwitch, reply *openflow13.MultipartReply)
MultipartReply handles stats reply
func (*Vlrouter) PacketRcvd ¶
Handle incoming packet
func (*Vlrouter) RemoveEndpoint ¶
func (vl *Vlrouter) RemoveEndpoint(endpoint *OfnetEndpoint) error
RemoveEndpoint removes an endpoint from the datapath
func (*Vlrouter) RemoveHostPort ¶
RemoveHostPort is not implemented
func (*Vlrouter) RemoveLocalEndpoint ¶
func (vl *Vlrouter) RemoveLocalEndpoint(endpoint OfnetEndpoint) error
RemoveLocalEndpoint does the following
1) Removes the local endpoint and associated flows from OVS 2) Withdraws the route from BGP RIB
func (*Vlrouter) RemoveLocalIpv6Flow ¶
func (vl *Vlrouter) RemoveLocalIpv6Flow(endpoint OfnetEndpoint) error
Remove the IPv6 flow
func (*Vlrouter) RemoveRemoteIpv6Flow ¶
func (vl *Vlrouter) RemoveRemoteIpv6Flow(endpoint *OfnetEndpoint) error
Remove IPv6 flow for the remote endpoint
func (*Vlrouter) RemoveUplink ¶
func (*Vlrouter) RemoveVlan ¶
Remove a vlan
func (*Vlrouter) RemoveVtepPort ¶
Remove a VTEP port
func (*Vlrouter) SvcProviderUpdate ¶
SvcProviderUpdate Service Proxy Back End update
func (*Vlrouter) SwitchConnected ¶
Handle switch connected notification
func (*Vlrouter) SwitchDisconnected ¶
Handle switch disconnected notification
func (*Vlrouter) UpdateLocalEndpoint ¶
func (vl *Vlrouter) UpdateLocalEndpoint(endpoint *OfnetEndpoint, epInfo EndpointInfo) error
UpdateLocalEndpoint update local endpoint state
func (*Vlrouter) UpdateUplink ¶
func (vl *Vlrouter) UpdateUplink(uplinkName string, updates PortUpdates) error
UpdateUplink updates uplink info
type Vrouter ¶
type Vrouter struct {
// contains filtered or unexported fields
}
Vrouter state. One Vrouter instance exists on each host
func NewVrouter ¶
func NewVrouter(agent *OfnetAgent, rpcServ *rpc.Server) *Vrouter
Create a new vrouter instance
func (*Vrouter) AddEndpoint ¶
func (self *Vrouter) AddEndpoint(endpoint *OfnetEndpoint) error
AddEndpoint Add an endpoint to the datapath
func (*Vrouter) AddHostPort ¶
func (self *Vrouter) AddHostPort(hp HostPortInfo) error
AddHostPort sets up host access.
func (*Vrouter) AddLocalEndpoint ¶
func (self *Vrouter) AddLocalEndpoint(endpoint OfnetEndpoint) error
Add a local endpoint and install associated local route
func (*Vrouter) AddLocalIpv6Flow ¶
func (self *Vrouter) AddLocalIpv6Flow(endpoint OfnetEndpoint) error
Add a local IPv6 flow
func (*Vrouter) AddRemoteIpv6Flow ¶
func (self *Vrouter) AddRemoteIpv6Flow(endpoint *OfnetEndpoint) error
Add IPv6 flow for remote endpoint
func (*Vrouter) AddSvcSpec ¶
func (vr *Vrouter) AddSvcSpec(svcName string, spec *ServiceSpec) error
AddSvcSpec adds a service spec to proxy
func (*Vrouter) AddVtepPort ¶
Add virtual tunnel end point. This is mainly used for mapping remote vtep IP to ofp port number.
func (*Vrouter) DelSvcSpec ¶
func (vr *Vrouter) DelSvcSpec(svcName string, spec *ServiceSpec) error
DelSvcSpec removes a service spec from proxy
func (*Vrouter) FlushEndpoints ¶
FlushEndpoints flushes endpoints from ovs
func (*Vrouter) GetEndpointStats ¶
func (vr *Vrouter) GetEndpointStats() (map[string]*OfnetEndpointStats, error)
GetEndpointStats fetches ep stats
func (*Vrouter) GlobalConfigUpdate ¶
func (self *Vrouter) GlobalConfigUpdate(cfg OfnetGlobalConfig) error
GlobalConfigUpdate not implemented
func (*Vrouter) InjectGARPs ¶
InjectGARPs not implemented
func (*Vrouter) InspectState ¶
func (*Vrouter) MasterAdded ¶
Handle new master added event
func (*Vrouter) MultipartReply ¶
func (vr *Vrouter) MultipartReply(sw *ofctrl.OFSwitch, reply *openflow13.MultipartReply)
MultipartReply handles multipart replies
func (*Vrouter) PacketRcvd ¶
Handle incoming packet
func (*Vrouter) RemoveEndpoint ¶
func (self *Vrouter) RemoveEndpoint(endpoint *OfnetEndpoint) error
RemoveEndpoint removes an endpoint from the datapath
func (*Vrouter) RemoveHostPort ¶
RemoveHostPort sets up host access.
func (*Vrouter) RemoveLocalEndpoint ¶
func (self *Vrouter) RemoveLocalEndpoint(endpoint OfnetEndpoint) error
Remove local endpoint
func (*Vrouter) RemoveLocalIpv6Flow ¶
func (self *Vrouter) RemoveLocalIpv6Flow(endpoint OfnetEndpoint) error
Remove local IPv6 flow
func (*Vrouter) RemoveRemoteIpv6Flow ¶
func (self *Vrouter) RemoveRemoteIpv6Flow(endpoint *OfnetEndpoint) error
Remove IPv6 flow for remote endpoint
func (*Vrouter) RemoveUplink ¶
RemoveUplink remove an uplink to the switch
func (*Vrouter) RemoveVlan ¶
Remove a vlan
func (*Vrouter) RemoveVtepPort ¶
Remove a VTEP port
func (*Vrouter) SvcProviderUpdate ¶
SvcProviderUpdate Service Proxy Back End update
func (*Vrouter) SwitchConnected ¶
Handle switch connected notification
func (*Vrouter) SwitchDisconnected ¶
Handle switch disconnected notification
func (*Vrouter) UpdateLocalEndpoint ¶
func (self *Vrouter) UpdateLocalEndpoint(endpoint *OfnetEndpoint, epInfo EndpointInfo) error
UpdateLocalEndpoint update local endpoint state
func (*Vrouter) UpdateUplink ¶
func (vr *Vrouter) UpdateUplink(uplinkName string, updates PortUpdates) error
UpdateUplink updates uplink info
type Vxlan ¶
type Vxlan struct {
// contains filtered or unexported fields
}
Vxlan state.
func NewVxlan ¶
func NewVxlan(agent *OfnetAgent, rpcServ *rpc.Server) *Vxlan
Create a new vxlan instance
func (*Vxlan) AddEndpoint ¶
func (self *Vxlan) AddEndpoint(endpoint *OfnetEndpoint) error
AddEndpoint Add an endpoint to the datapath
func (*Vxlan) AddHostPort ¶
func (vx *Vxlan) AddHostPort(hp HostPortInfo) error
AddHostPort is not implemented
func (*Vxlan) AddLocalEndpoint ¶
func (self *Vxlan) AddLocalEndpoint(endpoint OfnetEndpoint) error
Add a local endpoint and install associated local route
func (*Vxlan) AddSvcSpec ¶
func (vx *Vxlan) AddSvcSpec(svcName string, spec *ServiceSpec) error
AddSvcSpec adds a service spec to proxy
func (*Vxlan) AddVtepPort ¶
Add virtual tunnel end point. This is mainly used for mapping remote vtep IP to ofp port number.
func (*Vxlan) DelSvcSpec ¶
func (vx *Vxlan) DelSvcSpec(svcName string, spec *ServiceSpec) error
DelSvcSpec removes a service spec from proxy
func (*Vxlan) FlushEndpoints ¶
FlushEndpoints flushes endpoints from ovs
func (*Vxlan) GetEndpointStats ¶
func (vx *Vxlan) GetEndpointStats() (map[string]*OfnetEndpointStats, error)
GetEndpointStats fetches ep stats
func (*Vxlan) GlobalConfigUpdate ¶
func (self *Vxlan) GlobalConfigUpdate(cfg OfnetGlobalConfig) error
Update global config
func (*Vxlan) InspectState ¶
InspectState returns current state
func (*Vxlan) MasterAdded ¶
Handle new master added event
func (*Vxlan) MultipartReply ¶
func (vx *Vxlan) MultipartReply(sw *ofctrl.OFSwitch, reply *openflow13.MultipartReply)
MultipartReply handles stats reply
func (*Vxlan) PacketRcvd ¶
Handle incoming packet
func (*Vxlan) RemoveEndpoint ¶
func (self *Vxlan) RemoveEndpoint(endpoint *OfnetEndpoint) error
RemoveEndpoint removes an endpoint from the datapath
func (*Vxlan) RemoveHostPort ¶
RemoveHostPort is not implemented
func (*Vxlan) RemoveLocalEndpoint ¶
func (self *Vxlan) RemoveLocalEndpoint(endpoint OfnetEndpoint) error
Remove local endpoint
func (*Vxlan) RemoveUplink ¶
RemoveUplink remove an uplink to the switch
func (*Vxlan) RemoveVlan ¶
Remove a vlan
func (*Vxlan) RemoveVtepPort ¶
Remove a VTEP port
func (*Vxlan) SvcProviderUpdate ¶
SvcProviderUpdate Service Proxy Back End update
func (*Vxlan) SwitchConnected ¶
Handle switch connected notification
func (*Vxlan) SwitchDisconnected ¶
Handle switch disconnected notification
func (*Vxlan) UpdateLocalEndpoint ¶
func (self *Vxlan) UpdateLocalEndpoint(endpoint *OfnetEndpoint, epInfo EndpointInfo) error
UpdateLocalEndpoint update local endpoint state
func (*Vxlan) UpdateUplink ¶
func (vx *Vxlan) UpdateUplink(uplinkName string, updates PortUpdates) error
UpdateUplink updates uplink info