Documentation ¶
Index ¶
- func NewHostRegistrationEntry(vid uint16, ip net.IP) *nosw.FlowEntry
- func NewL2FlowEntry(vid uint16, port uint32, mac net.HardwareAddr, flood bool) *nosw.FlowEntry
- func NewL3UnicastEntry(ipaddr net.IP, prefixlen int, gid uint32) *nosw.FlowEntry
- func NewTerminationMacEntry(vid uint16, mac net.HardwareAddr) *nosw.FlowEntry
- func NewVLANFlowEntry(vid uint16, port uint32, tagged bool) *nosw.FlowEntry
- type Request
- type RequestType
- type Requester
- func (r *Requester) AddBucket(bucket *nosw.GroupBucketEntry) error
- func (r *Requester) AddFlow(flow *nosw.FlowEntry) error
- func (r *Requester) AddGroup(group *nosw.GroupEntry) error
- func (r *Requester) AddHostRegistrationFlow(vid uint16, ip net.IP) error
- func (r *Requester) AddL2FloodBucket(fgid int64, gid int64, index int) error
- func (r *Requester) AddL2FloodFlow(vid uint16) error
- func (r *Requester) AddL2FloodGroup(vid uint16) (int64, error)
- func (r *Requester) AddL2Flow(vid uint16, port uint32, mac net.HardwareAddr) error
- func (r *Requester) AddL2InterfaceBucket(gid int64, port uint32, pop bool) error
- func (r *Requester) AddL2InterfaceGroup(vid uint16, port uint32) (int64, error)
- func (r *Requester) AddL3UnicastFlow(ipaddr net.IP, mask int, gid uint32) error
- func (r *Requester) AddL3UnicastGroup(vid uint16, port uint32, src net.HardwareAddr, dst net.HardwareAddr) (uint32, error)
- func (r *Requester) AddTerminationMacFlow(vid uint16, mac net.HardwareAddr) error
- func (r *Requester) AddVLANFlow(vid uint16, port uint32, tagged bool) error
- func (r *Requester) DeleteBucket(bucket *nosw.GroupBucketEntry) error
- func (r *Requester) DeleteFlow(flow *nosw.FlowEntry) error
- func (r *Requester) DeleteGroup(group *nosw.GroupEntry) error
- func (r *Requester) DeleteL3UnicastFlow(ipaddr net.IP, mask int, gid uint32) error
- func (r *Requester) GetACLFlows() ([]*nosw.FlowEntry, error)
- func (r *Requester) GetBuckets(group *nosw.GroupEntry) ([]*nosw.GroupBucketEntry, error)
- func (r *Requester) GetFlows(id nosw.TABLE_ID) ([]*nosw.FlowEntry, error)
- func (r *Requester) GetGroups() ([]*nosw.GroupEntry, error)
- func (r *Requester) GetL2Flows() ([]*nosw.FlowEntry, error)
- func (r *Requester) GetL3UnicastFlows() ([]*nosw.FlowEntry, error)
- func (r *Requester) GetTermMACFlows() ([]*nosw.FlowEntry, error)
- func (r *Requester) GetVLANFlows() ([]*nosw.FlowEntry, error)
- func (r *Requester) PacketOut(port uint32, data *[]byte)
- func (r *Requester) Serve() error
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewL2FlowEntry ¶
func NewL3UnicastEntry ¶
func NewTerminationMacEntry ¶
func NewTerminationMacEntry(vid uint16, mac net.HardwareAddr) *nosw.FlowEntry
func NewHostRegistrationEntry(vid uint16, mac net.HardwareAddr) *nosw.FlowEntry { // v := int32(0x1000 | vid) // v := int32(vid) inPort := int64(1) inPortMask := int64(0xffff0000) // etype := int32(0x800) dstmac := mac.String() m := nosw.PolicyACLFlowMatch{ InPort: &inPort, InPortMask: &inPortMask, DstMac: &dstmac, // EtherType: &etype, // VlanId: &v, } p := nosw.PolicyACLFlowEntry{ Match: &m, OutputPort: 0xfffffffd, ClearActions: true, } d := nosw.FlowData{ Policy: &p, } return &nosw.FlowEntry{ TableId: nosw.TABLE_ID_ACL_POLICY, Data: &d, } }
Types ¶
type Request ¶
type Request struct { Event RequestType Data interface{} ResCh chan *Response }
func NewAddFlowRequest ¶
func NewDeleteFlowRequest ¶
func NewGetFlowsRequest ¶
func NewPacketOutRequest ¶
type RequestType ¶
type RequestType uint8
const ( TOSS_PKT RequestType TABLE_SUPPORTED GET_FLOW_TABLE_INFO ADD_FLOW MOD_FLOW DEL_FLOW GET_FLOWS GET_FLOW_STAT GET_FLOW_BY_COOKIE DEL_FLOW_BY_COOKIE GET_GROUP_TABLE_INFO ADD_GROUP DEL_GROUP GET_GROUPS GET_GROUP_STAT ADD_BUCKET DEL_BUCKET MOD_BUCKET GET_BUCKETS GET_PORT_STATS CLEAR_PORT_STATS )
type Requester ¶
type Requester struct { ReqCh chan *Request // contains filtered or unexported fields }
func (*Requester) AddHostRegistrationFlow ¶
func (*Requester) AddL2FloodBucket ¶
func (*Requester) AddL2FloodFlow ¶
func (*Requester) AddL2InterfaceBucket ¶
func (*Requester) AddL2InterfaceGroup ¶
func (*Requester) AddL3UnicastFlow ¶
func (*Requester) AddL3UnicastGroup ¶
func (r *Requester) AddL3UnicastGroup(vid uint16, port uint32, src net.HardwareAddr, dst net.HardwareAddr) (uint32, error)
func (*Requester) AddTerminationMacFlow ¶
func (r *Requester) AddTerminationMacFlow(vid uint16, mac net.HardwareAddr) error
func (*Requester) AddVLANFlow ¶
func (*Requester) DeleteBucket ¶
func (r *Requester) DeleteBucket(bucket *nosw.GroupBucketEntry) error
func (*Requester) DeleteGroup ¶
func (r *Requester) DeleteGroup(group *nosw.GroupEntry) error
func (*Requester) DeleteL3UnicastFlow ¶
func (*Requester) GetBuckets ¶
func (r *Requester) GetBuckets(group *nosw.GroupEntry) ([]*nosw.GroupBucketEntry, error)
func (*Requester) GetL3UnicastFlows ¶
func (*Requester) GetTermMACFlows ¶
Click to show internal directories.
Click to hide internal directories.