Documentation ¶
Overview ¶
Package entries contains implementation of various P4 entitites such as tables, groups, meters, etc.
Index ¶
- type Action
- type ActionProfile
- func (ap ActionProfile) DeleteActionProfileGroup(entry *p4api.ActionProfileGroup) error
- func (ap ActionProfile) DeleteActionProfileMember(entry *p4api.ActionProfileMember) error
- func (ap ActionProfile) ModifyActionProfileGroup(entry *p4api.ActionProfileGroup, insert bool) error
- func (ap ActionProfile) ModifyActionProfileMember(entry *p4api.ActionProfileMember, insert bool) error
- func (ap ActionProfile) ReadActionProfileGroups(sender BatchSender) error
- func (ap ActionProfile) ReadActionProfileMembers(sender BatchSender) error
- type ActionProfileGroup
- type ActionProfileMember
- type ActionProfiles
- func (aps *ActionProfiles) DeleteActionProfileGroup(entry *p4api.ActionProfileGroup) error
- func (aps *ActionProfiles) DeleteActionProfileMember(entry *p4api.ActionProfileMember) error
- func (aps *ActionProfiles) Groups() []*ActionProfileGroup
- func (aps *ActionProfiles) ModifyActionProfileGroup(entry *p4api.ActionProfileGroup, insert bool) error
- func (aps *ActionProfiles) ModifyActionProfileMember(entry *p4api.ActionProfileMember, insert bool) error
- func (aps *ActionProfiles) NewActionProfile(info *p4info.ActionProfile) *ActionProfile
- func (aps *ActionProfiles) ReadActionProfileGroups(entry *p4api.ActionProfileGroup, sender BatchSender) error
- func (aps *ActionProfiles) ReadActionProfileMembers(entry *p4api.ActionProfileMember, sender BatchSender) error
- type BatchSender
- type Counter
- type Counters
- type Meter
- type Meters
- type PacketReplication
- func (pr *PacketReplication) CloneSessions() []*p4api.CloneSessionEntry
- func (pr *PacketReplication) DeleteCloneSessionEntry(entry *p4api.CloneSessionEntry) error
- func (pr *PacketReplication) DeleteMulticastGroupEntry(entry *p4api.MulticastGroupEntry) error
- func (pr *PacketReplication) ModifyCloneSessionEntry(entry *p4api.CloneSessionEntry, insert bool) error
- func (pr *PacketReplication) ModifyMulticastGroupEntry(entry *p4api.MulticastGroupEntry, insert bool) error
- func (pr *PacketReplication) MulticastGroups() []*p4api.MulticastGroupEntry
- func (pr *PacketReplication) ReadCloneSessionEntries(entry *p4api.CloneSessionEntry, sender BatchSender) error
- func (pr *PacketReplication) ReadMulticastGroupEntries(entry *p4api.MulticastGroupEntry, sender BatchSender) error
- type ReadType
- type Row
- type Table
- func (t *Table) Entries() []*p4api.TableEntry
- func (t *Table) ID() uint32
- func (t *Table) ModifyDirectCounterEntry(entry *p4api.DirectCounterEntry) error
- func (t *Table) ModifyDirectMeterEntry(entry *p4api.DirectMeterEntry) error
- func (t *Table) ModifyTableEntry(entry *p4api.TableEntry, insert bool) error
- func (t *Table) Name() string
- func (t *Table) ReadTableEntries(request *p4api.TableEntry, readType ReadType, sender BatchSender) error
- func (t *Table) RemoveTableEntry(entry *p4api.TableEntry) error
- func (t *Table) Size() int
- type Tables
- func (ts *Tables) ModifyDirectCounterEntry(entry *p4api.DirectCounterEntry, insert bool) error
- func (ts *Tables) ModifyDirectMeterEntry(entry *p4api.DirectMeterEntry, insert bool) error
- func (ts *Tables) ModifyTableEntry(entry *p4api.TableEntry, insert bool) error
- func (ts *Tables) NewTable(table *p4info.Table) *Table
- func (ts *Tables) ReadTableEntries(request *p4api.TableEntry, readType ReadType, sender BatchSender) error
- func (ts *Tables) RemoveTableEntry(entry *p4api.TableEntry) error
- func (ts *Tables) Table(id uint32) *Table
- func (ts *Tables) Tables() []*Table
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionProfile ¶ added in v0.1.8
type ActionProfile struct {
// contains filtered or unexported fields
}
ActionProfile represents a P4 action profile instance
func (ActionProfile) DeleteActionProfileGroup ¶ added in v0.1.8
func (ap ActionProfile) DeleteActionProfileGroup(entry *p4api.ActionProfileGroup) error
DeleteActionProfileGroup deletes the specified group from this action profile
func (ActionProfile) DeleteActionProfileMember ¶ added in v0.1.8
func (ap ActionProfile) DeleteActionProfileMember(entry *p4api.ActionProfileMember) error
DeleteActionProfileMember deletes the specified member entry
func (ActionProfile) ModifyActionProfileGroup ¶ added in v0.1.8
func (ap ActionProfile) ModifyActionProfileGroup(entry *p4api.ActionProfileGroup, insert bool) error
ModifyActionProfileGroup modifies the specified group in this action profile
func (ActionProfile) ModifyActionProfileMember ¶ added in v0.1.8
func (ap ActionProfile) ModifyActionProfileMember(entry *p4api.ActionProfileMember, insert bool) error
ModifyActionProfileMember modifies the specified member entry
func (ActionProfile) ReadActionProfileGroups ¶ added in v0.1.8
func (ap ActionProfile) ReadActionProfileGroups(sender BatchSender) error
ReadActionProfileGroups sends all groups of the profile to the specified sender
func (ActionProfile) ReadActionProfileMembers ¶ added in v0.1.8
func (ap ActionProfile) ReadActionProfileMembers(sender BatchSender) error
ReadActionProfileMembers sends all members of the profile to the specified sender
type ActionProfileGroup ¶ added in v0.1.8
type ActionProfileGroup struct {
// contains filtered or unexported fields
}
ActionProfileGroup represents a P4 action profile group
func (*ActionProfileGroup) ID ¶ added in v0.1.9
func (g *ActionProfileGroup) ID() uint32
ID returns the ID of the group
func (*ActionProfileGroup) Name ¶ added in v0.1.9
func (g *ActionProfileGroup) Name() string
Name returns the name of the group
func (*ActionProfileGroup) Size ¶ added in v0.1.9
func (g *ActionProfileGroup) Size() int
Size returns the size of the group
type ActionProfileMember ¶ added in v0.1.8
type ActionProfileMember struct {
// contains filtered or unexported fields
}
ActionProfileMember represents a P4 action profile member
type ActionProfiles ¶ added in v0.1.8
type ActionProfiles struct {
// contains filtered or unexported fields
}
ActionProfiles represents a set of P4 action profiles
func NewActionProfiles ¶ added in v0.1.8
func NewActionProfiles(actionProfilesInfo []*p4info.ActionProfile) *ActionProfiles
NewActionProfiles creates a new action profiles
func (*ActionProfiles) DeleteActionProfileGroup ¶ added in v0.1.8
func (aps *ActionProfiles) DeleteActionProfileGroup(entry *p4api.ActionProfileGroup) error
DeleteActionProfileGroup deletes the specified action profile group
func (*ActionProfiles) DeleteActionProfileMember ¶ added in v0.1.8
func (aps *ActionProfiles) DeleteActionProfileMember(entry *p4api.ActionProfileMember) error
DeleteActionProfileMember deletes the specified member entry from its action profile
func (*ActionProfiles) Groups ¶ added in v0.1.9
func (aps *ActionProfiles) Groups() []*ActionProfileGroup
Groups returns a list of all action profiles' groups.
func (*ActionProfiles) ModifyActionProfileGroup ¶ added in v0.1.8
func (aps *ActionProfiles) ModifyActionProfileGroup(entry *p4api.ActionProfileGroup, insert bool) error
ModifyActionProfileGroup modifies the specified action profile group
func (*ActionProfiles) ModifyActionProfileMember ¶ added in v0.1.8
func (aps *ActionProfiles) ModifyActionProfileMember(entry *p4api.ActionProfileMember, insert bool) error
ModifyActionProfileMember modifies the specified action profile member
func (*ActionProfiles) NewActionProfile ¶ added in v0.1.8
func (aps *ActionProfiles) NewActionProfile(info *p4info.ActionProfile) *ActionProfile
NewActionProfile creates a new action profile
func (*ActionProfiles) ReadActionProfileGroups ¶ added in v0.1.8
func (aps *ActionProfiles) ReadActionProfileGroups(entry *p4api.ActionProfileGroup, sender BatchSender) error
ReadActionProfileGroups reads action profile groups
func (*ActionProfiles) ReadActionProfileMembers ¶ added in v0.1.8
func (aps *ActionProfiles) ReadActionProfileMembers(entry *p4api.ActionProfileMember, sender BatchSender) error
ReadActionProfileMembers reads action profile members
type BatchSender ¶
BatchSender is an abstract function for returning batches of read entities
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
Counter represents all cells of a specific counter
func (*Counter) Cell ¶
func (c *Counter) Cell(index int64) *p4api.CounterEntry
Cell returns the specified cell of the counter
type Counters ¶
type Counters struct {
// contains filtered or unexported fields
}
Counters represents a set of P4 counters
func NewCounters ¶
NewCounters creates a new counters store
func (*Counters) ModifyCounterEntry ¶
func (cs *Counters) ModifyCounterEntry(entry *p4api.CounterEntry, insert bool) error
ModifyCounterEntry modifies the specified counter entry cell
type Meter ¶
type Meter struct {
// contains filtered or unexported fields
}
Meter represents all cells of a specific meter
type Meters ¶
type Meters struct {
// contains filtered or unexported fields
}
Meters represents a set of P4 meters
func (*Meters) ModifyMeterEntry ¶
func (ms *Meters) ModifyMeterEntry(entry *p4api.MeterEntry, insert bool) error
ModifyMeterEntry modifies the specified meter entry cell
type PacketReplication ¶ added in v0.1.8
type PacketReplication struct {
// contains filtered or unexported fields
}
PacketReplication represents packet replication engine constructs
func NewPacketReplication ¶ added in v0.1.8
func NewPacketReplication() *PacketReplication
NewPacketReplication creates store for P4 PRE constructs
func (*PacketReplication) CloneSessions ¶ added in v0.1.9
func (pr *PacketReplication) CloneSessions() []*p4api.CloneSessionEntry
CloneSessions returns list of clone sessions created in PRE
func (*PacketReplication) DeleteCloneSessionEntry ¶ added in v0.1.8
func (pr *PacketReplication) DeleteCloneSessionEntry(entry *p4api.CloneSessionEntry) error
DeleteCloneSessionEntry deletes the specified close session entry
func (*PacketReplication) DeleteMulticastGroupEntry ¶ added in v0.1.8
func (pr *PacketReplication) DeleteMulticastGroupEntry(entry *p4api.MulticastGroupEntry) error
DeleteMulticastGroupEntry deletes the specified multicast group entry
func (*PacketReplication) ModifyCloneSessionEntry ¶ added in v0.1.8
func (pr *PacketReplication) ModifyCloneSessionEntry(entry *p4api.CloneSessionEntry, insert bool) error
ModifyCloneSessionEntry modifies the specified clone session entry
func (*PacketReplication) ModifyMulticastGroupEntry ¶ added in v0.1.8
func (pr *PacketReplication) ModifyMulticastGroupEntry(entry *p4api.MulticastGroupEntry, insert bool) error
ModifyMulticastGroupEntry modifies the specified multicast group entry
func (*PacketReplication) MulticastGroups ¶ added in v0.1.9
func (pr *PacketReplication) MulticastGroups() []*p4api.MulticastGroupEntry
MulticastGroups returns list of multicast groups created in PRE
func (*PacketReplication) ReadCloneSessionEntries ¶ added in v0.1.8
func (pr *PacketReplication) ReadCloneSessionEntries(entry *p4api.CloneSessionEntry, sender BatchSender) error
ReadCloneSessionEntries sends all clone session entries to the given sender
func (*PacketReplication) ReadMulticastGroupEntries ¶ added in v0.1.8
func (pr *PacketReplication) ReadMulticastGroupEntries(entry *p4api.MulticastGroupEntry, sender BatchSender) error
ReadMulticastGroupEntries sends all multicast group entries to the given sender
type ReadType ¶
type ReadType byte
ReadType specifies whether to read table entry, its direct counter or its direct meter
const ( // ReadTableEntry specified that reads should return entities with TableEntry ReadTableEntry ReadType = iota // ReadDirectCounter specified that reads should return entities with DirectCounterEntry ReadDirectCounter // ReadDirectMeter specified that reads should return entities with DirectMeterEntry ReadDirectMeter )
type Row ¶
type Row struct {
// contains filtered or unexported fields
}
Row represents table row entry and its mutable direct resources
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table represents a single P4 table
func (*Table) Entries ¶ added in v0.1.2
func (t *Table) Entries() []*p4api.TableEntry
Entries returns a copy of the table entries; in no particular order
func (*Table) ModifyDirectCounterEntry ¶
func (t *Table) ModifyDirectCounterEntry(entry *p4api.DirectCounterEntry) error
ModifyDirectCounterEntry modifies the specified direct counter entry data
func (*Table) ModifyDirectMeterEntry ¶
func (t *Table) ModifyDirectMeterEntry(entry *p4api.DirectMeterEntry) error
ModifyDirectMeterEntry modifies the specified direct meter entry data
func (*Table) ModifyTableEntry ¶
func (t *Table) ModifyTableEntry(entry *p4api.TableEntry, insert bool) error
ModifyTableEntry inserts or modifies the specified entry
func (*Table) ReadTableEntries ¶
func (t *Table) ReadTableEntries(request *p4api.TableEntry, readType ReadType, sender BatchSender) error
ReadTableEntries reads the table entries matching the specified table entry request
func (*Table) RemoveTableEntry ¶
func (t *Table) RemoveTableEntry(entry *p4api.TableEntry) error
RemoveTableEntry removes the specified table entry and any direct counter data and meter configs for that entry
type Tables ¶
type Tables struct {
// contains filtered or unexported fields
}
Tables represents a set of P4 tables
func (*Tables) ModifyDirectCounterEntry ¶
func (ts *Tables) ModifyDirectCounterEntry(entry *p4api.DirectCounterEntry, insert bool) error
ModifyDirectCounterEntry modifies the specified direct counter entry in its appropriate table
func (*Tables) ModifyDirectMeterEntry ¶
func (ts *Tables) ModifyDirectMeterEntry(entry *p4api.DirectMeterEntry, insert bool) error
ModifyDirectMeterEntry modifies the specified direct meter entry in its appropriate table
func (*Tables) ModifyTableEntry ¶
func (ts *Tables) ModifyTableEntry(entry *p4api.TableEntry, insert bool) error
ModifyTableEntry modifies the specified table entry in its appropriate table
func (*Tables) ReadTableEntries ¶
func (ts *Tables) ReadTableEntries(request *p4api.TableEntry, readType ReadType, sender BatchSender) error
ReadTableEntries reads the table entries matching the specified table entry, from the appropriate table
func (*Tables) RemoveTableEntry ¶
func (ts *Tables) RemoveTableEntry(entry *p4api.TableEntry) error
RemoveTableEntry removes the specified table entry from its appropriate table