I have an application that uses sockets. At some point It checks whether the certain IP address exists in our network. In order to do that I create raw socket. Here is code segment:
SOCKET sockRaw = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
if(sockRaw == INVALID_SOCKET)
{
SetErrorCode(WSAGetLastError());
return FALSE;
}
This works fine as long as user logs in with administrative rights. However if user logs in with user rights only (not administrative) the socket creation failed. This application runs under Windows NT 4.0. According to the following article, this behavior is by design:
support.microsoft.com/default.aspx?scid=KB;en-us;195445&
Having said all that, I noticed however that ping command works just fine from DOS prompt, even though user doesn't have administrative rights. It means that we can find out whether the certain IP address exists in the network or not, even without administrative rights. Here is question:
How can I accomplish the same goal of checking whether the certain IP address exists in the network without using raw sockets? I need solution that will work for the case when user doesn't have administrative rights on Windows NT 4.0. Thanks
SOCKET sockRaw = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
if(sockRaw == INVALID_SOCKET)
{
SetErrorCode(WSAGetLastError());
return FALSE;
}
This works fine as long as user logs in with administrative rights. However if user logs in with user rights only (not administrative) the socket creation failed. This application runs under Windows NT 4.0. According to the following article, this behavior is by design:
support.microsoft.com/default.aspx?scid=KB;en-us;195445&
Having said all that, I noticed however that ping command works just fine from DOS prompt, even though user doesn't have administrative rights. It means that we can find out whether the certain IP address exists in the network or not, even without administrative rights. Here is question:
How can I accomplish the same goal of checking whether the certain IP address exists in the network without using raw sockets? I need solution that will work for the case when user doesn't have administrative rights on Windows NT 4.0. Thanks