10.07.2015 Views

DTJ Number 3 September 1987 - Digital Technical Journals

DTJ Number 3 September 1987 - Digital Technical Journals

DTJ Number 3 September 1987 - Digital Technical Journals

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The DECnet,ULTRIX SoftwareComponents of the DECnet-ULTRIXSoftwareProgramming InterfaceAs mentioned earlier, we decided to base theprogramming interface in the DECnet-ULTRIXcode on the 4.2BSD interprocess communicationsfacilities, which are modeled on the socketinterface. Operations on sockets are similar tooperations performed on "logical units" or "filedescriptors," which direct IjO operations to afile or another device. Programs make systemscalls to create, bind names to, connect to, sendand receive data over, and destroy sockets.The IPC interface in 4. 2BSD is designed sothat sockets exist in specified communicationsdomains. Sockets within a domain share commonproperties, such as their naming scheme, andmay communicate only with other sockets in thesame domain. To implement the DECnet-UtTRIXsoftware, we had to add the "DECnet" communicationsdomain to the existing Internet and UNIXdomains. The basis of this support was the additionof new modules implementing the DECnetprotocols (at OSI levels 2, 3, and 4). These moduleswould be linked into the ULTRIX kernelwhen the DECnet domain was installed. Theyallow programs to create sockets using the DECnetnetwork services (NSP), routing, and Ethernetdata link protocols to communicate.Within the DECnet domain, two types of socketsare provided: stream, .and sequenced packet.Stream sockets provide a bidirectional, reliable,and flow-controlled stream of data between twoprocesses. Sequenced packet sockets providethese same features while preserving the messageboundaries of the data as presented to: thesending socket interface. All existing DECnetapplications protocols use the sequenced packetinterface because the message boundaries areused to indicate the lengths of data within messages.The stream socket interface was providedto facilitate porting applications from the otherUNIX communications domains to the DECnetdomain. In stream sockets,, the data flowingthrough the stream must be self describing. Inthat way the applications programs using thestream know how long each data element is withoutrelying on message boundaries. Data deliveryis based on buffering and flow control considerationsrather than preserving information aboutthe way the sender presented the data to thestream.We had to provide many supporting routinesin addition to the DECnet protocol code linkedinto the ULTRIX kernel. Those routines are modulesarchived in the standard C-language libraryat DECnet installation time. They provide accessto the DECnet node and object databases,address-conversion routines, and several routinesproviding a simplified programming interface tothe kernel socket routines.Kernel ChangesOur goal was to minimize the number of kernelchanges required to support the DECnet system.All the new functions that reject connections andpass data or access control information on connectionrequests were implemented using theexisting "setsockopt" (set socket option) and"getsockopt" (get socket option) system calls.We modified the ULTRIX kernel to allow thosecalls to be dispatched to domain-dependentcode. That was something the 4.2BSD designershad documented but not fully implemented. Wealso increased from 112 to 1024 bytes the maximumamount of data that could be passed acrossthose interfaces. In that way we could accommodatepassing all the access control information ina single request.We found several bugs in the kernel supportfor this type of socket. Therefore, this DECnetimplementation appears to be the first networkingdomain to support sequenced packets. Allthese bugs were fixed in version 1. 2 of theULTRIX-32 software.Most of the kernel changes were made in thenetwork device drivers. The initial release of theDECnet-ULTRIX software was to act as a nonroutingnode on the Ethernet. Therefore, we wereconcerned only with the <strong>Digital</strong> Ethernet interfacesand the DEUNA and DEQNA networkadapters. As written, the drivers for those devicessupported only the internet protocol (IP) usedby TCP for routing. They had explicit informationabout the IP protocol types coded into thedevice interrupt routines. We also wanted to addsupport for additional protocols (e.g., the LocalArea Transport, IAT, and maintenance operationsprotocol, MOP) at a later date. Therefore, weadded kernel routines that could be. called fromany Ethernet driver. Those routines:dispatch todomain-dependent routines when a message is tobe transmitted or a new message is received. Wealso added a number of I/0 control (ioctl) functions:to those drivers. Those functions allow102<strong>Digital</strong> TecbnlcalJour.nalNo. 3 <strong>September</strong> 1986' .

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!