org.jnetstream.capture.file.nap
Interface NAPPacket

All Superinterfaces:
CapturePacket, FilePacket, java.lang.Iterable<Header>, Packet

public interface NAPPacket
extends FilePacket

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jnetstream.packet.Packet
Packet.Property
 
Method Summary
 long getCaptureNanos()
           
 long getCaptureSeconds()
           
 NAPCaptureInfo getCaptureSystem()
           
 int getCaptureSystemId()
           
 java.sql.Timestamp getCaptureTimestamp()
           
 java.util.Set<NAPFlag> getFlags()
           
 long getIncludedLength()
          Gets the number of octets that were included as packet data after the packet was captured.
 long getOriginalLength()
          Gets the number of octets of the actual packet as it was originally seen at the time of the capture or on the wire.
 java.nio.ByteBuffer getPacketBuffer()
           
 void setCaptureNanos()
           
 void setCaptureSeconds()
           
 void setCaptureSystem(NAPCaptureInfo captureSystem)
           
 void setCaptureSystemId(int id)
           
 void setCaptureTimestamp(java.sql.Timestamp captureTimestamp)
           
 void setFlags(java.util.Set<NAPFlag> flags)
           
 void setOriginalLength()
           
 void setPacketBuffer(java.nio.ByteBuffer buffer)
           
 
Methods inherited from interface org.jnetstream.capture.FilePacket
getPositionGlobal, getPositionLocal, getPositionRegional
 
Methods inherited from interface org.jnetstream.capture.CapturePacket
getCaptureDevice
 
Methods inherited from interface org.jnetstream.packet.Packet
format, getAllHeaders, getBuffer, getData, getHeader, getHeader, getHeaderCount, getProperty, getTimestampNanos, getTimestampSeconds, hasCompleteHeader, hasCompleteHeader, hasHeader, hasHeader, isTruncated, iterator
 

Method Detail

getCaptureSeconds

long getCaptureSeconds()
                       throws java.io.IOException
Throws:
java.io.IOException

setCaptureSeconds

void setCaptureSeconds()
                       throws java.io.IOException
Throws:
java.io.IOException

getCaptureNanos

long getCaptureNanos()
                     throws java.io.IOException
Throws:
java.io.IOException

setCaptureNanos

void setCaptureNanos()
                     throws java.io.IOException
Throws:
java.io.IOException

getCaptureTimestamp

java.sql.Timestamp getCaptureTimestamp()
                                       throws java.io.IOException
Throws:
java.io.IOException

setCaptureTimestamp

void setCaptureTimestamp(java.sql.Timestamp captureTimestamp)
                         throws java.io.IOException
Throws:
java.io.IOException

getCaptureSystemId

int getCaptureSystemId()
                       throws java.io.IOException
Throws:
java.io.IOException

setCaptureSystemId

void setCaptureSystemId(int id)
                        throws java.io.IOException
Throws:
java.io.IOException

getCaptureSystem

NAPCaptureInfo getCaptureSystem()
                                throws java.io.IOException
Throws:
java.io.IOException

setCaptureSystem

void setCaptureSystem(NAPCaptureInfo captureSystem)
                      throws java.io.IOException
Throws:
java.io.IOException

getOriginalLength

long getOriginalLength()
                       throws java.io.IOException
Description copied from interface: CapturePacket
Gets the number of octets of the actual packet as it was originally seen at the time of the capture or on the wire. This number may not neccessarily correspond with CapturePacket.getIncludedLength() method since sometimes packets are "sliced", "truncated", "snapped" etc to preserve storage space.

Specified by:
getOriginalLength in interface CapturePacket
Specified by:
getOriginalLength in interface Packet
Returns:
number of octets of the original packet before any truncation of its data buffer
Throws:
java.io.IOException

setOriginalLength

void setOriginalLength()
                       throws java.io.IOException
Throws:
java.io.IOException

getIncludedLength

long getIncludedLength()
                       throws java.io.IOException
Description copied from interface: CapturePacket
Gets the number of octets that were included as packet data after the packet was captured. This number may be less then the actual length of the packet as it was seen on the wire. This is sometimes also called the "snaplength" or "slice" of a packet. Truncating packet data in such a way allows greater storage efficiency when only the beginning of a packet data is needed. The beginning of a packet data contains the important protocol headers which can be used to determine the packet type and other important information. This is typically enough of accounting type application or monitoring applications.

Specified by:
getIncludedLength in interface CapturePacket
Specified by:
getIncludedLength in interface Packet
Returns:
number of octets that were captured and stored in the packet data buffer
Throws:
java.io.IOException

getPacketBuffer

java.nio.ByteBuffer getPacketBuffer()
                                    throws java.io.IOException
Throws:
java.io.IOException

setPacketBuffer

void setPacketBuffer(java.nio.ByteBuffer buffer)
                     throws java.io.IOException
Throws:
java.io.IOException

getFlags

java.util.Set<NAPFlag> getFlags()
                                throws java.io.IOException
Throws:
java.io.IOException

setFlags

void setFlags(java.util.Set<NAPFlag> flags)
              throws java.io.IOException
Throws:
java.io.IOException