A structure containing an IPv6 address.
SDKs
- iOS 12.0+
- macOS 10.14+
- Mac Catalyst 13.0+
- tvOS 12.0+
- watchOS 5.0+
- Xcode 10.0+
Framework
- Network
Declaration
struct IPv6Address
A structure containing an IPv6 address.
SDKs
Framework
struct IPv6Address
init?(String)
Initializes an IPv6 address with a string.
init?(Data, NWInterface?)
Initializes an IPv6 address with data.
var as IPv4: IPv4Address?
Extracts the IPv4 address contained within the IPv6 address, if the IPv6 address is an IPv4-mapped or IPv4-compatible address.
var raw Value: Data
The raw data of an IPv6 address.
let interface: NWInterface?
The IPv6 scoped interface associated with this address.
var multicast Scope: IPv6Address .Scope?
The IPv6 multicast scope of the address.
enum IPv6Address .Scope
An IPv6 multicast scope.
var is Any: Bool
A Boolean indicating whether the address is the unspecified address (::).
var is6to4: Bool
A Boolean indicating whether the address is a 6to4 address.
var is IPv4Compatabile: Bool
A Boolean indicating whether the address is IPv4-compatible.
var is IPv4Mapped: Bool
A Boolean indicating whether the address is an IPv4-mapped address.
var is Link Local: Bool
A Boolean indicating whether this address is in a link-local range.
var is Loopback: Bool
A Boolean indicating whether this address is a loopback address for the local device.
var is Multicast: Bool
A Boolean indicating whether this address is a multicast address.
var debug Description: String
The description of the IP address.
static let any: IPv6Address
The unspecified address (::).
static let broadcast: IPv6Address
The unspecified broadcast address (::).
static let loopback: IPv6Address
The device's loopback address (::1).
static let node Local Nodes: IPv6Address
The multicast address for all local nodes (ff01::1).
static let link Local Nodes: IPv6Address
The multicast address for all link-local nodes (ff02::1).
static let link Local Routers: IPv6Address
The multicast address for all link-local routers (ff02::2).
static func != (IPv6Address, IPv6Address) -> Bool
Returns a Boolean value indicating whether two values are not equal.
protocol IPAddress
An abstract protocol you use to interact with IP addresses.
struct IPv4Address
A structure containing an IPv4 address.