1-byte encoding for a Long value.
1-byte encoding for a Long value.
1-byte encoding for an Int value.
1-byte encoding for an Int value.
1-byte encoding for a Short value.
1-byte encoding for a Short value.
1-byte encoding for a Byte value.
1-byte encoding for a Byte value.
1-byte encoding for a Boolean value.
1-byte encoding for a Boolean value. Yes, 1 = true, 2 = false.
2-byte encoding for a Long value.
2-byte encoding for a Long value.
2-byte encoding for an Int value.
2-byte encoding for an Int value.
2-byte encoding for a Short value.
2-byte encoding for a Short value.
4-byte encoding for a floating-point value.
4-byte encoding for a floating-point value.
4-byte encoding for a Long value.
4-byte encoding for a Long value.
4-byte encoding for an Int value.
4-byte encoding for an Int value.
8-byte encoding for a floating-point value.
8-byte encoding for a floating-point value.
8-byte encoding for a Long value.
8-byte encoding for a Long value.
The bytes in the encoded form of the value.
The length in bytes of the encoded form of the value.
An IPFIX standard message. Contains a sequence of IPFIX record sets of various types. Observation Domain ID is always set to 1 for now. Export Time is set to the current time. Sequence Number is allocated in increasing order automatically.
Here's an example message:
Message( Set.Template( Rec.Template(0x1001, FieldSpecifier(4, 1), // protocolSpecifier, unsigned8 FieldSpecifier(85, 8) // octetTotalCount, unsigned64 ) ), Set.Data(0x1001, // template described above Rec.Data( 6.toByte, // TCP protocol number (byte) 1234567L // 1,234,567 bytes in TCP (long) ), Rec.Data( 17.toByte, // UDP protocol number (byte) 9876L // 9,876 bytes in UDP (long) ) ) )This does absolutely minimal checking of what's put into the messages, in order to allow testing of malformed messages, messages discouraged by the standard but still allowed, and the like. It's not meant to be the most convenient thing ever, just convenient enough to quickly describe and generate a variety of IPFIX messages for testing.