Following on from my previous thread, I seem to be closer to decoding IPFIX data from a Sonicwall firewall using a UDP listener and a BitArray in C#.
I now get data in my BitArray but it doesnt make sense - I thought I would see binary in my array but I am getting values very different e.g. 8 - 10 characters some positive and some negative and the Count of the array always varies.
Here is the main part of the code I am using to get the bits:
byte[] bytes = listener.Receive(ref _myEndPoint);
BitArray bitarray = new BitArray(bytes);
Does any one know of any way I can decode my IPFIX data or have any pointers that will help me?
Thanks in advance,
James
Output from code supplied by Chris:
byte[] bytes = {0x00, 0x0A, 0x04, 0xB4, 0x4D, 0xAE, 0x8F, 0xF4, 0x00, 0x6D, 0x8F, 0xC7, 0x16, 0x2B, 0xFC, 0x00, 0x01, 0x01, 0x04, 0xA4, 0x4D, 0xAE, 0x8F, 0xD2, 0x8D, 0xCC, 0xC8, 0x20, 0x00, 0x26, 0x99, 0xD4, 0x5F, 0xD7, 0x30, 0x37, 0xA6, 0xD6, 0xBE, 0xB9, 0x51, 0x90, 0xF3, 0x45, 0x4A, 0x7D, 0xE6, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x69, 0x00, 0x50, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x07, 0xB3, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x42, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x03, 0xC7, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x72, 0x4D, 0xAE, 0x8F, 0xD2, 0x4D, 0xAE, 0x8F, 0xF4, 0x00, 0x31, 0x06, 0x00, 0x00, 0x00, 0x10, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x01, 0x4D, 0xAE, 0x8F, 0xEE, 0x8E, 0x42, 0xF9, 0xA0, 0x30, 0x37, 0xA6, 0xD6, 0xBE, 0xB9, 0x00, 0x50, 0x56, 0x96, 0x00, 0x00, 0x51, 0x8D, 0x42, 0xFE, 0x51, 0x90, 0xF3, 0x46, 0x51, 0x90, 0xF3, 0x41, 0x51, 0x90, 0xF3, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC5, 0x85, 0x00, 0x50, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x09, 0x6E, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0xDF, 0xE1, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x04, 0x86, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x6E, 0x65, 0x4D, 0xAE, 0x8F, 0xEE, 0x4D, 0xAE, 0x8F, 0xF4, 0x00, 0x31, 0x06, 0x00, 0x00, 0x00, 0x10, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x01, 0x4D, 0xAE, 0x8F, 0xF3, 0x8E, 0x5B, 0x17, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x01, 0x55, 0xC0, 0xA8, 0x6F, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x0A, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF8, 0x23, 0x8C, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0xAE, 0x8F, 0xF3, 0x4D, 0xAE, 0x8F, 0xF4, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0xC0, 0x2E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x4D, 0xAE, 0x8F, 0xBE, 0x8E, 0xA0, 0x53, 0xA0, 0x1C, 0xC1, 0xDE, 0xA7, 0x2D, 0x01, 0x30, 0x37, 0xA6, 0xD6, 0xBE, 0xB9, 0x0A, 0x00, 0x01, 0x5A, 0x4A, 0xC9, 0x75, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x8F, 0x00, 0x50, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x02, 0xA4, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0xAE, 0x8F, 0xBE, 0x4D, 0xAE, 0x8F, 0xF4, 0x00, 0x03, 0x06, 0x00, 0x00, 0x00, 0xC0, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x01, 0x4D, 0xAE, 0x8F, 0xB6, 0x8D, 0xCE, 0x0A, 0x20, 0x1C, 0xC1, 0xDE, 0xA7, 0x2D, 0x01, 0x30, 0x37, 0xA6, 0xD6, 0xBE, 0xB9, 0x0A, 0x00, 0x01, 0x5A, 0x5D, 0xB8, 0xDD, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x77, 0x00, 0x50, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xBE, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0xAE, 0x8F, 0xB6, 0x4D, 0xAE, 0x8F, 0xF4, 0x00, 0x03, 0x06, 0x00, 0x00, 0x00, 0xC0, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x4D, 0xAE, 0x8F, 0xB6, 0x8E, 0x58, 0xD0, 0xE0, 0x1C, 0xC1, 0xDE, 0xA7, 0x2D, 0x01, 0x30, 0x37, 0xA6, 0xD6, 0xBE, 0xB9, 0x0A, 0x00, 0x01, 0x5A, 0x58, 0xDD, 0x5E, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x72, 0x00, 0x50, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x04, 0x86, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x77, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0xAE, 0x8F, 0xB6, 0x4D, 0xAE, 0x8F, 0xF4, 0x00, 0x03, 0x06, 0x00, 0x00, 0x00, 0xC0, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x01, 0x4D, 0xAE, 0x8F, 0xB5, 0x8E, 0x95, 0xA4, 0x60, 0x1C, 0xC1, 0xDE, 0xA7, 0x2D, 0x01, 0x30, 0x37, 0xA6, 0xD6, 0xBE, 0xB9, 0x0A, 0x00, 0x01, 0x5A, 0x40, 0x98, 0xD0, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x6E, 0x00, 0x50, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x05, 0x7E, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0xAE, 0x8F, 0xB5, 0x4D, 0xAE, 0x8F, 0xF4, 0x00, 0x03, 0x06, 0x00, 0x00, 0x00, 0xC0, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x01, 0x4D, 0xAE, 0x8F, 0xB4, 0x8E, 0xDA, 0xAB, 0xE0, 0x1C, 0xC1, 0xDE, 0xA7, 0x2D, 0x01, 0x30, 0x37, 0xA6, 0xD6, 0xBE, 0xB9, 0x0A, 0x00, 0x01, 0x5A, 0xD1, 0x55, 0x8F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x5F, 0x00, 0x50, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x02, 0x54, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0xAE, 0x8F, 0xB4, 0x4D, 0xAE, 0x8F, 0xF4, 0x00, 0x03, 0x06, 0x00, 0x00, 0x00, 0xC0, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x01};