jnetpcap.capture
Interface MutableCaptureInterface

All Superinterfaces:
CaptureInterface

public interface MutableCaptureInterface
extends CaptureInterface

Provides methods for setting various properties of the underlying CaptureInterface object. You must ensure that the MutableCaptureInterface instance is still valid for mutation by calling CaptureInterface.isMutable() method. CaptureInterfaces when first created are mutable, but become immutable the memoment they are applied to LiveCapture when their states are frozen and can no longer be modified. This is so because packets reference CaptureInerface that the packet was captured on and this allows a snapshot of the exact configuration of the network interface to be made using CaptureInterface objects.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Nested Class Summary
 
Nested classes/interfaces inherited from interface jnetpcap.capture.CaptureInterface
CaptureInterface.Capability, CaptureInterface.TimestampResolution
 
Method Summary
 void setDataEncapsulation(DataEncapsulation dlt)
          Sets the data encapsulation for this capture device
 void setDisplayName(java.lang.String name)
          Sets a more human readable name for the interface this capture device describes.
 void setFilter(Filter filter)
          Sets a new filter to be applied to the future or currently active capture session for the network interface this capture device is associated with.
 void setName(java.lang.String name)
          Sets the name of the interface this capture device describes.
 void setOSArchitecture(java.lang.String osArchitecture)
          Sets the OS architecture of the capture device's operating system
 void setOSName(java.lang.String name)
          Sets the ame of the operating system the device is on.
 void setOSVersion(java.lang.String version)
          Sets the operating system version the capture device is on.
 void setTimestampResolution(CaptureInterface.TimestampResolution resolution)
          Sets the capturing devices clock resolution when it comes to recording a timestamp.
 void setTimezone(int timezone)
          Sets the timezeone for this device.
 
Methods inherited from interface jnetpcap.capture.CaptureInterface
getCapabilities, getDataEncapsulation, getDisplayName, getFilter, getIpAddresses, getMutableCaptureInterface, getName, getOSArchitecture, getOSName, getOSVersion, getTimestampResolution, getTimezone, isMutable
 

Method Detail

setDataEncapsulation

void setDataEncapsulation(DataEncapsulation dlt)
Sets the data encapsulation for this capture device

Parameters:
dlt - data link type enum constant

setDisplayName

void setDisplayName(java.lang.String name)
Sets a more human readable name for the interface this capture device describes.

Parameters:
name - human readable name for this interface

setFilter

void setFilter(Filter filter)
Sets a new filter to be applied to the future or currently active capture session for the network interface this capture device is associated with. The filter is not acctually applied to this instance of the CaptureInterface, this value is immutable once set, but a new CaptureInterface is created and returned by this method. The new CaptureInterface is essentially a clone of the current instance, but with the new filter

Parameters:
filter - filter to apply to any open live capture sessions to this device

setName

void setName(java.lang.String name)
Sets the name of the interface this capture device describes.

Parameters:
name - non human readable unique name for the interface

setOSArchitecture

void setOSArchitecture(java.lang.String osArchitecture)
Sets the OS architecture of the capture device's operating system

Parameters:
osArchitecture - OS architecture description

setOSName

void setOSName(java.lang.String name)
Sets the ame of the operating system the device is on.

Parameters:
name - name of the operating system

setOSVersion

void setOSVersion(java.lang.String version)
Sets the operating system version the capture device is on.

Parameters:
version - version of the operating system

setTimestampResolution

void setTimestampResolution(CaptureInterface.TimestampResolution resolution)
Sets the capturing devices clock resolution when it comes to recording a timestamp.

Parameters:
resolution - an enum constant describing the clock resolution of the capturing device

setTimezone

void setTimezone(int timezone)
Sets the timezeone for this device.

Parameters:
timezone - number of timezones as offset from timezone zero (Greenwich, CH)