Raw AF_INET ICMP sockets

Andy Pfiffer andy at lasspvax.UUCP
Wed Aug 7 04:20:56 AEST 1985


I'm trying to get a public domain pinger (from Mike Muus, Army Ballistic
Research Lab.) to run.  Simply, why does:

	.
	.
	if ((s = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP)) < 0) {
		perror("ping: socket");
		exit(5);
	}
	.
	.

generate:

	ping: socket: Protocol wrong type for socket

??  Can't I create a socket like this? It runs setuid root...
Frustrated. Help...
-- 
=========================================================
USENET:	{decvax,ihnp4,cmcl2,vax135}!cornell!devvax!andy
ARPA:	andy%devvax at Cornell.arpa
MAIL:	Theory Center/265 Olin Hall   "What do you mean
	Cornell University             I watch too much
	Ithaca, NY  14853              TV?"
PHONE:	(607) 256-8686
=========================================================



More information about the Comp.unix.wizards mailing list