An abstract protocol you use to interact with IP addresses.
SDKs
- iOS 12.0+
- macOS 10.14+
- Mac Catalyst 13.0+
- tvOS 12.0+
- watchOS 5.0+
- Xcode 10.0+
Framework
- Network
Declaration
protocol IPAddress
An abstract protocol you use to interact with IP addresses.
SDKs
Framework
protocol IPAddress
init?(String)
Initializes an IP address with a string.
Required.
init?(Data, NWInterface?)
Initializes an IP address with data.
Required.
var raw Value: Data
The raw data of an IP address.
Required.
var interface: NWInterface?
The interface associated with this address, such as the IPv6 scoped interface.
Required.
var is Link Local: Bool
A Boolean indicating whether this address is in a link-local range.
Required.
var is Loopback: Bool
A Boolean indicating whether this address is a loopback address for the local device.
Required.
var is Multicast: Bool
A Boolean indicating whether this address is a multicast address.
Required.
struct IPv4Address
A structure containing an IPv4 address.
struct IPv6Address
A structure containing an IPv6 address.