Requesting Information

Print Statistics Table

lgo_PrintStatisticsTable()

Print a statistics table to stdout.

Syntax
#include "laygo.h"

LResult lgo_PrintStatisticsTable
    (
        LStatisticsTable    statTable,
        LProtocol           protocol
    );
statTablestatistics table to print
protocolstatistics protocol
Description

lgo_PrintStatisticsTable() prints a statistics table to stdout.

Return Values

If successful, lgo_PrintStatisticsTable() returns a non-negative value representing the number of bytes written to stdout. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:

See Also

lgo_FormatStatusReport()
lgo_FormatStatisticsTable()
lgo_PrintStatusReport()

Example
if ((error = lgo_GetStatistics(cid, tempBuf, count)) < 0)
{
    PRINT_FAILURE(error, "GetStatistics", cid);
}
else if (error > 0)
{
    printf("\nStatistics for CID %d:\n\n", cid);
    lgo_PrintStatisticsTable((LStatisticsTable) tempBuf, lgo_Protocol(cid));
}
else
{
    printf("No statistics available on CID %d.\n", cid);
}