Digital UNIX
PrevChapter 3. NetworkingNext

Application Programming Interfaces

The network programming environment includes the programming interfaces for application, kernel, and driver developers writing network applications and implementing network protocols. Additionally, it includes the kernel level resources that an application requires to process and transmit data, some of which include libraries, data structures, header files, and transport protocols.

This section briefly discusses the following application programming interfaces that are supported in Digital UNIX Version 4.0:

For more detailed information on the network programming environment, see the Network Programmer's Guide.

X/Open Transport Interface

The X/Open Transport Interface (XTI) defines a transport layer application interface that is independent of any transport provider. This means that programs written to XTI can be run over a variety of transport providers, such as the Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP). The application specifies which transport provider to use.

Because XTI provides an interface that is independent of a transport provider, application developers are encouraged to write programs to XTI instead of STREAMS or sockets. Figure 3-2 illustrates the interaction between XTI and the STREAMS and sockets frameworks.

Figure 3-2. XTI, STREAMS and Sockets Interactions

Depending on the transport provider specified by the application, data can flow along one of two paths:

  1. If a STREAMS-based transport provider is specified, data follows the same route that it did for an application written to run over STREAMS. It passes first through the Stream head, then to any modules that the application pushed onto the Stream, and finally to the STREAMS driver, which puts it on to the network. Digital UNIX Version 4.0 does not provide any STREAMS-based transport providers.

  2. If a socket-based transport provider (TCP or UDP) is specified, data is passed through timod and xtiso. The appropriate socket layer routines are called and the data is passed through the Internet protocols and ifnet layer to the BSD-based driver, which puts it on to the network.

Sockets

Sockets are the industry standard programming interface. Digital UNIX Version 4.0 implements the socket interface for both 4.3BSD and X/Open CAE Specification, Networking Services, Issue 4 interfaces. Using the _SOCKADDR_LEN option to the connect system call, however, you can access the 4.4BSD interface. For more information, see the connect(2) reference page.

The sockets framework consists of a series of system and library calls, header files, and data structures. Applications can access kernel-resident networking protocols, such as the Internet Protocol suite, through socket system calls. Applications can also use socket library calls to manipulate network information, for example, mapping service names to service numbers or translating the byte order of incoming data to that appropriate for the local system's architecture. The Internet Protocol suite, for example, which consists of TCP, UDP, IP, ARP, ICMP, and SLIP is implemented over sockets.

With sockets, the application in user space passes data to the appropriate socket system calls, which then pass it to the network layer. Finally, the network layer passes it, via the ifnet layer, to the BSD driver, which puts it on to the network. For more information, on sockets, see RFC 1200: IAB Protocol Standards, the Network Programmer's Guide, and the X/Open CAE Specification, Networking Services, Issue 4.

STREAMS

The STREAMS framework provides an alternative to sockets. The STREAMS interface was developed by AT&T and consists of system calls, kernel routines, and kernel utilities that are used to implement everything from networking protocol suites to device drivers. Applications in user space access the kernel portions of the STREAMS framework using system calls such as open, close, putmsg, getmsg and ioctl. Digital UNIX Version 4.0 supports System V Release 4.0 STREAMS from the OSF Version 1.2 code base, which provides support for the STREAMS tty interface (although Digital UNIX Version 4.0 continues to support the existing CLIST or Berkeley-based tty interface ). For more information on STREAMS, see the Network Programmer's Guide.

Sockets and STREAMS Interaction

Digital UNIX Version 4.0 provides the ifnet STREAMS module to allow programs using Digital UNIX Version 4.0's BSD-based TCP/IP to access STREAMS-based drivers. It provides the Data Link Bridge (DLB) pseudodriver to allow programs using a STREAMS-based protocol stack to access BSD-based drivers provided on Digital UNIX Version 4.0.

Data Link Interface (DLI)

DLI is provided on Digital UNIX Version 4.0 as a backward compatibility feature to ULTRIX. DLI support on Digital UNIX Version 4.0 allows programs written to DLI on the ULTRIX operating system to access the data link layer. For more information on DLI, see the Network Programmer's Guide.

Data Link Provider Interface (DLPI)

DLPI is a kernel level interface that maps to the data link layer of the OSI reference model. DLPI frees its users from specific knowledge of the characteristics of the data link provider, allowing those characteristics to be implemented independently of a specific communications medium. It is primarily a kernel-level interface targeted for STREAMS protocol modules that either use or provide data link services.

Only a partial subset of the DLPI interface is supported in Digital UNIX Version 4.0. For more information, see the Network Programmer's Guide.

Extensible SNMP Interface (eSNMP)

Digital UNIX supports extensible SNMP (eSNMP), an application-layer Application Programming Interface (API) that permits user-written programs to function as part of a distributed SNMP agent on a Digital UNIX host system.

User programs can dynamically register SNMP MIB objects with the eSNMP master agent (/usr/sbin/snmpd), and subsequently handle the SNMP protocol operations for those objects.

The distribution of MIB objects between cooperating processes is transparent to SNMP applications, which can access all MIB objects using the standard transport endpoints specified in the SNMP RFCs.

For more information, see the Network Programmer's Guide.


PrevHomeNext
Supported NetworksUpNetwork Administration Software