Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xns(7) — GL2 W2.5r1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ioctl(2)

nx(7)

XNS(7)  —  Silicon Graphics

NAME

xns − interface to XNS Sequenced Packet Protocol

SYNOPSIS

psuedo-device xns

DESCRIPTION

This is the Sequenced Packet Protocol (SPP) interface to the ethernet driver.  Connection setup is accomplished via calls to ioctl (2).  Whereupon, write (2) transmits data; read (2) passes back received data; and close (2) terminates the connection.  Typewriter (tty) processing is optional on both input and output. 
 
By default, the system writes data using the data stream type DST_DATA.  Other data stream types may be sent using the NXWRITE call (see below).  The system uses the data stream type DST_END to end connections.  Reading data of type DST_END returns 0; a subsequent read causes the signal SIGHUP to be sent to the reader.  Writing data of type DST_END is analogous to sending an end-of-file, with the side-effect of disabling further writes from this side.  Writing to a dead connection gives an error; a subsequent write causes the signal SIGHUP to be sent to the writer.  The system automatically sends DST_END as part of close (2).  Data stream types and socket numbers are defined in the include file <xns/Xnsioctl.h> . 
 
In the following descriptions, fd is a file descriptor referring to an ethernet pseudo-device (see nx (7)). 

ioctl(fd, NXSOCKET, short_ptr)
Sets the receive socket number to the short integer pointed at by short_ptr .  Sets error EISCONN (see errno (3)) if the socket number was already set on this pseudo-device. 

ioctl(fd, NXSOCKWAIT, 0)
Waits for an incoming connection. The socket number must have been specified by a previous NXSOCKET call. 

ioctl(fd, NXCONNECT, xns_setup_ptr)
Makes an outgoing connection using the hostname and socket number in the struct xns_setup pointed at by xns_setup_ptr. 

These several calls enable and disable typewriter (tty) processing:

ioctl(fd, NXIOSLOW, 0)
Requests tty output processing on subsequent writes.

ioctl(fd, NXIOFAST, 0)
Requests bypassing of tty output processing on subsequent writes.

ioctl(fd, NXBLOCKOFF, 0)
Requests tty input processing on subsequent reads.

ioctl(fd, NXBLOCKIO, 0)
Requests bypassing of tty input processing on subsequent reads.

These calls provide access to SPP’s out-of-band data:

ioctl(fd, NXREAD, xnsio_ptr)
Reads from a connection: in-band data is passed back using the pointer and count in the struct xnsio pointed at by xnsio_ptr; the data length, data stream type, and control byte are passed back directly in the same struct xnsio. 

ioctl(fd, NXWRITE, xnsio_ptr)
Writes to a connection: the in-band data is specified by the pointer and count in the struct xnsio pointed at by xnsio_ptr; the data stream type and control byte occur directly in the same struct xnsio. 

FILES

xns/Xns.h, xns/Xnsioctl.h- include files

SEE ALSO

ioctl(2), nx(7). 

Version 2.5r1  —  December 06, 1986

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026