Xref: utzoo comp.unix.internals:2134 comp.unix.programmer:1145 comp.unix.questions:28917 comp.unix.wizards:24217 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!jarthur!ucivax!mziober From: mziober@solferino.ics.uci.edu (Michael A. Ziober) Newsgroups: comp.unix.internals,comp.unix.programmer,comp.unix.questions,comp.unix.wizards Subject: Raw sockets Message-ID: <27C46514.10930@ics.uci.edu> Date: 22 Feb 91 00:25:56 GMT Organization: UC Irvine Department of ICS Lines: 48 Nntp-Posting-Host: solferino.ics.uci.edu Hi, I am in a project class and our group is stumped, confused, frustrated, and otherwise at our wit's end. Let me tell you why: Our project was to attach an experimental network interface to an Omron box running 4.3BSD Unix. We were informed of a pseudo-network-interface module which is affectionately termed "rawpacket". You may have heard of it. Or not. The point is that we really don't know what the hell we are doing when it comes to grafting code onto a kernel. We can't even get config to do what it is we think it should be doing. But that's not why I'm writing now. We are ready to consider alternative approaches to accomplish the same task. All that we really need is the following: 1. A way to get IP packets that can not be routed out a network interface so that we can manually place them on the experimental network. 2. A way to inject packets that we receive from the experimental network into IP as if they had just been received from a normal kernel-level network interface. Is this too much to ask from a raw socket? I sincerely hope not. Let's say we open a raw socket in the INET domain, with protocol 0 (zero). So what? 1. What access does this give us to IP as outlined above? 2. Do recvfrom()'s pick up unroutable IP packets? Do sendto()'s place packets into IP routing layer? 3. Do we get a subset of these capabilities? 4. Is there any way to use raw sockets to accomplish this at all? "The Design and Implementation of 4.3BSD Unix" is really too vague regarding the specifics/semantics of raw sockets. Are there any other references that have particularly good explanations of the uses/limitations/quirks of raw sockets? Finally, if you don't know what I'm talking about, but know someone who would, could you please forward this? Please? Thank you for your time, Michael Ziober Brought to you by Super Global Mega Corp .com