TUPGetApiStats

Retrieves congestion level activity statistics from the TUP service.

Prototype

DWORD NMSAPI TUPGetApiStats ( CTAHD ctahd, TUPAPISTATS *pstats, U8 bReset)

Argument

Description

ctahd

Natural Access handle.

pstats

Pointer to the buffer address where statistics are returned to the caller:

typedef struct
{
   U32 qCount;      /* number of API messages currently
                     * queued to TUP layer                    */
   U32 qPeak;       /* max number of API messages ever
                     * queued to TUP layer                    */
   U32 txPending;   /* current number of outstanding transmit
                     * rqsts to TUP layer                     */
   U32 txPendPeak;  /* max number of transmit rqsts ever
                     * outstanding to TUP layer               */
   U32 txSuccess;   /* number of successful transmit requests
                     * completed                              */
   U32 txFailed;    /* number of failed transmit requests     */
   U32 txLastErr;   /* error code from last failed
                     * transmit request                       */
   U32 rxSuccess;   /* number of events received from TUP
                     * layer                                  */
   U8  apiQCongLvl; /* current outbound queue congestion
                     * level [0..3]                           */
   U8  tupCongLvl;  /* current TUP layer congestion
                     * level [0..3]                           */
   U8  tupCongSrc;  /* reason for TUP layer congestion        */
   U8  spare1;      /* spare for alignment                    */
} TUPAPISTATS;

 

bReset

If non-zero, statistics are reset after returning the statistics to the application.


Return values

Return value

Description

TUP_SUCCESS

 

CTAERR_INVALID_CTAHD

Invalid handle provided.