pucontext

package
v6.12.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2017 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PUContext

type PUContext struct {
	Extension interface{}

	ProxyPort string

	sync.RWMutex
	// contains filtered or unexported fields
}

PUContext holds data indexed by the PU ID

func NewPU

func NewPU(contextID string, puInfo *policy.PUInfo, timeout time.Duration) (*PUContext, error)

NewPU creates a new PU context

func (*PUContext) Annotations

func (p *PUContext) Annotations() *policy.TagStore

Annotations returns the annotations

func (*PUContext) ApplicationACLPolicy

func (p *PUContext) ApplicationACLPolicy(packet *packet.Packet) (*policy.FlowPolicy, error)

ApplicationACLPolicy retrieves the policy based on ACLs

func (*PUContext) CacheExternalFlowPolicy

func (p *PUContext) CacheExternalFlowPolicy(packet *packet.Packet, plc interface{})

CacheExternalFlowPolicy will cache an external flow

func (*PUContext) GetCachedToken

func (p *PUContext) GetCachedToken() ([]byte, error)

GetCachedToken returns the cached syn packet token

func (*PUContext) GetProcessKeys

func (p *PUContext) GetProcessKeys() (string, []string)

GetProcessKeys returns the cache keys for a process

func (*PUContext) ID

func (p *PUContext) ID() string

ID returns the ID of the PU

func (*PUContext) IP

func (p *PUContext) IP() string

IP returns the IP of the PU

func (*PUContext) Identity

func (p *PUContext) Identity() *policy.TagStore

Identity returns the indentity

func (*PUContext) ManagementID

func (p *PUContext) ManagementID() string

ManagementID returns the management ID

func (*PUContext) Mark

func (p *PUContext) Mark() string

Mark returns the PU mark

func (*PUContext) NetworkACLPolicy

func (p *PUContext) NetworkACLPolicy(packet *packet.Packet) (*policy.FlowPolicy, error)

NetworkACLPolicy retrieves the policy based on ACLs

func (*PUContext) Ports

func (p *PUContext) Ports() []string

Ports returns the PU ports

func (*PUContext) RetrieveCachedExternalFlowPolicy

func (p *PUContext) RetrieveCachedExternalFlowPolicy(id string) (interface{}, error)

RetrieveCachedExternalFlowPolicy returns the policy for an external IP

func (*PUContext) SearchAcceptRcvRules

func (p *PUContext) SearchAcceptRcvRules(claims *policy.TagStore) (int, interface{})

SearchAcceptRcvRules searches the accept rules for a policy match

func (*PUContext) SearchAcceptTxRules

func (p *PUContext) SearchAcceptTxRules(claims *policy.TagStore) (int, interface{})

SearchAcceptTxRules returns the accept Tx Rules

func (*PUContext) SearchRejectRcvRules

func (p *PUContext) SearchRejectRcvRules(claims *policy.TagStore) (int, interface{})

SearchRejectRcvRules returns the reject receive rules

func (*PUContext) SearchRejectTxRules

func (p *PUContext) SearchRejectTxRules(claims *policy.TagStore) (int, interface{})

SearchRejectTxRules searches the reject rules for a policy match

func (*PUContext) SynServiceContext

func (p *PUContext) SynServiceContext() []byte

SynServiceContext returns synServiceContext

func (*PUContext) Type

func (p *PUContext) Type() constants.PUType

Type return the pu type

func (*PUContext) UpdateCachedToken

func (p *PUContext) UpdateCachedToken(token []byte)

UpdateCachedToken updates the local cached token

func (*PUContext) UpdateSynServiceContext

func (p *PUContext) UpdateSynServiceContext(synServiceContext []byte)

UpdateSynServiceContext updates the synServiceContext

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL