Package oshi.software.os.linux
Class LinuxInternetProtocolStats
java.lang.Object
oshi.software.common.AbstractInternetProtocolStats
oshi.software.os.linux.LinuxInternetProtocolStats
- All Implemented Interfaces:
InternetProtocolStats
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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets a list of TCP and UDP connections.Get the TCP stats for IPv4 connections.Get the UDP stats for IPv4 datagrams.Get the UDP stats for IPv6 datagrams, if available.private static List
<InternetProtocolStats.IPConnection> queryConnections
(String protocol, int ipver, Map<Long, Integer> pidMap) private static InternetProtocolStats.TcpState
stateLookup
(int state) Methods inherited from class oshi.software.common.AbstractInternetProtocolStats
getTCPv6Stats
-
Constructor Details
-
LinuxInternetProtocolStats
public LinuxInternetProtocolStats()
-
-
Method Details
-
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.
-
getUDPv4Stats
Description copied from interface:InternetProtocolStats
Get the UDP stats for IPv4 datagrams.- Returns:
- a
InternetProtocolStats.UdpStats
object encapsulating the stats.
-
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
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.
-
queryConnections
-
parseIpAddr
-
parseHexColonHex
-
stateLookup
-