tfArpFlush

Jump to: navigation, search

Table of Contents >> Programmer's Reference


#include <trsocket.h>


int tfArpFlush (int af);


Note Note: You MUST define TM_USE_ARP_FLUSH in your trsystem.h file for this function to be available.


Function Description

This function allows the user to flush the ARP cache table for a given address family. For the passed address family, all IP addresses to link layer addresses mappings will be removed or invalidated in the ARP cache including the ARP cache entries manually added by the user.


Parameters

  • af
    The address family to flush: AF_INET for IPv4, or AF_INET6 for IPv6


Returns

  • TM_ENOERROR
    The ARP cache table has successfully been flushed for the given address family.
  • TM_EINVAL
    Invalid address family.


Example Usage

 
/*
 * Remove/Invalidate all IPv4 to link layer
 * addresses mappings from the ARP cache table.
 */
errorCode = tfArpFlush(AF_INET); 
 
/* 
 * Remove/Invalidate all IPv6 to link layer
 * addresses mappings from the ARP cache table.
 */
errorCode = tfArpFlush(AF_INET6); 
 
 
 

Table of Contents >> Programmer's Reference