4.2 networking question

clt at wdl1.UUCP clt at wdl1.UUCP
Wed Jan 16 07:40:19 AEST 1985


<>
Problem overview: using raw sockets in 4.2bsd

What I want to do: Write a network application which uses IP.  I am
	implementing an XNET User program (Internet protocol #15).
	This would require sending (and receiving!) packets with the
	IP protocol field set to 15.  Note that I don't care whether
	the user process actually receives the entire IP packet.  If
	the header is stripped off, that is fine.

What I am doing: trying to establish a raw socket, with protocol number 15:

	#define XNETPROTO	15
	...
	socknbr = socket(AF_INET,SOCK_RAW,XNETPROTO);

	This call is returning the "Protocol not supported" error.
	By the way, I have SETUIDed, so it is running in supervisor mode,
	as it should, for using raw sockets.

If anyone has any sample code where a process is running on top of IP
directly, I would greatly appreciate a message telling me what I am
doing wrong (either the idea or the specific code, preferably the latter,
but I'm not picky).			Thank you in advance,

					Chris Tucci



More information about the Comp.unix.wizards mailing list