sater@uunet.uu.net (Hans van Staveren) (02/01/89)
As part of our Amoeba Distributed operating system research we have the Amoeba RPC mechanism running on all our Unix machines. For SunOs 3.x this meant that Sun had to modify the do_protocol routine in if_subr.c for us to intercept the Amoeba packets before they suffered the same fate as other "unknown" packets: the bit bucket. Now I understood that in SunOs 4.x it should be possible to add protocols without source. Checking the manpages hasn't revealed anything yet, but by some mysterious, possibly legal way we acquired the 4.0 if_subr.c file. Added in this file is a routine ether_register that allows one to register an Ethernet protocol at runtime, and in the do_protocol routine the list of registered protocols is checked, and if the packet type matches a routine, supplied to ether_register, is called to handle the packet. This routine is given two parameters: the struct arpcom of the interface, and the mbuf chain containing the packet *after* the Ethernet header. The Ethernet header itself is not a parameter. This means that the Ethernet source address is lost, and our protocol likes to have it to be able to send packets back. I realise that for IP this is unnecesary, since they use ARP, but in general I think this information is needed by more protocols than just our. I hope I haven't put myself on the targetlist for the Sun lawyers by disclosing this vital part of their kernel source, but I just wonder if I am missing something. Maybe fixed in 4.0.8? I gave Sun the benefit of the doubt and called them to ask this, but given their record I expect more expertise on this list. They will call me back... Hans van Staveren Vrije Universiteit Amsterdam, Holland