NIO CommKit Host Interface Installation and System Administration Manual
DKSPLICE(3X) DKSPLICE(3X)
E-60 CommKit Host Interface, Release 4.0
NAME
dksplice – splice two AT&T data switch connections together
SYNOPSIS
#include <dkit/sysexits.h>
int dksplice(fdout, fdin);
int fdout;
int fdin;
DESCRIPTION
dksplice arranges for two data switch circuits to be connected together. The splicing process must have a
valid file descriptor for each circuit and both circuits must be on the same host interface. The two file
descriptors fdout and fdin are passed as arguments to dksplice. Normally, fdout corresponds to an outgoing
call made earlier using dkdial(3X); while fdin corresponds to an incoming tty call from a data switch.
However, any two data switch channels owned by the process may be spliced. Extreme care should be used
under these circumstances and the user is responsible for ensuring that the endpoints of the splice are
compatible and that a termination protocol is agreed on.
After the splice takes place, the system automatically arranges for the new data switch circuit to initialize its
URP receivers and transmitters.
When the splice successfully completes, dksplice closes both fdin and fdout before returning. Since these
circuits are now unusable, the user must also close any dup(2) copies of them. For example, in the case where
one of the spliced circuits was used for login, standard output and standard error must be closed since they
are duplicated from standard input.
FILES
/usr/lib/libdk.so host interface subroutine library
SEE ALSO
dkdaemon(1M), dkdial(3X), dksplwait(3X), dkhs(7), dkux(7)
dup(2), ioctl(2) in the AT&T UNIX System V Programmer’s Reference Manual
DIAGNOSTICS
When dksplice fails, it returns a negative value to the user and sets errno, but it does not close the file
descriptors fdin or fdout. Any STREAMS modules that were pushed on the Stream before the call to dksplice
will no longer be on the Stream after dksplice returns. Hence, if a user wishes to use the two circuits after
dksplice has failed, the user must reconfigure the circuits.
If you are expecting to recover from failed dksplice calls, it is recommended that you save your terminal
settings prior to the dksplice call. Upon return from a failed splice, you can then push the required modules
(dkty, ldterm, ttcompat, etc.) and reset your terminal settings.
The return codes and [errno] settings are described below.
EX_OSFILE: dksplice was unable to push dkux(7) onto one of the Streams associated with fdin or
fdout.
EX_DATAERR: dksplice does not recognize one or both of fdin or fdout as a Stream associated with a
data switch circuit. This error can also occur when multiple host interfaces are
installed, and fdin and fdout are not associated with the same physical interface.