|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public static interface Captures.LiveCaptureFactory
Factory classes which create live capture sessions and transmit packets. Since live captures are inherantly platform specific, this part of the overall factory implementation is optional and may be ommitted. If implementation for LiveCaptureFactory is not included, all openLive and openTransmitter methods will trow UnsuportedOperationException. Other methods such as listCaptureDevices and newCaptureDevice will not, but will default to using java.net package to fulfill the request. The implementation can be specified using system variable
| Field Summary | |
|---|---|
static java.lang.String |
LIVE_CAPTURE_FACTORY_CLASS_PROPERTY
System property which can be used to override the default implementation class for LiveCaptureFactory. |
| Method Summary | |
|---|---|
LiveCaptureDevice[] |
listCaptureDevices()
Gets a list of all the devices capable of doing live capture on this or remote system. |
CaptureDevice |
newCaptureDevice()
Creates a new empty, uninitialized CaptureDevice instance. |
LiveCapture |
openLive()
Opens up all interfaces, except loopback and dialup interfaces, for live capture. |
LiveCapture |
openLive(CaptureDevice... nics)
|
LiveCapture |
openLive(java.util.Collection<CaptureDevice> nics)
|
LiveCapture |
openLive(Filter<ProtocolFilterTarget> fiter)
Opens up all interfaces, except loopback and dialup interfaces, for live capture. |
LiveCapture |
openLive(Filter<ProtocolFilterTarget> filter,
CaptureDevice... nics)
|
LiveCapture |
openLive(Filter<ProtocolFilterTarget> filter,
java.util.Collection<CaptureDevice> nics)
|
LiveCapture |
openLive(long count)
Opens up all interfaces, except loopback and dialup interfaces, for live capture. |
NetTransmitter |
openTransmitter()
Opens a live session with the network interface for packet tranmition. |
NetTransmitter |
openTransmitter(java.net.NetworkInterface netInterface)
Opens a live session with the network interface for packet tranmition. |
| Field Detail |
|---|
static final java.lang.String LIVE_CAPTURE_FACTORY_CLASS_PROPERTY
| Method Detail |
|---|
LiveCaptureDevice[] listCaptureDevices()
throws java.io.IOException
java.io.IOException - any IO errorsCaptureDevice newCaptureDevice()
LiveCapture openLive()
throws java.io.IOException
IOIterator.hasNext() and IOIterator.next(). There is
no guarrantee as to the order in which captured packets are returned
between multiple interfaces, with the exception that for each interface
the packets will be returned in the order they were captured on that
interface.
java.io.IOException - any IO errors
LiveCapture openLive(CaptureDevice... nics)
throws java.io.IOException
java.io.IOException
LiveCapture openLive(java.util.Collection<CaptureDevice> nics)
throws java.io.IOException
java.io.IOException
LiveCapture openLive(Filter<ProtocolFilterTarget> fiter)
throws java.io.IOException
Opens up all interfaces, except loopback and dialup interfaces, for live
capture. The captured packets can be iterated over using the inherited
methods IOIterator.hasNext() and IOIterator.next(). There is
no guarrantee as to the order in which captured packets are returned
between multiple interfaces, with the exception that for each interface
the packets will be returned in the order they were captured on that
interface.
The filter is used to limit the number of packets captured to ones that match the filter criteria. Each packet after capture is matched by the filter. For efficiency this is done at the kernel level for operating systems that support this feature. On operating systems that do not, the filter match is performed in "userland" or user space which is less efficient
fiter -
java.io.IOException
LiveCapture openLive(Filter<ProtocolFilterTarget> filter,
CaptureDevice... nics)
throws java.io.IOException
java.io.IOException
LiveCapture openLive(Filter<ProtocolFilterTarget> filter,
java.util.Collection<CaptureDevice> nics)
throws java.io.IOException
java.io.IOException
LiveCapture openLive(long count)
throws java.io.IOException
IOIterator.hasNext() and IOIterator.next(). There is
no guarrantee as to the order in which captured packets are returned
between multiple interfaces, with the exception that for each interface
the packets will be returned in the order they were captured on that
interface.
count - number of packet to capture and then exit
java.io.IOException - any IO errors
NetTransmitter openTransmitter()
throws java.io.IOException
java.io.IOException - any IO errors while opening the connection to interface
NetTransmitter openTransmitter(java.net.NetworkInterface netInterface)
throws java.io.IOException
java.io.IOException - any IO errors while opening the connection to interface
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||