Technical data
SunOS 5.5 Devices zsh(7D)
The zsh driver keeps runningtotals of various hardware generated events for each chan-
nel. These include numbers of packets and characters sent and received, abort conditions
detected by the receiver, receive CRC errors, transmit underruns, receive overruns, input
errors and output errors, and message block allocation failures. Input errors are logged
whenever an incoming message must be discarded, such as when an abort or CRC error
is detected, a receive overrun occurs, or when no message block is available to store
incoming data. Output errors are logged when the data must be discarded due to under-
runs, CTS drops during transmission, CTS timeouts, or excessive watchdog timeouts
caused by a cable break.
IOCTLS The zsh driver supports several ioctl() commands, including:
S_IOCGETMODE Return a struct scc_mode containing parameters currently in use.
These include the transmit and receive clock sources, boolean loop-
back and NRZI mode flags and the integerbaud rate.
S_IOCSETMODE The argument is a struct scc_mode from which the SCC channel will
be programmed.
S_IOCGETSTATS Return a struct sl_stats containing the current totals of hardware-
generated events. These include numbers of packets and characters
sent and received by the driver, aborts and CRC errors detected,
transmit underruns, and receive overruns.
S_IOCCLRSTATS Clear the hardware statistics for this channel.
S_IOCGETSPEED Returns the currently set baud rate as an integer. This may not
reflect the actual data transfer rate if external clocks are used.
S_IOCGETMCTL Returns the current state of the CTS and DCD incoming modem
interface signals as an integer.
The following structures are used with zsh ioctl() commands:
struct scc_mode {
char sm_txclock; /∗ transmit clock sources ∗/
char sm_rxclock; /∗ receive clock sources ∗/
char sm_iflags; /∗ data and clock inversion flags (non-zsh) ∗/
u_char sm_config; /∗ boolean configuration options ∗/
int sm_baudrate; /∗ real baud rate ∗/
int sm_retval; /∗ reason codes for ioctl failures ∗/
};
struct sl_stats {
long ipack; /∗ input packets ∗/
long opack; /∗ output packets ∗/
long ichar; /∗ input bytes ∗/
long ochar; /∗ output bytes ∗/
long abort; /∗ abort received ∗/
long crc; /∗ CRC error ∗/
modified 20 Jan 1993 7D-417










