Package oshi.software.os.windows
Class WindowsInternetProtocolStats
- java.lang.Object
-
- oshi.software.common.AbstractInternetProtocolStats
-
- oshi.software.os.windows.WindowsInternetProtocolStats
-
- All Implemented Interfaces:
InternetProtocolStats
@ThreadSafe public class WindowsInternetProtocolStats extends AbstractInternetProtocolStats
Internet Protocol Stats implementation
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface oshi.software.os.InternetProtocolStats
InternetProtocolStats.IPConnection, InternetProtocolStats.TcpState, InternetProtocolStats.TcpStats, InternetProtocolStats.UdpStats
-
-
Field Summary
Fields Modifier and Type Field Description private static com.sun.jna.platform.win32.IPHlpAPI
IPHLP
private static boolean
IS_VISTA_OR_GREATER
-
Constructor Summary
Constructors Constructor Description WindowsInternetProtocolStats()
-
Method Summary
-
-
-
Method Detail
-
getTCPv4Stats
public InternetProtocolStats.TcpStats getTCPv4Stats()
Description copied from interface:InternetProtocolStats
Get the TCP stats for IPv4 connections.On macOS connection information requires elevated permissions. Without elevatd permissions, segment data is estimated.
- Returns:
- a
InternetProtocolStats.TcpStats
object encapsulating the stats.
-
getTCPv6Stats
public InternetProtocolStats.TcpStats getTCPv6Stats()
Description copied from interface:InternetProtocolStats
Get the TCP stats for IPv6 connections, if available. If not available separately, these may be 0 and included in IPv4 connections.- Specified by:
getTCPv6Stats
in interfaceInternetProtocolStats
- Overrides:
getTCPv6Stats
in classAbstractInternetProtocolStats
- Returns:
- a
InternetProtocolStats.TcpStats
object encapsulating the stats.
-
getUDPv4Stats
public InternetProtocolStats.UdpStats getUDPv4Stats()
Description copied from interface:InternetProtocolStats
Get the UDP stats for IPv4 datagrams.- Returns:
- a
InternetProtocolStats.UdpStats
object encapsulating the stats.
-
getUDPv6Stats
public InternetProtocolStats.UdpStats getUDPv6Stats()
Description copied from interface:InternetProtocolStats
Get the UDP stats for IPv6 datagrams, if available. If not available separately, these may be 0 and included in IPv4 datagrams.- Specified by:
getUDPv6Stats
in interfaceInternetProtocolStats
- Overrides:
getUDPv6Stats
in classAbstractInternetProtocolStats
- Returns:
- a
InternetProtocolStats.UdpStats
object encapsulating the stats.
-
getConnections
public java.util.List<InternetProtocolStats.IPConnection> getConnections()
Description copied from interface:InternetProtocolStats
Gets a list of TCP and UDP connections.- Specified by:
getConnections
in interfaceInternetProtocolStats
- Overrides:
getConnections
in classAbstractInternetProtocolStats
- Returns:
- A list of
InternetProtocolStats.IPConnection
objects for TCP and UDP connections.
-
queryTCPv4Connections
private static java.util.List<InternetProtocolStats.IPConnection> queryTCPv4Connections()
-
queryTCPv6Connections
private static java.util.List<InternetProtocolStats.IPConnection> queryTCPv6Connections()
-
queryUDPv4Connections
private static java.util.List<InternetProtocolStats.IPConnection> queryUDPv4Connections()
-
queryUDPv6Connections
private static java.util.List<InternetProtocolStats.IPConnection> queryUDPv6Connections()
-
stateLookup
private static InternetProtocolStats.TcpState stateLookup(int state)
-
-