NIO CommKit Host Interface Installation and System Administration Manual

6-24
Porting CommKit Applications To Release 4.x
Examples
Figure 6-3 dk_namer Example
1 char * dev_name;
2 int intf;
3 int chan;
4
5 /* get device name for interface 0 and channel 112 */
6 intf =0;
7 chan = 112;
8
9 dcv_name = dk_namer( intf, chan );
dk_tnamer Example
Figure 6-4 is an example of the dk_tnamer function. This function returns a
pointer to a character string that is the name of the TTY device indicated by
the two arguments. The first argument (intf) is the interface number, and the
second argument (chan) is the data switch channel number on that interface.
Figure 6-4 dk_tnamer Example
1 char * dev_tty_name;
2 int intf;
3 int chan;
4
5 /* get TTY device name for interface 0 and channel 112 */
6 intf - ;
7 chan = 112;
8
9 dev_tty_name = dk_tnamer( intf, chan );
dk_xnamer Example
Figure 6-5 is an example of the dk_xnamer function. The function returns a
pointer to a character string that is the name of the xqt device indicated by
the two arguments. The first argument (intf) is the interface number, and the
second argument (chan) is the data switch channel number on that interface.
Figure 6-5 dk_xnamer Example
1 char * dev_xqt_name;
2 int intf;
3 int chan;
4
5 /* get xqt device name for interface 0 and channel 112 */
6 intf = 0;
7 chan = 112;