Jump to main content

##

# PPP_StatHandlerRegister Function

## C

    PPP_STAT_HANDLE PPP_StatHandlerRegister(DRV_HANDLE hMac, PPP_STAT_HANDLER handler);

## Returns

Returns a valid handle if the call succeeds, or a null handle if the call failed (out of memory, for example).

## Description

This function registers a PPP statistics handler.

The PPP module will call the registered handler when a PPP statistics increment occurs.

## Remarks

The handler has to be short and fast. It is meant for setting an event flag, not for lengthy processing!

This API exists only when the build symbol PPP_ENABLE_STATISTICS != 0

## Preconditions

The PPP module must be initialized.

## Parameters

hMac - driver handle (obtained by calling TCPIP_MAC_Open/DRV_PPP_MAC_Open)

handler - Handler to be called when a PPP statistics occurs.