Structureswift-nio 2.72.0NIOCore
NIONetworkDevice
A representation of a single network device on a system.
Interfaces.swift:213struct NIONetworkDevice
See also
enum System
class NIONetworkInterface
A representation of a single network interface on a system.
enum SocketAddress
Represent a socket address to which we may want to connect or bind.
enum NIOBSDSocket
struct NIOIPProtocol
In the Internet Protocol version 4 (IPv4) [RFC791] there is a field called “Protocol” to identify the next level protocol. This is an 8 bit field. In Internet Protocol version 6 (IPv6) [RFC8200], this field is called the “Next Header” field.
Citizens in NIOCore
Conformances
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Sendable
A type whose values can safely be passed across concurrency domains by copying.
Type members
init(name: String, address: SocketAddress?, netmask: SocketAddress?, broadcastAddress: SocketAddress?, pointToPointDestinationAddress: SocketAddress, multicastSupported: Bool, interfaceIndex: Int
) static func == (lhs: NIONetworkDevice, rhs: NIONetworkDevice
) -> Bool
Show obsolete interfaces (1)
Hide obsolete interfaces
init(NIONetworkInterface
) Convert a
NIONetworkInterface
to aNIONetworkDevice
. AsNIONetworkDevice
s are a superset ofNIONetworkInterface
s, it is always possible to perform this conversion.
Instance members
var address: SocketAddress?
The address associated with the given network device.
var broadcastAddress: SocketAddress?
The broadcast address associated with this socket interface, if it has one. Some interfaces do not, especially those that have a
pointToPointDestinationAddress
.var debugDescription: String
var interfaceIndex: Int
The index of the interface, as provided by
if_nametoindex
.var multicastSupported: Bool
If the Interface supports Multicast
var name: String
The name of the network device.
var netmask: SocketAddress?
The netmask associated with this address, if any.
var pointToPointDestinationAddress: 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.func hash(into: inout Hasher
)
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.