1. Retrieving ICMP messages in Winsock 2
From what I've heard, the Internet Control Message Protocol is to be
supported in Winsock 2. Still, when I do this:
SOCKET sIcmp;
sIcmp=socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
socket() returns with an error message. WSAGetLastError() tells me
that the protocol is not supported. Is this because Winsock is still
in the beta stage, or is it supposed to remain this way?
Calling getprotobyname("icmp") returns a pointer to a valid protoent,
which from my point of view should indicate that icmp is supported. I
tried this as well:
SOCKET sIcmp;
protoent *proto;
proto=getprotobyname("icmp");
sIcmp=socket(AF_INET, SOCK_RAW, proto->p_proto);
But it gives the same disappointing result, even though getprotobyname
recognizes "icmp".
I also tried replacing AF_INET with AF_INET6, and replacing SOCK_RAW
with SOCK_DGRAM.
FYI I am trying to make a Windows 95 port of the Unix utility
icmpinfo, which reports all the ICMP messages received by the system.
Thanks for any feedback,
2. Exporting groups / users to exce; / word
3. how to recieve icmp packet using winsock (sock_raw) from another host
4. Ventura under Windows 3
5. Using ICMP with the WINSOCK
6. DHCP Issue when creating new scope
7. How to do ICMP using winsock
8. Websites: FAQs/Procedures Win95/98/ME/NT4/W2K/XP networking DUN ICS DCC RAS VPN PPTP
9. ICMP socket listening problem
10. Is it possible to send a message with an attach file, using winsock.h ?
11. ICMP Router Discovery & Winsock
12. Winsock 1.x and ICMP?
13. ICMP packets with Winsock