Documentation
¶
Overview ¶
Package session provides sessions for the Netflow version 9 and IPFIX decoders that need to track templates bound to a session.
Index ¶
Constants ¶
View Source
const ( SCOPE_SYSTEM = 1 SCOPE_INTERFACE = 2 SCOPE_LINECARD = 3 SCOPE_NETFLOWCACHE = 4 SCOPE_TEMPLATE = 5 )
View Source
const ( OPTION_SAMPLER_ID = 48 OPTION_SAMPLER_MODE = 49 OPTION_SAMPLER_INTERVAL = 50 )
Variables ¶
View Source
var ScopeTypes = map[uint16]string{ SCOPE_SYSTEM: "System", SCOPE_INTERFACE: "Interface", SCOPE_LINECARD: "Line card", SCOPE_NETFLOWCACHE: "Netflow cache", SCOPE_TEMPLATE: "Template", }
Functions ¶
Types ¶
type Option ¶
type Option struct {
TemplateID uint16
Scope OptionScope
EnterpriseNumber uint32
Type uint16
Value interface{}
Bytes []byte
}
type OptionScope ¶
type Session ¶
type Session interface {
// To keep track of maximum record sizes per template
GetRecordSize(uint16) (size int, found bool)
SetRecordSize(uint16, int)
// To keep track of templates
AddTemplate(Template)
GetTemplate(uint16) (t Template, found bool)
SetOption(uint32, uint16, *Option)
GetOption(uint32, uint16, uint16, uint16) *Option
}
type Template ¶
type Template interface {
ID() uint16
Size() int
GetFields() []TemplateFieldSpecifier
}
type TemplateFieldSpecifier ¶
Click to show internal directories.
Click to hide internal directories.