NIONetworkDevice
public struct NIONetworkDevice
extension NIONetworkDevice: CustomDebugStringConvertible
extension NIONetworkDevice: Equatable
extension NIONetworkDevice: Hashable
A representation of a single network device on a system.
-
The name of the network device.
Declaration
Swift
public var name: String { get set }
-
The address associated with the given network device.
Declaration
Swift
public var address: SocketAddress? { get set }
-
The netmask associated with this address, if any.
Declaration
Swift
public var netmask: SocketAddress? { get set }
-
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 var broadcastAddress: SocketAddress? { get set }
-
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 var pointToPointDestinationAddress: SocketAddress? { get set }
-
If the Interface supports Multicast
Declaration
Swift
public var multicastSupported: Bool { get set }
-
The index of the interface, as provided by
if_nametoindex
.Declaration
Swift
public var interfaceIndex: Int { get set }
-
Convert a
NIONetworkInterface
to aNIONetworkDevice
. AsNIONetworkDevice
s are a superset ofNIONetworkInterface
s, it is always possible to perform this conversion.Declaration
Swift
@available(*, deprecated, message: "This is a compatibility helper, and will be removed in a future release") public init(_ interface: NIONetworkInterface)
-
init(name:
address: netmask: broadcastAddress: pointToPointDestinationAddress: multicastSupported: interfaceIndex: ) Undocumented
Declaration
Swift
public init(name: String, address: SocketAddress?, netmask: SocketAddress?, broadcastAddress: SocketAddress?, pointToPointDestinationAddress: SocketAddress, multicastSupported: Bool, interfaceIndex: Int)
-
Declaration
Swift
public var debugDescription: String { get }
-
Declaration
Swift
public static func == (lhs: NIONetworkDevice, rhs: NIONetworkDevice) -> Bool
-
Declaration
Swift
public func hash(into hasher: inout Hasher)