NIO CommKit Host Interface Installation and System Administration Manual
6-22
Porting CommKit Applications To Release 4.x
Examples
32
33 myuw.maxblocks = 7;
34 myuw.maxbytes = 60;
35
36 if( dk_info(fd, DKSETUW, &myuw) < 0 ) {
37 fprintf(stderr, "dk_info DKSETUW failed \n" );
38 }
39
40 else {
41 fprintf(stderr,
42 "maxblocks=%d maxbytes=%d \n",
43 myuw.maxblocks, myuw.maxbytes);
44 }
45 return 0;
46 }
The following is a description of the previous example:
• Lines 4 and 5 define storage for the two information structures needed.
• Lines 13 through 22 show the use of the DKGETIC command that returns the
interface and channel number of the file descriptor for the standard input.
• Lines 23 through 31 show the use of the DKGETUW command that returns the
parameters of the URP window.
• Lines 33 through 44 show the use of the DKSETUW command that sets the
parameters of the URP window. It is important to set the Max blocks and Max
bytes values before using this command.
If any of these calls returns an error, the library function will also return an
error, printed on standard error.
NOTE: On the remote execution interface, you cannot retrieve or set the URP window
parameters.
dkitdial Example
The code fragment in Figure 6-2 shows two examples of the dkitdial
function.
Figure 6-2 dkitdial Example
1 #include <dkit/dk.h>
2
3 int fdout0, fdout1, cmd;
4 char dstring[128] = "ny/town/lakel";
5 struct dkit_dial d1;
6