Documentation ¶
Index ¶
Constants ¶
const ( // HostLocalSourceBit is the bit of the iptables fwmark space to mark locally generated packets. // Value must be within the range [0, 31]. HostLocalSourceBit = 0 )
Variables ¶
var ( // HostLocalSourceMark is the mark generated from HostLocalSourceBit. HostLocalSourceMark = uint32(1 << HostLocalSourceBit) )
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address interface { GetMatchValue() string GetMatchKey(addrType AddressType) *MatchKey GetValue() interface{} }
type AddressCategory ¶
type AddressCategory uint8
const ( IPAddr AddressCategory = iota IPNetAddr OFPortAddr L4PortAddr UnSupported )
type BitRange ¶ added in v0.12.0
A BitRange is a representation of a range of values from base value with a bitmask applied.
type ByPriority ¶ added in v0.10.0
type ByPriority []Priority
ByPriority sorts a list of Priority by their relative TierPriority, PolicyPriority and RulePriority, in that order. It implements sort.Interface.
func (ByPriority) Len ¶ added in v0.10.0
func (bp ByPriority) Len() int
func (ByPriority) Less ¶ added in v0.10.0
func (bp ByPriority) Less(i, j int) bool
func (ByPriority) Swap ¶ added in v0.10.0
func (bp ByPriority) Swap(i, j int)
type EntityReference ¶ added in v0.13.0
type EntityReference struct { // Pod maintains the reference to the Pod. Pod *v1beta2.PodReference // ExternalEntity maintains the reference to the ExternalEntity. ExternalEntity *v1beta2.ExternalEntityReference }
EntityReference represents a reference to either a Pod or an ExternalEntity.
type MatchKey ¶ added in v0.11.0
type MatchKey struct {
// contains filtered or unexported fields
}
func NewMatchKey ¶ added in v0.11.0
func NewMatchKey(proto binding.Protocol, valueCategory AddressCategory, keyString string) *MatchKey
func (*MatchKey) GetKeyString ¶ added in v0.11.0
func (*MatchKey) GetOFProtocol ¶ added in v0.11.0
func (*MatchKey) GetValueCategory ¶ added in v0.11.0
func (m *MatchKey) GetValueCategory() AddressCategory
type PolicyRule ¶
type PolicyRule struct { Direction v1beta2.Direction From []Address To []Address Service []v1beta2.Service Action *secv1alpha1.RuleAction Priority *uint16 FlowID uint32 TableID binding.TableIDType PolicyRef *v1beta2.NetworkPolicyReference EnableLogging bool }
PolicyRule groups configurations to set up conjunctive match for egress/ingress policy rules.
func (*PolicyRule) IsAntreaNetworkPolicyRule ¶ added in v0.8.0
func (r *PolicyRule) IsAntreaNetworkPolicyRule() bool
IsAntreaNetworkPolicyRule returns if a PolicyRule is created for Antrea NetworkPolicy types.
type Priority ¶ added in v0.8.0
Priority is a struct that is composed of Antrea NetworkPolicy priority, rule priority and Tier priority. It is used as the basic unit for priority sorting.
func (*Priority) InSamePriorityZone ¶ added in v0.11.0
InSamePriorityZone returns true if two Priorities are of the same Tier and same priority at policy level.
func (*Priority) IsConsecutive ¶ added in v0.11.0
IsConsecutive returns true if two Priorties are immediately next to each other.
type RoundInfo ¶ added in v0.3.0
type RoundInfo struct { RoundNum uint64 // PrevRoundNum is nil if this is the first round or the previous round // number could not be retrieved. PrevRoundNum *uint64 }
RoundInfo identifies the current agent "round". Each round is indentified by a round number, which is incremented every time the agent is restarted. The round number is persisted on the Node in OVSDB.
type RuleMetric ¶ added in v0.10.0
type RuleMetric struct {
Bytes, Packets, Sessions uint64
}
func (*RuleMetric) Merge ¶ added in v0.10.0
func (m *RuleMetric) Merge(m1 *RuleMetric)