jnetpcap.capture.file.pcap
Interface PcapBlockRecord

All Superinterfaces:
BlockRecord, Record

public interface PcapBlockRecord
extends BlockRecord

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Nested Class Summary
static class PcapBlockRecord.HDR
           
 
Nested classes/interfaces inherited from interface jnetpcap.capture.file.Record
Record.Capability, Record.RecordType
 
Field Summary
static int HEADER_LENGTH
           
 
Method Summary
 int getAccuracy()
           
 int getLinktype()
           
 byte[] getMagicPattern()
          Returns the Magic number or pattern that is used to uniquely identify the file type of the capture file.
 int getMajorVersion()
           
 int getMinorVersion()
           
 int getSnaplen()
           
 int getTimezone()
           
 void setAccuracy(int accuracy)
           
 void setLinktype(int linktype)
           
 void setMagicPattern(byte[] magicNumber)
           
 void setMajorVersion(int majorVersion)
           
 void setMinorVersion(int minorVersion)
           
 void setSnaplen(int snpalen)
           
 void setTimezone(int timezone)
           
 
Methods inherited from interface jnetpcap.capture.file.BlockRecord
getByteOrder, getPacketCount, getPacketCount, getRecords, getVersion, setVersion, setVersion
 
Methods inherited from interface jnetpcap.capture.file.Record
getCaptureFile, getFilePosition, getHeaderBuffer, getHeaderLength, getRecordLength, getRecordType, isModified, isWritten, read, readHeader, setFilePosition, setModified, setWritten, validateRecord, write, writeHeader
 

Field Detail

HEADER_LENGTH

static final int HEADER_LENGTH
See Also:
Constant Field Values
Method Detail

getMagicPattern

byte[] getMagicPattern()
                       throws java.io.IOException
Description copied from interface: BlockRecord
Returns the Magic number or pattern that is used to uniquely identify the file type of the capture file. The magic number is not normalized so the pattern may be returned differently on big and small endian machines.

Specified by:
getMagicPattern in interface BlockRecord
Returns:
pattern that is used to identify the file type
Throws:
java.io.IOException - any IO errors

setMagicPattern

void setMagicPattern(byte[] magicNumber)
                     throws java.io.IOException
Throws:
java.io.IOException

getMajorVersion

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

setMajorVersion

void setMajorVersion(int majorVersion)
                     throws java.io.IOException
Throws:
java.io.IOException

getMinorVersion

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

setMinorVersion

void setMinorVersion(int minorVersion)
                     throws java.io.IOException
Throws:
java.io.IOException

getTimezone

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

setTimezone

void setTimezone(int timezone)
                 throws java.io.IOException
Throws:
java.io.IOException

getAccuracy

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

setAccuracy

void setAccuracy(int accuracy)
                 throws java.io.IOException
Throws:
java.io.IOException

getSnaplen

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

setSnaplen

void setSnaplen(int snpalen)
                throws java.io.IOException
Throws:
java.io.IOException

getLinktype

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

setLinktype

void setLinktype(int linktype)
                 throws java.io.IOException
Throws:
java.io.IOException