×

Counter functions in an application program interface for network devices

  • US 7,509,656 B2
  • Filed: 08/02/2002
  • Issued: 03/24/2009
  • Est. Priority Date: 08/02/2002
  • Status: Active Grant
First Claim
Patent Images

1. A method performed by an application program interface (API), the method comprising:

  • reading a count value from a hardware counter in a network device;

    resetting the hardware counter;

    updating a software counter with the count value, said software counter being stored in a memory location in a memory, said memory location being associated with the hardware counter, and said memory being accessible by at least one of the API and an application program using the API;

    reading a plurality of additional count values from a plurality of additional hardware counters;

    resetting the plurality of additional hardware counters;

    updating a plurality of additional software counters with the plurality of additional count values, said plurality of additional software counters being stored in a plurality of additional memory locations in the memory, at least one of said additional memory locations being associated with a respective one of the plurality of additional hardware counters; and

    receiving a function command from the application program prior to reading the count value or the plurality of additional count values, said function command to identify the hardware counter and the plurality of additional hardware counters from among a plurality of hardware counters and to initiate the reading, resetting, and updating, wherein each of the plurality of hardware counters is individually identified by a mask index, and wherein the application program provides a single index value to identify the hardware counter and the plurality of additional hardware counters by performing a logical CR operation on respective mask indices for the hardware counter and the plurality of additional hardware counters.

View all claims
  • 6 Assignments
Timeline View
Assignment View
    ×
    ×