Solstice X.25 9.2 Developer's Guide

11.2.2.1 L_GETGSTATS--Reads Global Layer 2 Statistics

The L_GETGSTATS ioctl reads global layer 2 statistics from the LAPB driver.

Associated Structures

The lapb_gstioc structure is used.

/* Ioctl block for L_GETGSTATS ioctl */
 struct lapb_gstioc {
     uint8         lli_type;      /* Table type = LI_GSTATS  */
     uint8         lli_spare[3];  /*   (for alignment)   */
     uint32        lapbgstats[globstatmax];
        /* global statistics table           */
 };

 /* Global L2 statistics */
 #define frames_tx     0 /* frames transmitted  */
 #define frames_rx     1 /* frames received  */
 #define sabme_tx      2 /* SABMEs transmitted  */
 #define sabme_rx      3 /* SABMEs received  */
 #define bytes_tx      4 /* data bytes transmitted */
 #define bytes_rx      5 /* data bytes received  */
 #define globstatmax   6 /* size of global stats array */

The members of the lapb_gstioc structure are:

Table 11-43 Members of the lapb_gstioc structure

Member 

Description 

lli_type

The table type 

lapbgstats

The global statistics table