NIO CommKit Host Interface Installation and System Administration Manual

DKMGR(3X) DKMGR(3X)
E-56 CommKit Host Interface, Release 4.0
struct mgrmsg {
short m_chan; /* channel number of connection*/
unsigned short m_tstamp; /* time stamp of request */
short m_urp; /* how to initialize URP */
short m_windowsize; /* log value of call originator’s
* receive buffer size */
char * m_protocol; /* protocol options from user*/
char * m_origtype; /* type of originating device*/
char * m_parm; /* parameter string from user*/
char * m_uid; /* param from system/user, aka UID*/
char * m_dial; /* dial string entered*/
char * m_source; /* originator, as known to remote node*/
char * m_lname; /* originator, as known to local node*/
char * m_service; /* service type requested by user */
char * m_baudrate; /* baud rate of originator */
char * m_lflag; /* L == call from local node,
* R == call from a remote one.*/
char * m_srcnode; /* originating node (last segment) */
char * m_srcmod; /* originating mod*/
char * m_srcchan; /* originating channel*/
char * m_cflag; /* call flag: F=first, P=previous */
char * m_errmsg; /* possible error msg if m_chan <= 0*/
char * m_modtype; /* mod. type: field one of fifth line */
} ;
Field m_chan gives the channel number assigned to the incoming request. This channel number is associated
with the CommKit device name returned by dk_namer(3X). The data switch circuit is already established
but the device needs to be opened, initialized and configured. Field m_tstamp gives the time stamp of the
request. Field m_urp indicates how the host interface should initialize URP. Field m_windowsize is the log
value of the call originator’s receive buffer size. Field m_protocol gives the protocol options from the user
dialstring. Field m_origtype is reserved for a subparameter of the protocol field. Field m_parm contains the
parameters from the user dialstring. String m_uid is a sequence of characters extracted from the call setup
request message. It may contain optional subfields separated by ’.’ or ’/’ characters. This field may represent
an octal user ID (if the first character is zero), a decimal user ID (if entirely numeric), or a character login.
The string m_dial gives the dialstring used by the calling process. The string m_source is the group name
(area/exch/group) of the port in the network where the call originated. String m_lname is the trunk, (data
switch group name), as known to the local node. The requested service appears in m_service. Fields
m_srcnode, m_srcmod, and m_srcchan are the originating node, module and channel, respectively. Fields
m_srcmod and m_srcchan are in decimal.
Field m_cflag is the call flag indicating whether this is the first call from this host or if there have been
previous calls from this host. String m_errmsg gives a text error message which is valid only if the returned
m_chan is less than or equal to zero. Field m_modtype gives the module type information which is intended
to be used internally by the network.
The server program must set the URP initialization mode for the requested channel by calling dkinit. The
dkinit function is passed two parameters: fd is the open file descriptor of the device and mode the URP
initialization instructions. mode should be the m_urp value returned in the mgrmsg structure but may be any
combination of the bitwise OR of zero, DKXINIT or DKRINIT. dkinit returns a non-negative value on
success. Otherwise, a value of -1 is returned and the external variable errno is set to indicate the error.
The server program must also configure the device via a call to dkcktcfg. This function sets the device to the
active state and passes the URP window size to the transmitter. This function uses the open file descriptor
srvfd of the server channel, found in the external variable dksrvfd. The channel chan and window size
windowsize are taken from call request structure members m_chan and m_windowsize respectively. The
protocol is the protocol value from the dk_protocol external variable. dkcktfg returns a non-negative value
on success. Otherwise, a value of -1 is returned and the external variable errno is set to indicate the error.
The server program is also expected to call either dkmgrack or dkmgrnak to complete the call. The first
acknowledges and accepts the call, the second rejects the call. The first argument for both is chan the channel
number from the call request. The second argument to dkmgrack is windowsz, it is the window size that is
returned to the calling endpoint. Its value is found in the external variable recv_win. The second argument to
dkmgrnak is the error code giving the reason the call was rejected. The third argument is the window size
that is returned to the calling endpoint. Its value is found in the external variable recv_win.