HP X.25/9000 Programmer's Guide
Chapter 6 105
Extended Features
Getting Programmatic Diagnostics and Status Information
information concerning the VC. The cti is also useful for network logging.
EINVAL is returned if the circuit is not connected or if the socket is no
longer bound to a circuit. For details on logging, see your X.25/9000
User’s Guide.
Syntax for ioctl (X25_RD_CTI)
#include <x25/x25ioctls.h>
#include <x25/x25str.h>
int err;
int sd, cti;
err = ioctl(sd, X25_RD_CTI, &cti);
sd Socket descriptor for a connected VC socket.
X25_RD_CTI Definition for the request.
cti Contains the circuit table index for the socket.
A programming example is shown below.
int error, s, cti;
/*
* Assume at this point that s is a socket
*/
error = ioctl (s, X25_RD_CTI, &cti);
if (error 0) {
perror(”X25_RD_CTI”);
exit(1);
}
The ioctl (X25_RD_LCI) Call
The ioctl(X25_RD_LCI) call returns the logical channel identifier (lci)
associated with a particular virtual circuit. Once you know the lci entry
for a circuit, you can use that information when examining statistics for
a virtual circuit with network logging and the corresponding data from a
protocol-analyzer trace. The lci is the value written into the header of
most CCITT X.25 packets.
Syntax for ioctl (X25_RD_LCI)
#include <x25/x25ioctls.h>
#include <x25/x25str.h>
int err;
36960-90061.bk Page 105 Friday, November 10, 2000 3:42 PM










