NetworkIFImpl

class NetworkIFImpl(    val name: String,     val index: Int,     val displayName: String,     val ifAlias: String,     val ifOperStatus: IfOperStatus,     val mtu: Long,     val macaddr: String,     val ipv4addr: Array<String>,     val subnetMasks: ShortArray,     val ipv6addr: Array<String>,     val prefixLengths: ShortArray,     val ifType: Int,     val ndisPhysicalMediumType: Int,     val isConnectorPresent: Boolean,     val bytesRecv: Long,     val bytesSent: Long,     val packetsRecv: Long,     val packetsSent: Long,     val inErrors: Long,     val outErrors: Long,     val inDrops: Long,     val collisions: Long,     val speed: Long,     val timestamp: Long,     val isKnownVmMacAddr: Boolean,     val updateAttributes: Boolean) : NetworkIF

Implementation of the NetworkIF interface. This class provides details about the network interface, including its name, operational status, MAC address, IP addresses, and network statistics like bytes and packets sent/received, errors, and collisions.

Author

N7ghtm4r3

Parameters

name

The name of the network interface (e.g., "eth0", "wlan0")

index

The index of the network interface

displayName

The display name of the network interface

ifAlias

The alias for the network interface (optional)

ifOperStatus

The operational status of the network interface (e.g., up, down)

mtu

The Maximum Transmission Unit (MTU) for the network interface

macaddr

The MAC address of the network interface

ipv4addr

The IPv4 addresses assigned to the network interface

subnetMasks

The subnet masks for the IPv4 addresses

ipv6addr

The IPv6 addresses assigned to the network interface

prefixLengths

The prefix lengths for the IPv6 addresses

ifType

The type of network interface (e.g., Ethernet, Wi-Fi)

ndisPhysicalMediumType

The type of physical medium (e.g., wired, wireless)

isConnectorPresent

Indicates whether a connector is present on the interface

bytesRecv

The total number of bytes received by the interface

bytesSent

The total number of bytes sent by the interface

packetsRecv

The total number of packets received by the interface

packetsSent

The total number of packets sent by the interface

inErrors

The total number of incoming errors on the interface

outErrors

The total number of outgoing errors on the interface

inDrops

The total number of incoming packets dropped by the interface

collisions

The total number of collisions detected on the interface

speed

The speed of the network interface in bits per second

timestamp

The timestamp indicating when the network interface statistics were last updated

isKnownVmMacAddr

Indicates whether the MAC address is known to belong to a virtual machine

updateAttributes

Indicates whether the attributes of the network interface should be updated

See also

Constructors

Link copied to clipboard
constructor(    name: String,     index: Int,     displayName: String,     ifAlias: String,     ifOperStatus: IfOperStatus,     mtu: Long,     macaddr: String,     ipv4addr: Array<String>,     subnetMasks: ShortArray,     ipv6addr: Array<String>,     prefixLengths: ShortArray,     ifType: Int,     ndisPhysicalMediumType: Int,     isConnectorPresent: Boolean,     bytesRecv: Long,     bytesSent: Long,     packetsRecv: Long,     packetsSent: Long,     inErrors: Long,     outErrors: Long,     inDrops: Long,     collisions: Long,     speed: Long,     timestamp: Long,     isKnownVmMacAddr: Boolean,     updateAttributes: Boolean)

Properties

Link copied to clipboard
open override val bytesRecv: Long
Link copied to clipboard
open override val bytesSent: Long
Link copied to clipboard
open override val collisions: Long
Link copied to clipboard
open override val displayName: String
Link copied to clipboard
open override val ifAlias: String
Link copied to clipboard
open override val ifOperStatus: IfOperStatus
Link copied to clipboard
open override val ifType: Int
Link copied to clipboard
open override val index: Int
Link copied to clipboard
open override val inDrops: Long
Link copied to clipboard
open override val inErrors: Long
Link copied to clipboard
open override val ipv4addr: Array<String>
Link copied to clipboard
open override val ipv6addr: Array<String>
Link copied to clipboard
open override val isConnectorPresent: Boolean
Link copied to clipboard
open override val isKnownVmMacAddr: Boolean
Link copied to clipboard
open override val macaddr: String
Link copied to clipboard
open override val mtu: Long
Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val ndisPhysicalMediumType: Int
Link copied to clipboard
open override val outErrors: Long
Link copied to clipboard
open override val packetsRecv: Long
Link copied to clipboard
open override val packetsSent: Long
Link copied to clipboard
open override val prefixLengths: ShortArray
Link copied to clipboard
open override val speed: Long
Link copied to clipboard
open override val subnetMasks: ShortArray
Link copied to clipboard
open override val timestamp: Long
Link copied to clipboard
open override val updateAttributes: Boolean

Functions

Link copied to clipboard
fun queryNetworkInterface(source: NetworkIF): NetworkInterface

Method to query the source network interface