Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ nx(7) — GL2 W3.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ioctl(2)

xns(7)

NX(7)  —  Silicon Graphics

NAME

nx − XNS Ethernet driver

SYNOPSIS

device nx0 at mb0 csr 0x7ffc priority 2 vector nxintr

DESCRIPTION

This is the driver for Excelan NX 101 (or 201) ethernet controller.  Access is via some number (currently 32) pseudo-device files.  By convention, the zeroth (0th) of these is used only for control purposes.  The rest are available for use as i/o conduits.  They may be allocated in an orderly fashion by calls to ioctl(2). Writes to the pseudo-device files cause data to be sent over the interface, possibly after some protocol processing. Reads on the pseudo-device files return data from packets received over the interface, possibly after some protocol processing. The kind of processing which occurs is controlled by calls to ioctl(2). One type of processing is XNS Sequenced Packet Protocol (see xns(7)).

In the following descriptions, cfd is a file descriptor referring to pseudo-device zero (0), and fd is a file descriptor referring to some other pseudo-device. 

ioctl(cfd, NXAVAIL, short_ptr)
Passes back the minor device number of a currently available (unused) pseudo-device, or -1 if none is available; in the short integer pointed at by short_ptr.  This number is only a hint: the pseudo-device is not opened or allocated, and it is not guaranteed to remain available for any length of time. 

ioctl(fd, NXIOTEST, short_ptr)
Passes back the number of active references to the pseudo-device; in the short integer pointed at by short_ptr.  This provides a means of checking the hint provided by NXAVAIL. For exclusive access, the number passed back must be no greater than one (1).

fd = ioctl(cfd, NXAVOPEN, char_ptr)
Finds and allocates an available pseudo-device, copies back its path name to the area pointed at by char_ptr (should be at least 20 bytes), opens it, and returns the resulting file descriptor.  Returns -1 if none is available. 

This call controls the type of i/o processing which is performed on a pseudo-device:

ioctl(fd, NXIORAW, 0)
Enables transmission of raw ethernet packets on subsequent writes. This includes the ethernet header but not the CRC.

These several calls are used by system daemons and utilities:

ioctl(fd, NXIOBOUNCE, 0)
Enables reception of raw SG Bounce packets on subsequent reads (only one pseudo-device at a time may be enabled to receive these packets).

ioctl(fd, NXUPROTO, short_ptr)
Enables reception of raw packets whose ethertype is equal to the short integer pointed at by short_ptr. 

ioctl(fd, NXPHYSADDR, physnet_ptr)
Passes back the physical ethernet address of the local ethernet controller, in the struct physnet pointed at by physnet_ptr. 

ioctl(fd, NXSETPGRP, 0)
Makes the calling process the head of a process group controlled (in the tty sense) by the pseudo-device.

These several calls are used for multicasting:

ioctl(fd, NXPUTSLOT, physnet_ptr)
Sets the multicast address of the pseudo-device to the struct physnet pointed at by physnet_ptr. 

ioctl(fd, NXGETSLOT, physnet_ptr)
Passes back the multicast address of the pseudo-device, in the struct physnet pointed at by physnet_ptr. 

ioctl(fd, NXSETRCV, arg)
Governs reception of raw multicast packets. The multicast address should have been specified by a previous NXPUTSLOT call.  The mode of reception is governed by the value of arg: if arg ==0, reception is disabled; if arg == 1, reception is enabled, including self-transmissions; if arg ==2, reception is enabled, not including self-transmissions. 

FILES

/dev/ttyn*- pseudo-device files
xns/Xns.h, xns/Xnsioctl.h- include files

SEE ALSO

ioctl(2), xns(7). 

Version 3.6  —  December 20, 1987

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