@Test public void testMissingOptionsTemplate() throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream(); DataOutputStream out = new DataOutputStream(bos); out.writeShort(10); out.writeShort(16 + 8); out.writeInt(2); out.writeInt(1); out.writeInt(11); out.writeShort(260); out.writeShort(8); out.writeShort(7); out.writeShort(765); List<TSDRLogRecord> records = parseRecords(bos.toByteArray()); assertEquals(0, records.size()); bos = new ByteArrayOutputStream(); out = new DataOutputStream(bos); out.writeShort(10); out.writeShort(16 + 18); out.writeInt(1); out.writeInt(2); out.writeInt(11); out.writeShort(3); out.writeShort(18); out.writeShort(260); out.writeShort(2); out.writeShort(1); out.writeShort(141); out.writeShort(2); out.writeShort(41); out.writeShort(2); assertEquals(0, parseRecords(bos.toByteArray()).size()); assertEquals(1, records.size()); Map<String, String> attrs = toMap(records.get(0).getRecordAttributes()); assertEquals(Long.valueOf(2L * 1000), records.get(0).getTimeStamp()); assertEquals("10", attrs.remove("version")); assertEquals("1", attrs.remove("Sequence_Number")); assertEquals("11", attrs.remove("Observation_Domain_ID")); assertEquals("765", attrs.remove("exportedMessageTotalCount")); assertEquals("Options record for lineCardId 7", records.get(0).getRecordFullText()); }
@Override public void parseRecords() { while (position() < totalPacketLength && !endOfData()) { if (!parseNextRecords()) { break; } } missingTemplateCache.checkTemplates(); }
NetflowIPFIXPacketParser extends AbstractNetflowPacketParser { @Override public void parseRecords() { while (position() < totalPacketLength && !endOfData()) { if (!parseNextRecords()) { break; } } missingTemplateCache.checkTemplates(); } }
NetflowIPFIXPacketParser extends AbstractNetflowPacketParser { @Override public void parseRecords() { while (position() < totalPacketLength && !endOfData()) { if (!parseNextRecords()) { break; } } missingTemplateCache.checkTemplates(); } NetflowIPFIXPacketParser(byte[] data, int initialPosition, String sourceIP,
            FlowTemplateCache flowTemplateCache, OptionsTemplateCache optionsTemplateCache,
            MissingTemplateCache missingTemplateCache, InformationElementMappings informationElementMappings,
            TSDRLogRecordBuilder recordBuilder, Consumer<TSDRLogRecordBuilder> callback); private  NetflowIPFIXPacketParser(NetflowIPFIXPacketParser other, int fromPosition, int bytesToCopy); }
NetflowIPFIXPacketParser extends AbstractNetflowPacketParser { @Override public void parseRecords() { while (position() < totalPacketLength && !endOfData()) { if (!parseNextRecords()) { break; } } missingTemplateCache.checkTemplates(); } NetflowIPFIXPacketParser(byte[] data, int initialPosition, String sourceIP,
            FlowTemplateCache flowTemplateCache, OptionsTemplateCache optionsTemplateCache,
            MissingTemplateCache missingTemplateCache, InformationElementMappings informationElementMappings,
            TSDRLogRecordBuilder recordBuilder, Consumer<TSDRLogRecordBuilder> callback); private  NetflowIPFIXPacketParser(NetflowIPFIXPacketParser other, int fromPosition, int bytesToCopy); @Override void parseRecords(); }
NetflowIPFIXPacketParser extends AbstractNetflowPacketParser { @Override public void parseRecords() { while (position() < totalPacketLength && !endOfData()) { if (!parseNextRecords()) { break; } } missingTemplateCache.checkTemplates(); } NetflowIPFIXPacketParser(byte[] data, int initialPosition, String sourceIP,
            FlowTemplateCache flowTemplateCache, OptionsTemplateCache optionsTemplateCache,
            MissingTemplateCache missingTemplateCache, InformationElementMappings informationElementMappings,
            TSDRLogRecordBuilder recordBuilder, Consumer<TSDRLogRecordBuilder> callback); private  NetflowIPFIXPacketParser(NetflowIPFIXPacketParser other, int fromPosition, int bytesToCopy); @Override void parseRecords();  }