Netcom II supports the X25_STATS Streams ioctl(). This command is used to return operating statistics into a passed-in buffer pointer. The following sample code illustrates how to use this command in a program:
struct strioctl str;
struct x25stats x25s;
extern int netid;
CALLT *ct
ct = x25open(netid);
x25s.x_nid = netid;
str.ic_cmd = X25_STATS;
str.ic_timout = 0;
str.ic_len = sizeof(struct x25stats);
str.ic_dp = (char *) &x25s;
ioctl(X25_fd(ct), I_STR, (char *) &str);
getinit is used to parse an X.25 link configuration file. The prototype for getinit is
getinit (char *file, _initvalues *I)
This subroutine will parse a given link parameter file in the format of /usr/lib/x25/config/net.defaults, and create the _initvalues structure. The full path name to the link parameter filename is passed as parameter file. The results are returned to the caller's parameter I.
getinit is found in the nma library /usr/lib/x25/nma/libnma.a. The _initvalues data structure is found in /usr/include/sys/x25/initparm.h.
getinit returns 0 in normal cases. It returns -1 if an error was detected; in most error cases a diagnostic message is written to standard error.
Copyright © 1997-2003 The Software Group
Limited. All Rights Reserved.
® Netcom is a registered trademark of The Software
Group Limited.