     
     @available(*, unavailable, renamed="GetAddressInfoFailed")
     case GetAddressFailed(Int32)
-    
+    /// Thrown by `getnameinfo(
     case GetNameInfoFailed(Int32)
     /// Occurs when an invalid parameter is given.
     case ParameterError(String)

    }
}

/// Performs the call `Darwin.getaddrinfo()`.
///
/// The `getaddrinfo(hostname:servname:hints:)` function is used to get a list 
/// of IP addresses and port numebrs for host `hostname` and service `servname`.
/// - parameter hostname: Either a valid host name or a numeric host address, 
///     consisting of a dotted decimal IPv4 address or a n IPv6 address.
/// - parameter servername: Either a decimal port number or a service name
///     listed in services(5) - see the man pages.
///
/// - Attention: `hostname` and `servername` can not be both nil, that is, only
///                 only one may be nil at a time.
/// 
/// - Throws:
///     - `NetworkUtilities.ParmeterError` when invalid parameters are present.
///     - `NetworkUtilities.LibraryError` when an error occured within 
///         `Darwin.getaddrinfo()`. The functions return value is returned as
///         an associate value, see the man pages for the corresponding error
///         codes.
public func getaddrinfo(host hostname: String?, service servername: String?,
    hints: UnsafePointer<addrinfo>) throws -> [AddrInfo] {
    
        guard !(hostname == nil && servername == nil) else {
            throw NetworkUtilitiesError.ParameterError(
                "Host name and server name cannot be nil at the same time!"
            )

        )
        while addr_list[counter] != nil {
            var address = addr_list[counter].memory
            if let str = inet_ntop(&address, type: family) {
                record.addresses.append(str)
            }
            counter += 1
