tfNetStat

Jump to: navigation, search

Table of Contents >> Application Reference >> NETSTAT


#include <trsocket.h>


int tfNetStat (
ttNtTableId tableId,
ttNtEntryCBFuncPtr ntEntryCBFuncPtr,
ttUserGenericUnion genParam1,
ttUserGenericUnion genParam2
);


Function Description

This function walks through the Treck internal data. For each entry found, a ttNtEntryU structure is prepared and passed to the provided 'ntEntryCBFuncPtr' together with the 'genParam1' and 'genParam2' parameters. The function walk continues until ntEntryCBFuncPtr returns a value other than TM_ENOERROR, or when there are no more entries.


Parameters

  • tableId
    Specifies the table that the user would like to walk/output. Valid values are:
  • TM_NT_TABLE_ARP
  • TM_NT_TABLE_NAT
  • TM_NT_TABLE_RTE
  • TM_NT_TABLE_DEVICE
  • TM_NT_TABLE_UDP
  • TM_NT_TABLE_TCP
  • TM_NT_TABLE_ISASTATE_ENTRY (if TM_USE_IKE is defined.)
  • TM_NT_TABLE_ISASTATE_SPD (if TM_USE_IKE_POLICIES is defined.)
  • TM_NT_TABLE_SADB (if TM_USE_IPSEC is defined.)
  • TM_NT_TABLE_IPSEC_SPD (if TM_USE_IPSEC is defined.)

.

  • ntEntryCBFuncPtr
    The user-supplied callback function for handling each of the entries.
  • genParam1
    A generic parameter for passing information to the callback function.
  • genParam2
    A generic parameter for passing information to the callback function.


Returns

  • TM_ENOERROR
    Success.
  • TM_ENOENT
    The callback function failed or directed tfNetStat() to stop.
  • TM_EINVAL
    The 'ntEntryCBFuncPtr' is NULL.


Table of Contents >> Application Reference >> NETSTAT