NIONetworkDevice
A representation of a single network device on a system.
struct NIONetworkDevice
A representation of a single network device on a system.
struct NIONetworkDevice
import NIOCore
The core abstractions that make up SwiftNIO.
enum System
final 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.
protocol Copyable
A type whose values can be implicitly or explicitly copied.
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 Escapable
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol Sendable
A thread-safe type whose values can be shared across arbitrary concurrent contexts without introducing a risk of data races. Values of the type may have no shared mutable state, or they may protect that state with a lock or by forcing it to only be accessed from a specific actor.
init(name: String, address: SocketAddress?, netmask: SocketAddress?, broadcastAddress: SocketAddress?, pointToPointDestinationAddress: SocketAddress, multicastSupported: Bool, interfaceIndex: Int)
var address: SocketAddress? { get set }
The address associated with the given network device.
var broadcastAddress: 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
.
var debugDescription: String { get }
var interfaceIndex: Int { get set }
The index of the interface, as provided by if_nametoindex
.
var multicastSupported: Bool { get set }
If the Interface supports Multicast
var name: String { get set }
The name of the network device.
var netmask: SocketAddress? { get set }
The netmask associated with this address, if any.
var pointToPointDestinationAddress: 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.
static func == (lhs: NIONetworkDevice, rhs: NIONetworkDevice) -> Bool
func hash(into hasher: inout Hasher)
init(_ interface: NIONetworkInterface)
Convert a NIONetworkInterface
to a NIONetworkDevice
. As NIONetworkDevice
s are a superset of NIONetworkInterface
s, it is always possible to perform this conversion.
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.