Application program interface (API) reads a count value from a hardware
counter in a network device. Then, the API resets the hardware counter
and uses the count value to update a software counter. The software
counter is stored in a memory location corresponding to the hardware
counter. The memory is accessible both by the API and an application
program using the API.