Chapter 1. Introduction to NLI

This chapter contains the following section:

IRIS SX.25 supports a Network Layer Interface (NLI) to the X.25 Packet Layer Protocol (PLP) for use by applications. This NLI was developed by Spider Systems, Ltd., and is widely available on many platforms. This interface is not provided as a programming library, but by the standard STREAMS mechanisms for communicating with a stream head. In this way, application programs in user space interact with the in-kernel PLP Driver by exchanging STREAMS messages, using the getmsg and putmsg system calls. The NLI has been designed so that user level library software can be easily constructed.

Messages passed in this way have both a control part and a data part. Primitives and associated parameters are passed to the X.25 driver by using the control part of messages. If data is to be passed with a primitive, it is contained in the data part of the message.

This means that the application must always provide a control part in messages when using the STREAMS routines getmsg and putmsg, and whether data is present in the message or not.

Using this message type, the packet structure and parameters necessary for a general X.25 driver can be mapped into the STREAMS environment very easily.

Include Files

Applications using the IRIS SX.25 NLI need to include several system header files:

  • <errno.h> contains standard error codes.

  • <sys/types.h> contains type definitions used by STREAMS.

  • <sys/stropts.h> defines the message structures used in STREAMS system calls.

  • <sys/snet/uint.h> defines types used by the data structures passed across the NLI.

  • <sys/snet/x25_proto.h> defines the data structures that must be included.

Since only standard system calls are used, no special library needs to be linked with applications using the NLI. There are, however, some potentially useful service functions in the library libsx25.a.