[comp.os.mach] Sending raw IP packets

milliken@bbn.com (Walter Milliken) (09/22/90)

I've been attempting to do some work with IP messages under Mach 2.5,
and run into a problem.  While it is possible to receive a
more-or-less reasonable IP header using read on a SOCK_RAW socket,
there doesn't appear to be a way to hand the kernel a corresponding
IP header via write.  Note that what I want is to supply the header
myself, not to have the kernel supply it for me (as it does with
sendto on a SOCK_RAW socket).

It appears that SunOS release 4.1 allows IP headers to be supplied by
the user by using a protocol number of 0 when creating a raw IP
socket.  As far as I can tell, this feature doesn't exist in Mach.
When I looked at the Mach 3.0 sources, all the raw IP output packets
appear to be passed through rip_output, which insists on adding a
header to the packet.

The question is, am I overlooking something?  (No, I already know
about DLI, which doesn't work on the Sun ie device I'm using, anyway.)
If not, it would be nice if the Sun raw socket extension could be
added to the socket code in Mach 3.0 -- it doesn't seem like it ought
to be hard to do.

---Walter