tfUseInterfaceCacheInvalFunc

Jump to: navigation, search

Table of Contents >> Programmer's Reference


#include <trsocket.h>


int tfUseInterfaceCacheInvalFunc (
ttUserInterface interfaceHandle,
ttDevCacheMgmtFuncPtr cacheInvalFuncPtr,
ttUserGenericUnion userParam
);


Function Description

This function is used to register a "cache invalidation" callback function with the given interface. The stack will call the callback when it needs to invalidate a packet buffer.


Parameters

  • interfaceHandle
    Handle to the interface to use this callback on.
  • cacheInvalFuncPtr
    Callback function to be used when the stack needs to invalidate a packet buffer. See ttDevCacheMgmtFunc definition for callback function definition.
  • userParam
    This value is saved on the interface and passed to the registered callback function each time it is called. It is provided for the user’s convenience and does not have to be set to a meaningful value if not needed.


Returns

  • TM_ENOERROR
    Success.
  • TM_EINVAL
    Error in parameter.
  • TM_EPERM
    Device already opened or wrong link layer type.


Table of Contents >> Programmer's Reference