A network device for processing data on a data network includes a
plurality of ports, configured to receive data from a data network and to
send processed data to the data network, a memory management unit
configured store data on and retrieve data from the memory and a metering
unit configured to police a flow of the processed data to be sent to the
network device. The metering unit is configured to utilize a series of
leaky bucket units, where tokens are added to each leaky bucket unit only
when that particular leaky bucket unit is accessed. The metering unit is
also configured to add the tokens based on a prior timestamp value, a
current timing value and an established rate and a multiplication to
establish the tokens is accomplished by shifting a register of the
established rate.