hedrick@athos.rutgers.edu (Charles Hedrick) (07/23/90)
I've been playing with CAP this weekend. We see increasing need to have our Unix systems talk directly to Ethertalk. UAB is a neat idea, but I have some qualms about it. It is a complete router. This has two implications: (1) every packet is processed twice: once by UAB and once by the process it is really supposed to go to (2) you need to assign a separate network number for each host, because each host that is running UAB has a dummy internal network that connects UAB with the CAP applications. I've produced a version of CAP that is a simple host implementation of Ethertalk. Unfortunately there are some disquieting implications, and I'm not quite sure what I want to do with it. UAB has the nice property that it only changes one file in libcap.a. I couldn't get away with that. In order to get rid of UAB, I have to put some link and network layer stuff in libcap. It's pretty dull code, since hosts don't need to do much about routing, but something does have to be there. When all the packets passed through UAB, it could handle all that. Now I need a way for each process using CAP to keep track of the current default router, etc. I also need somebody to maintain the ARP table, and a way for individual applications to query it. (Choosing your node number is part of ARP'ing. Obviously we don't want each application choosing a node number independently.) I've ended up using two different synchronization methods. Basic parameters, such as the default router, are kept in a shared page of memory. This allows one process to spy on the routing process, and keep everybody up to date. ARP requests are made to the central daemon via RPC. Fortunately both shared memory and RPC are present on most modern Unix machines. The only portability problem I've seen (and it's a fairly big one) is that I've had to use the packet filter mechanism. This was taken by Sun from user-contributed software in 4.3. But I don't think most other vendors support it. I need a way for a process to open Appletalk socket 130, and only see packets for that socket. It turns out with the packet filter you can specify the packets you are interested in with arbitrary Boolean conditions on any field in the packet. Without this mechanism, I think UAB is the best you can do. The primary reason I've had to change most stuff than UAB did is that I had to turn things like this_node and bridge_node from global variables into offsets into the shared page. This is done in a header file, so I could certainly provide a version of the header file that would produce the old results.