|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public static interface CaptureFactory.LocalFactory
Factory interface for local sessions. You can use CaptureFactory#getLocalFactory
method to aquire a reference to the default factory that creates all local instances
of capture framework objects.
| Method Summary | |
|---|---|
FileCapture |
openFile(java.io.InputStream in)
Opens up the input stream supplied and starts decoding of the stream using as if it was a read-only capture file. |
LiveCapture |
openLive(Filter filter,
java.net.NetworkInterface... nics)
|
LiveCapture |
openLive(java.net.NetworkInterface... nics)
Opens up all interfaces, except loopback and dialup interfaces, for live capture. |
FileType |
typeOfFile(java.io.InputStream fileStream)
Gets the type of underlying file format the input stream is in. |
| Methods inherited from interface jnetpcap.capture.CaptureFactory.Factory |
|---|
append, catFile, catFile, compactFile, convertFile, listInterfaces, newFile, newFile, newFile, newInterface, newInterface, openFile, openFile, openLive, openLive, openLive, splitFile, splitFile, typeOfFile, validateFile |
| Method Detail |
|---|
FileCapture openFile(java.io.InputStream in)
throws java.io.IOException
in - input stream to read data from
java.io.IOException - any IO or stream format errorsFileType typeOfFile(java.io.InputStream fileStream)
fileStream - stream that has the data to read from
LiveCapture openLive(java.net.NetworkInterface... nics)
throws java.io.IOException
CaptureFactory.FactoryOpens 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
openLive in interface CaptureFactory.Factoryjava.io.IOException
LiveCapture openLive(Filter filter,
java.net.NetworkInterface... nics)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||