QUERY_STATISTICS
QUERY_STATISTICS queries link station and port statistics. Personal Communications or Communications Server passes this query directly to the DLC. The format of the statistics depends on the DLC implementation.
VCB Structure
typedef struct query_statistics
{
unsigned short opcode; /* verb operation code */
unsigned char reserv2; /* reserved */
unsigned char format; /* format */
unsigned short primary_rc; /* primary return code */
unsigned long secondary_rc; /* secondary return code */
unsigned char name[8]; /* LS or port name */
unsigned char stats_type; /* LS or port statistics? */
unsigned char table_type; /* statistics table requested */
unsigned char reset_stats; /* reset the statistics? */
unsigned char dlc_type; /* type of DLC */
unsigned char statistics[256]; /* current statistics */
unsigned char reserva[20]; /* reserved */
} QUERY_STATISTICS;Supplied Parameters
The application supplies the following parameters:
- opcode
- AP_QUERY_STATISTICS
- format
- Identifies the format of the VCB. Set this field to zero to specify the version of the VCB listed above.
- name
- Name defined for the link station or port (depending on setting of stats_type parameter). This is an 8-byte string in a locally displayable character set. All 8 bytes are significant and must be set. Personal Communications or Communications Server uses this to correlate the response to the correct link station or port.
- stats_type
- The type of resource for which statistics are requested. This
must be set to one of the following values:
AP_LS
AP_PORT - table_type
- The type of statistics table requested. This must be set to
one of the following categories of information:
- AP_STATS_TBL
- Specifies that statistical information will be returned.
- AP_ADMIN_TBL
- Specifies that administrative information will be returned.
- AP_OPER_TBL
- Specifies that operational information will be returned. The format of the information returned for each category is DLC implementation specific.
- reset_stats
- Specifies whether the statistics should be reset (AP_YES or AP_NO).
Returned Parameters
If the verb executes successfully, the Program returns the following
parameters:
- primary_rc
- AP_OK
- dlc_type
- Type of the DLC. The value of this field is DLC implementation
specific. The values are as follows:
AP_ANYNET
AP_LLC2
AP_OEM_DLC
AP_SDLC
AP_X25 - statistics
- Current statistics of link station or port.
If the verb does not execute because of a parameter error, the Program returns
the following parameters:
- primary_rc
- AP_PARAMETER_CHECK
- secondary_rc
- AP_INVALID_LINK_NAME
AP_INVALID_PORT_NAME
AP_INVALID_STATS_TYPE
AP_INVALID_TABLE_TYPE
If the verb does not execute because of a state error, the Program returns
the following parameters:
- primary_rc
- AP_STATE_CHECK
- secondary_rc
- AP_LINK_DEACTIVATED
AP_PORT_DEACTIVATED
If the verb does not execute because the node has not yet been
started, the Program returns the following parameter:
- primary_rc
- AP_NODE_NOT_STARTED
If the verb does not execute because of a system error, the Program returns
the following parameter:
- primary_rc
- AP_UNEXPECTED_SYSTEM_ERROR