version 1.54, 2007/07/17 18:39:30
|
version 1.58.2.1, 2007/09/11 16:32:43
|
|
|
| |
#if defined(PEGASUS_OS_TYPE_WINDOWS) | #if defined(PEGASUS_OS_TYPE_WINDOWS) |
# include "SystemWindows.cpp" | # include "SystemWindows.cpp" |
#elif defined(PEGASUS_OS_TYPE_UNIX) || defined(PEGASUS_OS_VMS) |
#elif defined(PEGASUS_OS_TYPE_UNIX) || \ |
|
defined(PEGASUS_OS_VMS) || \ |
|
defined(PEGASUS_OS_VXWORKS) |
# include "SystemPOSIX.cpp" | # include "SystemPOSIX.cpp" |
#else | #else |
# error "Unsupported platform" | # error "Unsupported platform" |
|
|
#endif | #endif |
} | } |
| |
|
|
|
#ifdef PEGASUS_ENABLE_IPV6 |
|
Boolean System::isIPv6StackActive() |
|
{ |
|
SocketHandle ip6Socket; |
|
if ((ip6Socket = Socket::createSocket(AF_INET6, SOCK_STREAM, IPPROTO_TCP)) |
|
== PEGASUS_INVALID_SOCKET) |
|
{ |
|
if (getSocketError() == PEGASUS_INVALID_ADDRESS_FAMILY) |
|
{ |
|
return false; |
|
} |
|
} |
|
else |
|
{ |
|
Socket::close(ip6Socket); |
|
} |
|
|
|
return true; |
|
} |
|
#endif |
|
|
// ------------------------------------------------------------------------ | // ------------------------------------------------------------------------ |
// Convert a hostname into a a single host unique integer representation | // Convert a hostname into a a single host unique integer representation |
// ------------------------------------------------------------------------ | // ------------------------------------------------------------------------ |
|
|
// as this is the superior way to work | // as this is the superior way to work |
#if defined(PEGASUS_OS_LINUX) || \ | #if defined(PEGASUS_OS_LINUX) || \ |
defined(PEGASUS_OS_AIX) || \ | defined(PEGASUS_OS_AIX) || \ |
defined(PEGASUS_OS_HPUX) |
defined(PEGASUS_OS_HPUX) || \ |
|
defined(PEGASUS_OS_PASE) |
| |
struct in_addr inaddr; | struct in_addr inaddr; |
// if inet_aton failed(return=0), | // if inet_aton failed(return=0), |