NIO CommKit Host Interface Installation and System Administration Manual
DKMGR(3X) DKMGR(3X)
E-58 CommKit Host Interface, Release 4.0
if ( retval != EX_OK ) {
/* You can either do error handling OR ... */
errcode =
<value indicative of this error>
;
dkmgrnak(inmsgp->m_chan,errcode,recv_win);
error handling;
exit;
/* ... try to reset the dk circuit */
retval = dk_reset_ckt(infc,inmsgp->m_chan);
if ( retval != EX_OK ) {
errcode =
<value indicative of this error>
;
dkmgrnak(inmsgp->m_chan,errcode,recv_win);
error handling;
exit;
}
}
/*
If we got here, the dk circuit should be available:
either because it was idle or because it was reset.
*/
fd = open(cktname, O_RDWR);
if ( fd < 0 ) {
errcode =
<value indicative of this error>
;
dkmgrnak(inmsgp->m_chan,errcode,recv_win);
error handling;
exit;
}
/* dk circuit has been opened and can be initialized */
retval = dkinit(fd, inmsgp->m_urp);
if ( retval < 0 ) {
close(fd);
errcode =
<value indicative of this error>
;
dkmgrnak(inmsgp->m_chan,errcode,recv_win);
error handling;
exit;
}
retval = dkcktcfg(dksrvfd, inmsgp->m_chan,
inmsgp->m_windowsize, dk_protocol);
if ( retval < 0 ) {
close(fd);
errcode =
<value indicative of this error>
;
dkmgrnak(inmsgp->m_chan,errcode,recv_win);
error handling;
exit;
}
dkmgrack(inmsgp->m_chan, recv_win);
/* dk circuit is ready for use; you can now read(fd) and write(fd). */
exec(application);
.
.
.
EXTERN VARIABLES
Several external variables are set by calling dkmgr, dknmgr or dknnmgr and should not be changed. These
variables are:
dksrvfd the file descriptor of the server channel.
recv_win the receiver window size for this host.
nurpblks the number of allowable outstanding URP blocks for this host.
dk_protocol the call set-up protocol of the AT&T Data Switch.
dksrvfatal an indication that the requested service name was rejected by the data switch because it is
already running or because the name is unknown or out of service.