Package pcap.api
Class Pcaps
java.lang.Object
pcap.api.Pcaps
- Direct Known Subclasses:
PcapLive,PcapOffline
@Deprecated @Inclubating public abstract class Pcaps extends java.lang.Object
Deprecated.
- Author:
- Ardika Rommy Sanjaya
-
Constructor Summary
Constructors Constructor Description Pcaps()Deprecated. -
Method Summary
Modifier and Type Method Description static Pcaplive(PcapLive pcapLive)Deprecated.Open live capture handle.static Inet4AddresslookupInet4Address(Interface source)Deprecated.LookupInet4AddressfromInterface.static Inet6AddresslookupInet6Address(Interface source)Deprecated.LookupInet6AddressfromInterface.static InterfacelookupInterface()Deprecated.static InterfacelookupInterface(java.lang.String name)Deprecated.Find interface by name.static InterfacelookupInterfaces()Deprecated.Find all interfaces on your system.static MacAddresslookupMacAddress(Interface source)Deprecated.Get mac address for givenInterface.static InterfaceloopbackInterface()Deprecated.Get loopback interface.static Pcapoffline(PcapOffline pcapOffline)Deprecated.Open offline handle.static java.lang.Stringversion()Deprecated.Get native pcap library version.
-
Constructor Details
-
Pcaps
public Pcaps()Deprecated.
-
-
Method Details
-
offline
Deprecated.Open offline handle.- Parameters:
pcapOffline- pcap offline option.- Returns:
- returns
Pcaplive handle. - Throws:
ErrorException- generic exeception.
-
live
public static Pcap live(PcapLive pcapLive) throws InterfaceNotSupportTimestampTypeException, InterfaceNotUpException, RadioFrequencyModeNotSupportedException, ActivatedException, PermissionDeniedException, NoSuchDeviceException, PromiscuousModePermissionDeniedException, ErrorException, TimestampPrecisionNotSupportedExceptionDeprecated.Open live capture handle.- Parameters:
pcapLive- pcap live option.- Returns:
- returns
Pcapoffline 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.
-
lookupInterfaces
Deprecated.Find all interfaces on your system.- Returns:
- returns iterable
Interface's. - Throws:
ErrorException- generic error.
-
lookupInterface
Deprecated.Find interface by name.- Parameters:
name- interface name.- Returns:
- returns
Interface. - Throws:
ErrorException- interface not found.
-
lookupInterface
Deprecated.Lookup interface can be used to openPcaplive handle.This functions is deprecated, please use
lookupInterfaces()and use the firstInterface.- Returns:
- returns
Interface. - Throws:
ErrorException- generic error.- See Also:
- Github Issue: #30
-
loopbackInterface
Deprecated.Get loopback interface.- Returns:
- returns loopback interface.
- Throws:
ErrorException- loopback interface not found.
-
lookupMacAddress
Deprecated.Get mac address for givenInterface.- Parameters:
source- interface.- Returns:
- returns
MacAddressfor given interface. - Throws:
ErrorException- error occured.
-
lookupInet4Address
Deprecated.LookupInet4AddressfromInterface.- Parameters:
source-Interface.- Returns:
- returns
Inet4Address. - Throws:
ErrorException- address not found.
-
lookupInet6Address
Deprecated.LookupInet6AddressfromInterface.- Parameters:
source-Interface.- Returns:
- returns
Inet6Address. - Throws:
ErrorException- address not found.
-
version
public static java.lang.String version()Deprecated.Get native pcap library version.- Returns:
- returns native pcap library version.
-