jnetpcap.capture.file.nap
Class NAPModel

java.lang.Object
  extended by jnetpcap.capture.file.nap.NAPModel

public abstract class NAPModel
extends java.lang.Object

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Field Summary
static long BLOCKING_FACTOR
          Default blocking factor for BlockRecords
static long FULL_MAGIC_NUMBER
          The pattern used to identify by the first 4 octets of the block header.
static byte[] FULL_MAGIC_PATTERN
          The pattern used to identify by the first 4 octets of the block header.
static long MAGIC_NUMBER
          A pattern used to identify the "NAP" block record is in NAP format.
static byte[] MAGIC_PATTERN
          A byte pattern used to identify the "NAP" block record as NAP format.
static java.nio.ByteOrder MANDATORY_ENCODING
          Mandatory byte encoding for all record headers and meta record contents.
static int PADDING_BOUNDARY
          Default padding boundary.
 
Constructor Summary
NAPModel()
           
 
Method Summary
static NAPModel create(java.io.File file)
           
abstract  NAPBinding createBindingMetaRecord()
           
abstract  NAPBlock createBlockRecord()
           
abstract  NAPCounter createCounterMetaRecord()
           
abstract  NAPEvent createEventMetaRecord()
           
abstract  NAPExpert createExpertMetaRecord()
           
abstract  NAPNoOp createNoOpRecord()
           
abstract  NAPPacket createPacketRecord()
           
abstract  NAPProtocol createProtocolMetaRecord()
           
abstract  NAPRouting createRoutingMetaRecord()
           
abstract  java.util.List<Record> getAllRecords()
           
abstract   getBlockRecords()
           
abstract  java.nio.channels.FileChannel getChannel()
           
abstract  java.io.RandomAccessFile getFile()
           
abstract  java.lang.String getFilename()
           
abstract  java.util.List<? extends CapturePacket> getPacketRecords()
           
abstract  Record readRecord(Record parent)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAGIC_NUMBER

public static final long MAGIC_NUMBER
A pattern used to identify the "NAP" block record is in NAP format. This is a 28-bit unsigned integer field.

See Also:
Constant Field Values

FULL_MAGIC_NUMBER

public static final long FULL_MAGIC_NUMBER
The pattern used to identify by the first 4 octets of the block header. This value contains the Record Type field + the Magic Number field for a convenient 32-bit value.

See Also:
Constant Field Values

MAGIC_PATTERN

public static final byte[] MAGIC_PATTERN
A byte pattern used to identify the "NAP" block record as NAP format. This is a 28-bit masked byte array.


FULL_MAGIC_PATTERN

public static final byte[] FULL_MAGIC_PATTERN
The pattern used to identify by the first 4 octets of the block header. This value contains the Record Type field + the Magic Number field for a convenient 4 byte pattern array. Full 32-bit mask.


BLOCKING_FACTOR

public static final long BLOCKING_FACTOR
Default blocking factor for BlockRecords

See Also:
Constant Field Values

PADDING_BOUNDARY

public static final int PADDING_BOUNDARY
Default padding boundary. That is all records of all types must be padded upto 64-bit or 8 byte boundary

See Also:
Constant Field Values

MANDATORY_ENCODING

public static final java.nio.ByteOrder MANDATORY_ENCODING
Mandatory byte encoding for all record headers and meta record contents. PacketRecord and Vendor record contents may contain data that is native to the OS it was stored in, and is outside of the NAP specification.

Constructor Detail

NAPModel

public NAPModel()
Method Detail

create

public static NAPModel create(java.io.File file)
                       throws java.io.IOException
Throws:
java.io.IOException

getChannel

public abstract java.nio.channels.FileChannel getChannel()

getAllRecords

public abstract java.util.List<Record> getAllRecords()

getBlockRecords

public abstract  getBlockRecords()

getPacketRecords

public abstract java.util.List<? extends CapturePacket> getPacketRecords()

createBlockRecord

public abstract NAPBlock createBlockRecord()

createPacketRecord

public abstract NAPPacket createPacketRecord()

createBindingMetaRecord

public abstract NAPBinding createBindingMetaRecord()

createProtocolMetaRecord

public abstract NAPProtocol createProtocolMetaRecord()

createNoOpRecord

public abstract NAPNoOp createNoOpRecord()

createRoutingMetaRecord

public abstract NAPRouting createRoutingMetaRecord()

createCounterMetaRecord

public abstract NAPCounter createCounterMetaRecord()

createEventMetaRecord

public abstract NAPEvent createEventMetaRecord()

createExpertMetaRecord

public abstract NAPExpert createExpertMetaRecord()

readRecord

public abstract Record readRecord(Record parent)
                           throws java.io.IOException,
                                  CaptureFormatException
Throws:
java.io.IOException
CaptureFormatException

getFile

public abstract java.io.RandomAccessFile getFile()
Returns:

getFilename

public abstract java.lang.String getFilename()
Returns: