Package pcap.spi
Class Service.NoService
java.lang.Object
pcap.spi.Service.NoService
- All Implemented Interfaces:
Service
- Enclosing interface:
- Service
public static class Service.NoService extends Object implements Service
-
Nested Class Summary
Nested classes/interfaces inherited from interface pcap.spi.Service
Service.Creator, Service.LiveOptions, Service.NoService, Service.OfflineOptions
-
Constructor Summary
Constructors Constructor Description NoService()
-
Method Summary
Modifier and Type Method Description Pcap
live(Interface source, Service.LiveOptions options)
Open live capture handle.Inet4Address
lookupInet4Address(Interface source)
LookupInet4Address
fromInterface
.Inet6Address
lookupInet6Address(Interface source)
LookupInet6Address
fromInterface
.Interface
lookupInterfaces()
Find all interfaces on your system.Interface
lookupInterfaces(java.util.function.Predicate<Interface> preicate)
Find interface by flags.String
name()
Get unique service name.Pcap
offline(String source, Service.OfflineOptions options)
Open offline handle.String
version()
Get native pcap library version.
-
Constructor Details
-
NoService
public NoService()
-
-
Method Details
-
name
Description copied from interface:Service
Get unique service name. -
version
Description copied from interface:Service
Get native pcap library version. -
lookupInterfaces
Description copied from interface:Service
Find all interfaces on your system.- Specified by:
lookupInterfaces
in interfaceService
- Returns:
- returns iterable
Interface
's. - Throws:
ErrorException
- generic error.
-
lookupInterfaces
public Interface lookupInterfaces(java.util.function.Predicate<Interface> preicate) throws ErrorExceptionDescription copied from interface:Service
Find interface by flags.- Specified by:
lookupInterfaces
in interfaceService
- Parameters:
preicate
- filter.- Returns:
- returns
Interface
. - Throws:
ErrorException
- interface not found.
-
lookupInet4Address
Description copied from interface:Service
LookupInet4Address
fromInterface
.- Specified by:
lookupInet4Address
in interfaceService
- Parameters:
source
-Interface
.- Returns:
- returns
Inet4Address
. - Throws:
ErrorException
- address not found.
-
lookupInet6Address
Description copied from interface:Service
LookupInet6Address
fromInterface
.- Specified by:
lookupInet6Address
in interfaceService
- Parameters:
source
-Interface
.- Returns:
- returns
Inet6Address
. - Throws:
ErrorException
- address not found.
-
offline
Description copied from interface:Service
Open offline handle.- Specified by:
offline
in interfaceService
- Parameters:
source
- file.options
- pcap offline option.- Returns:
- returns
Pcap
live handle. - Throws:
ErrorException
- generic exeception.
-
live
public Pcap live(Interface source, Service.LiveOptions options) throws InterfaceNotSupportTimestampTypeException, InterfaceNotUpException, RadioFrequencyModeNotSupportedException, ActivatedException, PermissionDeniedException, NoSuchDeviceException, PromiscuousModePermissionDeniedException, ErrorException, TimestampPrecisionNotSupportedExceptionDescription copied from interface:Service
Open live capture handle.- Specified by:
live
in interfaceService
- Parameters:
source
- interface.options
- pcap live option.- Returns:
- returns
Pcap
offline handle. - Throws:
InterfaceNotSupportTimestampTypeException
- timestamp type not supported by interface.InterfaceNotUpException
- interface is not up.RadioFrequencyModeNotSupportedException
- radio frequency mode is not supported.ActivatedException
- a handle is already activated or need to activated.PermissionDeniedException
- you have no permission to open live handle with current user.NoSuchDeviceException
- no such device can be use to open live handle.PromiscuousModePermissionDeniedException
- you have no permission to enable promiscuous mode.ErrorException
- generic error.TimestampPrecisionNotSupportedException
- timestamp precision not supported.
-