Skip to content

Commit

Permalink
fixes #30 #41, DateTimeSeconds uint32
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrdadrad committed Dec 11, 2017
1 parent f6b45ad commit 9b89aed
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ipfix/interpret.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ func Interpret(b *[]byte, t FieldType) interface{} {
return string(*b)
case Ipv4Address, Ipv6Address:
return net.IP(*b)
case DateTimeSeconds, DateTimeMilliseconds, DateTimeMicroseconds, DateTimeNanoseconds:
return int64(binary.BigEndian.Uint64(*b))
case DateTimeSeconds:
return binary.BigEndian.Uint32(*b)
case DateTimeMilliseconds, DateTimeMicroseconds, DateTimeNanoseconds:
return binary.BigEndian.Uint64(*b)
case Unknown, OctetArray:
return *b
}
Expand Down

0 comments on commit 9b89aed

Please sign in to comment.