72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
static OFString *
domainFromHostname(OFString *hostname)
{
if (hostname == nil)
return nil;
@try {
of_socket_address_parse_ip(hostname, 0);
/*
* If we are still here, the host name is a valid IP address.
* We can't use that as local domain.
*/
return nil;
} @catch (OFInvalidFormatException *e) {
|
|
|
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
static OFString *
domainFromHostname(OFString *hostname)
{
if (hostname == nil)
return nil;
@try {
OFSocketAddressParseIP(hostname, 0);
/*
* If we are still here, the host name is a valid IP address.
* We can't use that as local domain.
*/
return nil;
} @catch (OFInvalidFormatException *e) {
|