[asio] icmp example not working on Windows 2000

Hello!
The icmp example provided with the asio-library throws a system error
with code 10044 "The support for the specified socket type does not
exist in this address family." when compiled with _WIN32_WINNT 0x0500
and executed on an Win2000 machine.
The error comes from the gai_echeck()-function which is called with
family AF_INET and socktype SOCK_RAW:
inline int gai_echeck(const char* host, const char* service,
int flags, int family, int socktype, int protocol)
{ ....
switch (family)
{
case AF_UNSPEC:
break;
case AF_INET:
case AF_INET6:
if (socktype != 0 && socktype != SOCK_STREAM && socktype != SOCK_DGRAM)
return EAI_SOCKTYPE;
...
I have attached the callstack for call to gai_echeck()
I'm using Visual Studio 2005 and boost 1.39.
I changed the return value of gai_echeck() back to 0 in the debugger and
then the rest of the icmp(ping) example ran without any apparent problems.
Best regards,
Wolfgang
boost::asio::detail::socket_ops::gai_echeck(const char * host=0x0012fad0, const char * service=0x0012faa8, int flags=0, int family=2, int socktype=3, int protocol=1) Line 1380 C++
boost::asio::detail::socket_ops::getaddrinfo_emulation(const char * host=0x0012fad0, const char * service=0x0012faa8, const addrinfo * hintsp=0x0012fa78, addrinfo * * result=0x0012faf0) Line 1441 + 0x1d bytes C++
boost::asio::detail::socket_ops::WspiapiGetAddrInfo(const char * host=0x0012fad0, const char * service=0x0012faa8, const addrinfo * hints=0x0012fa78, addrinfo * * result=0x0012faf0, boost::system::error_code & ec={...}) Line 1801 + 0x15 bytes C++
boost::asio::detail::resolver_serviceboost::asio::ip::icmp::resolve(boost::shared_ptr<void> & __formal={...}, const boost::asio::ip::basic_resolver_queryboost::asio::ip::icmp & query={...}, boost::system::error_code & ec={...}) Line 147 + 0x51 bytes C++
boost::asio::ip::resolver_serviceboost::asio::ip::icmp::resolve(boost::shared_ptr<void> & impl={...}, const boost::asio::ip::basic_resolver_queryboost::asio::ip::icmp & query={...}, boost::system::error_code & ec={...}) Line 105 + 0x1b bytes C++
boost::asio::ip::basic_resolver
participants (1)
-
Wolfgang Fertsak