NIONetworkInterface

public final class NIONetworkInterface

A representation of a single network interface on a system.

  • The name of the network interface.

    Declaration

    Swift

    public let name: String
  • The address associated with the given network interface.

    Declaration

    Swift

    public let address: SocketAddress
  • The netmask associated with this address, if any.

    Declaration

    Swift

    public let netmask: SocketAddress?
  • The broadcast address associated with this socket interface, if it has one. Some interfaces do not, especially those that have a pointToPointDestinationAddress.

    Declaration

    Swift

    public let broadcastAddress: SocketAddress?
  • The address of the peer on a point-to-point interface, if this is one. Some interfaces do not have such an address: most of those have a broadcastAddress instead.

    Declaration

    Swift

    public let pointToPointDestinationAddress: SocketAddress?
  • The index of the interface, as provided by if_nametoindex.

    Declaration

    Swift

    public let interfaceIndex: Int
  • Declaration

    Swift

    public var debugDescription: String { get }
  • Declaration

    Swift

    public static func ==(lhs: NIONetworkInterface, rhs: NIONetworkInterface) -> Bool