Package pcap.api.internal
Class Pcap
java.lang.Object
pcap.api.internal.Pcap
- All Implemented Interfaces:
java.lang.AutoCloseable,Pcap
- Direct Known Subclasses:
DarwinPcap,LinuxPcap,WindowsPcap
@Inclubating public abstract class Pcap extends java.lang.Object implements Pcap
Pcap handle.- Author:
- Ardika Rommy Sanjaya
-
Nested Class Summary
Nested classes/interfaces inherited from interface pcap.spi.Pcap
Pcap.Direction, Pcap.UnixPcap, Pcap.WinPcap -
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protectedPcap(java.foreign.memory.Pointer<pcap_header.pcap> pcap)protectedPcap(java.foreign.memory.Pointer<pcap_header.pcap> pcap, int netmask) -
Method Summary
Modifier and Type Method Description voidbreakLoop()voidclose()DumperdumpOpen(java.lang.String file)DumperdumpOpenAppend(java.lang.String file)booleangetNonBlock()booleanisSwapped()intmajorVersion()intminorVersion()voidsend(PacketBuffer buffer)voidsend(PacketBuffer buffer, int size)voidsetDirection(Pcap.Direction direction)voidsetFilter(java.lang.String filter, boolean optimize)voidsetNonBlock(boolean blocking)Statusstatus()
-
Field Details
-
Constructor Details
-
Method Details
-
dumpOpen
- Specified by:
dumpOpenin interfacePcap- Throws:
ErrorException
-
dumpOpenAppend
- Specified by:
dumpOpenAppendin interfacePcap- Throws:
ErrorException
-
setFilter
- Specified by:
setFilterin interfacePcap- Throws:
ErrorException
-
status
- Specified by:
statusin interfacePcap- Throws:
ErrorException
-
breakLoop
public void breakLoop() -
send
- Specified by:
sendin interfacePcap- Throws:
ErrorException
-
send
- Specified by:
sendin interfacePcap- Throws:
ErrorException
-
setDirection
- Specified by:
setDirectionin interfacePcap- Throws:
ErrorException
-
isSwapped
- Specified by:
isSwappedin interfacePcap- Throws:
NotActivatedException
-
majorVersion
public int majorVersion()- Specified by:
majorVersionin interfacePcap
-
minorVersion
public int minorVersion()- Specified by:
minorVersionin interfacePcap
-
getNonBlock
- Specified by:
getNonBlockin interfacePcap- Throws:
ErrorException
-
setNonBlock
- Specified by:
setNonBlockin interfacePcap- Throws:
ErrorException
-
close
public void close()
-