MCPcopy Create free account
hub / github.com/Edgio/vflow / validate

Method validate

netflow/v5/decoder.go:151–160  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

149}
150
151func (h *PacketHeader) validate() error {
152
153 if h.Version != 5 {
154 return fmt.Errorf("invalid netflow version, (expected: 5) (received: %d)", h.Version)
155 } else if h.Count < 1 || h.Count > 30 {
156 return fmt.Errorf("flow count out of bounds, (expected: [1...30]) (received: %d)", h.Count)
157 }
158
159 return nil
160}
161
162// The Flow Record format is specified as:
163//

Callers 1

DecodeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected