Documentation ¶
Overview ¶
** 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.
** 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 ¶
- type AppInterface
- type Controller
- type FgraphElem
- type Flood
- func (self *Flood) AddOutput(out *Output) error
- func (self *Flood) AddTunnelOutput(out *Output, tunnelId uint64) error
- func (self *Flood) Delete() error
- func (self *Flood) GetFlowInstr() openflow13.Instruction
- func (self *Flood) NumOutput() int
- func (self *Flood) RemoveOutput(out *Output) error
- func (self *Flood) Type() string
- type FloodOutput
- type Flow
- func (self *Flow) Delete() error
- func (self *Flow) GetFlowInstr() openflow13.Instruction
- func (self *Flow) Next(elem FgraphElem) error
- func (self *Flow) PopVlan() error
- func (self *Flow) SetMacDa(macDa net.HardwareAddr) error
- func (self *Flow) SetMacSa(macSa net.HardwareAddr) error
- func (self *Flow) SetMetadata(metadata, metadataMask uint64) error
- func (self *Flow) SetTunnelId(tunnelId uint64) error
- func (self *Flow) SetVlan(vlanId uint16) error
- func (self *Flow) Type() string
- type FlowAction
- type FlowMatch
- type OFSwitch
- func (self *OFSwitch) DPID() net.HardwareAddr
- func (self *OFSwitch) DefaultTable() *Table
- func (self *OFSwitch) DeleteTable(tableId uint8) error
- func (self *OFSwitch) Disconnect()
- func (self *OFSwitch) DropAction() *Output
- func (self *OFSwitch) NewFlood() (*Flood, error)
- func (self *OFSwitch) NewTable(tableId uint8) (*Table, error)
- func (self *OFSwitch) OutputPort(portNo uint32) (*Output, error)
- func (self *OFSwitch) Send(req util.Message)
- func (self *OFSwitch) SendToController() *Output
- type Output
- type PacketIn
- type Table
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppInterface ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
type FgraphElem ¶
type FgraphElem interface { // Returns the type of fw graph element Type() string // Returns the formatted instruction set. // This is used by the previous Fgraph element to install instruction set // in the flow entry GetFlowInstr() openflow13.Instruction }
type Flood ¶
type Flood struct { Switch *OFSwitch // Switch where this flood entry is present GroupId uint32 // Unique id for the openflow group FloodList []FloodOutput // List of output ports to flood to // contains filtered or unexported fields }
Flood Fgraph element
func (*Flood) AddTunnelOutput ¶
Add a new Output to group element
func (*Flood) GetFlowInstr ¶
func (self *Flood) GetFlowInstr() openflow13.Instruction
instruction set for output element
func (*Flood) RemoveOutput ¶
Remove a port from flood list
type FloodOutput ¶
type FloodOutput struct {
// contains filtered or unexported fields
}
type Flow ¶
type Flow struct { Table *Table // Table where this flow resides Match FlowMatch // Fields to be matched NextElem FgraphElem // Next fw graph element // contains filtered or unexported fields }
State of a flow entry
func (*Flow) GetFlowInstr ¶
func (self *Flow) GetFlowInstr() openflow13.Instruction
instruction set for flow element
func (*Flow) Next ¶
func (self *Flow) Next(elem FgraphElem) error
Set Next element in the Fgraph. This determines what actions will be part of the flow's instruction set
func (*Flow) SetMacDa ¶
func (self *Flow) SetMacDa(macDa net.HardwareAddr) error
Special actions on the flow to set mac dest addr
func (*Flow) SetMacSa ¶
func (self *Flow) SetMacSa(macSa net.HardwareAddr) error
Special action on the flow to set mac source addr
func (*Flow) SetMetadata ¶
Special actions on the flow to set metadata
func (*Flow) SetTunnelId ¶
Special actions on the flow to set vlan id
type FlowAction ¶
type FlowAction struct {
// contains filtered or unexported fields
}
additional actions in flow's instruction set
type FlowMatch ¶
type FlowMatch struct { Priority uint16 // Priority of the flow InputPort uint32 MacDa *net.HardwareAddr MacDaMask *net.HardwareAddr MacSa *net.HardwareAddr MacSaMask *net.HardwareAddr Ethertype uint16 VlanId uint16 IpSa *net.IP IpSaMask *net.IP IpDa *net.IP IpDaMask *net.IP Metadata *uint64 MetadataMask *uint64 TunnelId uint64 }
Small subset of openflow fields we currently support
type OFSwitch ¶
type OFSwitch struct {
// contains filtered or unexported fields
}
func NewSwitch ¶
func NewSwitch(stream *util.MessageStream, dpid net.HardwareAddr, app AppInterface) *OFSwitch
Builds and populates a Switch struct then starts listening for OpenFlow messages on conn.
func Switch ¶
func Switch(dpid net.HardwareAddr) *OFSwitch
Returns a pointer to the Switch mapped to dpid.
func (*OFSwitch) DefaultTable ¶
Return table 0 which is the starting table for all packets
func (*OFSwitch) DeleteTable ¶
Delete a table. Return an error if there are fgraph nodes pointing at it
func (*OFSwitch) Disconnect ¶
func (self *OFSwitch) Disconnect()
func (*OFSwitch) DropAction ¶
Return the drop graph element
func (*OFSwitch) OutputPort ¶
Return a output graph element for the port
func (*OFSwitch) SendToController ¶
Return send to controller graph element
type Output ¶
type Output struct {
// contains filtered or unexported fields
}
func (*Output) GetFlowInstr ¶
func (self *Output) GetFlowInstr() openflow13.Instruction
instruction set for output element
func (*Output) GetOutAction ¶
func (self *Output) GetOutAction() openflow13.Action
Return an output action (Used by group mods)
type PacketIn ¶
type PacketIn openflow13.PacketIn
type Table ¶
Fgraph table element
func (*Table) DeleteFlow ¶
Delete a flow from the table
func (*Table) GetFlowInstr ¶
func (self *Table) GetFlowInstr() openflow13.Instruction
instruction set for table element