Documentation ¶
Overview ¶
Package ipfix decodes IPFIX packets : ---------------------------------------------------------------------------- : Copyright (C) 2017 Verizon. All Rights Reserved. : All Rights Reserved : : file: decoder.go : details: TODO : author: Mehrdad Arshad Rad : date: 02/01/2017 : : Licensed under the Apache License, Version 2.0 (the "License"); : you may not use this file except in compliance with the License. : You may obtain a copy of the License at : : http://www.apache.org/licenses/LICENSE-2.0 : : Unless required by applicable law or agreed to in writing, software : distributed under the License is distributed on an "AS IS" BASIS, : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. : See the License for the specific language governing permissions and : limitations under the License. : ----------------------------------------------------------------------------
Package packet decodes layer two, three and four OSI model layers : ---------------------------------------------------------------------------- : Copyright (C) 2017 Verizon. All Rights Reserved. : All Rights Reserved : : file: ipfix.go : details: TODO : author: Mehrdad Arshad Rad : date: 02/01/2017 : : Licensed under the Apache License, Version 2.0 (the "License"); : you may not use this file except in compliance with the License. : You may obtain a copy of the License at : : http://www.apache.org/licenses/LICENSE-2.0 : : Unless required by applicable law or agreed to in writing, software : distributed under the License is distributed on an "AS IS" BASIS, : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. : See the License for the specific language governing permissions and : limitations under the License. : ----------------------------------------------------------------------------
Package ipfix decodes IPFIX packets : ---------------------------------------------------------------------------- : Copyright (C) 2017 Verizon. All Rights Reserved. : All Rights Reserved : : file: marshal.go : details: TODO : author: Mehrdad Arshad Rad : date: 02/01/2017 : : Licensed under the Apache License, Version 2.0 (the "License"); : you may not use this file except in compliance with the License. : You may obtain a copy of the License at : : http://www.apache.org/licenses/LICENSE-2.0 : : Unless required by applicable law or agreed to in writing, software : distributed under the License is distributed on an "AS IS" BASIS, : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. : See the License for the specific language governing permissions and : limitations under the License. : ----------------------------------------------------------------------------
Package ipfix decodes IPFIX packets : ---------------------------------------------------------------------------- : Copyright (C) 2017 Verizon. All Rights Reserved. : All Rights Reserved : : file: memcache.go : details: TODO : author: Mehrdad Arshad Rad : date: 02/01/2017 : : Licensed under the Apache License, Version 2.0 (the "License"); : you may not use this file except in compliance with the License. : You may obtain a copy of the License at : : http://www.apache.org/licenses/LICENSE-2.0 : : Unless required by applicable law or agreed to in writing, software : distributed under the License is distributed on an "AS IS" BASIS, : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. : See the License for the specific language governing permissions and : limitations under the License. : ----------------------------------------------------------------------------
Package ipfix decodes IPFIX packets : ---------------------------------------------------------------------------- : Copyright (C) 2017 Verizon. All Rights Reserved. : All Rights Reserved : : file: decoder.go : details: TODO : author: Mehrdad Arshad Rad : date: 02/01/2017 : : Licensed under the Apache License, Version 2.0 (the "License"); : you may not use this file except in compliance with the License. : You may obtain a copy of the License at : : http://www.apache.org/licenses/LICENSE-2.0 : : Unless required by applicable law or agreed to in writing, software : distributed under the License is distributed on an "AS IS" BASIS, : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. : See the License for the specific language governing permissions and : limitations under the License. : ----------------------------------------------------------------------------
Package ipfix decodes IPFIX packets : ---------------------------------------------------------------------------- : Copyright (C) 2017 Verizon. All Rights Reserved. : All Rights Reserved : : file: reader.go : details: TODO : author: Mehrdad Arshad Rad : date: 02/01/2017 : : Licensed under the Apache License, Version 2.0 (the "License"); : you may not use this file except in compliance with the License. : You may obtain a copy of the License at : : http://www.apache.org/licenses/LICENSE-2.0 : : Unless required by applicable law or agreed to in writing, software : distributed under the License is distributed on an "AS IS" BASIS, : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. : See the License for the specific language governing permissions and : limitations under the License. : ----------------------------------------------------------------------------
Package ipfix decodes IPFIX packets : ---------------------------------------------------------------------------- : Copyright (C) 2017 Verizon. All Rights Reserved. : All Rights Reserved : : file: ipfix.go : details: TODO : author: Mehrdad Arshad Rad : date: 02/01/2017 : : Licensed under the Apache License, Version 2.0 (the "License"); : you may not use this file except in compliance with the License. : You may obtain a copy of the License at : : http://www.apache.org/licenses/LICENSE-2.0 : : Unless required by applicable law or agreed to in writing, software : distributed under the License is distributed on an "AS IS" BASIS, : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. : See the License for the specific language governing permissions and : limitations under the License. : ----------------------------------------------------------------------------
Index ¶
- Variables
- func RPCServer(mCache MemCache) error
- type Data
- type DecodedField
- type Decoder
- type FieldType
- type InfoElementEntry
- type InfoModel
- type MemCache
- type Message
- type MessageHeader
- type RPC
- type RPCClient
- type Reader
- type Request
- type SetHeader
- type TemplateFieldSpecifier
- type TemplateHeader
- type TemplateRecords
- type TemplatesShard
Constants ¶
This section is empty.
Variables ¶
var FieldTypes = map[string]FieldType{ "unsigned8": Uint8, "unsigned16": Uint16, "unsigned32": Uint32, "unsigned64": Uint64, "signed8": Int8, "signed16": Int16, "signed32": Int32, "signed64": Int64, "float32": Float32, "float64": Float64, "boolean": Boolean, "macAddress": MacAddress, "octetArray": OctetArray, "string": String, "dateTimeSeconds": DateTimeSeconds, "dateTimeMilliseconds": DateTimeMilliseconds, "dateTimeMicroseconds": DateTimeMicroseconds, "dateTimeNanoseconds": DateTimeNanoseconds, "ipv4Address": Ipv4Address, "ipv6Address": Ipv6Address, }
FieldTypes represents data types
Functions ¶
Types ¶
type Data ¶
type Data struct { Template TemplateRecords Timestamp int64 }
Data represents template records and updated timestamp
type DecodedField ¶
type DecodedField struct { ID uint16 Value interface{} }
DecodedField represents a decoded field
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder represents IPFIX payload and remote address
type FieldType ¶
type FieldType int
FieldType is IPFIX Abstract Data Types RFC5102#section-3.1
const ( // Unknown data type Unknown FieldType = iota // Uint8 represents a non-negative integer value in the // range of 0 to 255. Uint8 // Uint16 represents a non-negative integer value in the // range of 0 to 65535. Uint16 // Uint32 represents a non-negative integer value in the // range of 0 to 4294967295. Uint32 // Uint64 represents a non-negative integer value in the // range of 0 to 18446744073709551615. Uint64 // Int8 represents an integer value in the range of -128 // to 127. Int8 // Int16 represents an integer value in the range of // -32768 to 32767. Int16 // Int32 represents an integer value in the range of // -2147483648 to 2147483647. Int32 // Int64 represents an integer value in the range of // -9223372036854775808 to 9223372036854775807. Int64 // Float32 corresponds to an IEEE single-precision 32-bit // floating point type as defined in [IEEE.754.1985]. Float32 // Float64 corresponds to an IEEE double-precision 64-bit // floating point type as defined in [IEEE.754.1985]. Float64 // Boolean represents a binary value. The only allowed // values are "true" and "false". Boolean // MacAddress represents a string of 6 octets. MacAddress // OctetArray represents a finite-length string of octets. OctetArray // String represents a finite-length string of valid String // DateTimeSeconds represents a time value in units of // seconds based on coordinated universal time (UTC). DateTimeSeconds // DateTimeMilliseconds represents a time value in units of // milliseconds based on coordinated universal time (UTC). DateTimeMilliseconds // DateTimeMicroseconds represents a time value in units of // microseconds based on coordinated universal time (UTC). DateTimeMicroseconds // DateTimeNanoseconds represents a time value in units of // nanoseconds based on coordinated universal time (UTC). DateTimeNanoseconds // Ipv4Address represents a value of an IPv4 address. Ipv4Address // Ipv6Address represents a value of an IPv6 address. Ipv6Address )
type InfoElementEntry ¶
InfoElementEntry represents standard name and type for a field - RFC5102
type InfoModel ¶
type InfoModel map[elementKey]InfoElementEntry
InfoModel represents IPFIX field's name, identification and type
type MemCache ¶
type MemCache []*TemplatesShard
MemCache represents templates shards
type Message ¶
type Message struct { AgentID string Header MessageHeader DataSets [][]DecodedField }
Message represents IPFIX decoded data
type MessageHeader ¶
type MessageHeader struct { Version uint16 // Version of IPFIX to which this Message conforms Length uint16 // Total length of the IPFIX Message, measured in octets ExportTime uint32 // Time at which the IPFIX Message Header leaves the Exporter SequenceNo uint32 // Incremental sequence counter modulo 2^32 DomainID uint32 // A 32-bit id that is locally unique to the Exporting Process }
MessageHeader represents IPFIX message header
type RPCClient ¶
type RPCClient struct {
// contains filtered or unexported fields
}
func NewRPCClient ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader represents the data bytes for reading
type TemplateFieldSpecifier ¶
TemplateFieldSpecifier represents field properties
type TemplateHeader ¶
TemplateHeader represents template fields
type TemplateRecords ¶
type TemplateRecords struct { TemplateID uint16 FieldCount uint16 FieldSpecifiers []TemplateFieldSpecifier ScopeFieldCount uint16 ScopeFieldSpecifiers []TemplateFieldSpecifier }
TemplateRecords represents template records