Datagrams Outside the Kernel

John Chambers jc at minya.UUCP
Mon Jul 2 14:45:02 AEST 1990


In article <8009 at inco.UUCP>, mack at inco.UUCP (Dave Mack) writes:
> 
> I have question which may (or may not) be worthy of this august
> assemblage.
> 
> I have a program running in user context which has a datagram (IP,
> for example) in a buffer. I need to hand this datagram over to
> the kernel in such a way that it gets transmitted to whatever
> Internet address lurks in the IP header.
> 
> I also need to solve the inverse problem: getting a datagram in
> its raw form from the kernel when it arrives at my machine.

I'll second this request.  I've been asked whether I can build an
application which, in effect, "volunteers" to handle any IP address
that the kernel doesn't know what to do with.  In perusing TFM, I
haven't found any hint that this is possible.  Does any extant IP
implementation supply a hook that allows this?

Actually, I can demonstrate a kludge that solves the problem.  What
I do is take my SLIP package and route all the traffic to it, and
at the other end of the serial link is my application.  But shoving
all the traffic through a 19.2Kb bottleneck isn't exactly my idea
of an ideal solution to the problem.

And I suppose I could carry this one step further:  Route all the
traffic back onto the ethernet to another machine which doesn't
have IP at all, but has only my application sitting there gobbling
up all incoming traffic.  I.e., give up totally on Unix and write
my own low-level system from scratch.  Sounds like fun, but I'm
not fond of swatting flies with a sledgehammer.

(To play devil's advocate, it has been suggested that I could do it
easily on DOS.  After all, it is easy for a DOS application to take
over an interrupt.  I've done it before...  ;-)

Any better ideas?  Is Unix up to the task?

-- 
Uucp: ...!{harvard.edu,ima.com,eddie.mit.edu,ora.com}!minya!jc (John Chambers)
Home: 1-617-484-6393
Work: 1-508-952-3274
Cute-Saying: [I've gotta get a new one of these some day.]



More information about the Comp.unix.wizards mailing list