Package com.silabs.na.pcap
Interface IPcapOutput
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
- All Known Implementing Classes:
PcapngOutput
public interface IPcapOutput extends java.io.CloseableOutput stream of PCAPNG data.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidwriteEnhancedPacketBlock(int interfaceId, long timestamp, byte[] data)Writes the enhanced packet block.voidwriteInterfaceDescriptionBlock(LinkType linkType, int timestampResolution)Writes the interface description block.
-
-
-
Method Detail
-
writeEnhancedPacketBlock
void writeEnhancedPacketBlock(int interfaceId, long timestamp, byte[] data) throws java.io.IOExceptionWrites the enhanced packet block.- Parameters:
interfaceId- Id of the interface for the enhanced packet block.timestamp- Timestamp in nanoseconds.data- Payload for the output.- Throws:
java.io.IOException- in case of errors with underlying IO operations.
-
writeInterfaceDescriptionBlock
void writeInterfaceDescriptionBlock(LinkType linkType, int timestampResolution) throws java.io.IOException
Writes the interface description block. Each consequent call to this method assign a growing index to these blocks. The interfaceId argument to the writeEnhancedPacketBlock() must correspond to these. Consequently, you are NOT allowed to call writeEnhancedPacketBlock without previously calling writeInterfaceDescriptionBlock().- Parameters:
linkType- Link type for the data from this interface.timestampResolution- See Pcap.RESOLUTION constants.- Throws:
java.io.IOException- in case of errors with underlying IO operations.
-
-