Patent ID: 7236458

Claim:
A method for monitoring traffic in a packet switched network, the method comprising: providing a plurality of connections for a packet switched network, the connections being grouped into a single group, the connections including at least a first connection; providing a plurality of token buffers, each one of the token buffers corresponding to a respective one of the connections, the token buffers including at least a first token buffer storing tokens generated at a predetermined rate by the connection corresponding to the first token buffer, the first token buffer corresponding to the first connection, the first token buffer having a first predetermined maximum size; providing a token pool shared by the connections, the token pool storing tokens generated by the first connection when the first token buffer is filled to the first predetermined maximum size, the token pool having a second predetermined maximum size; providing a plurality of counters, each one of the counters corresponding to a respective one of the connections, the counters including at least a first counter, the first counter corresponding to the first connection and counting tokens stored in the token pool by the first connection; providing a plurality of data buffers, each one of the data buffers corresponding to a respective one of the connections, the data buffers including at least a first data buffer, the first data buffer corresponding to the first connection, the first data buffer storing a packet of the first connection when a network resource is deficient and the first connection is a contract-following connection; when the first token buffer is filled to the first predetermined maximum size and the token pool is not filled to the second predetermined maximum size, storing tokens generated during a token generation time in the token pool and controlling a count value of the first counter, said controlling of the count value being in dependence upon said storing of the tokens generated during the token generation time; detecting the count value of the first counter; selectively controlling a maximum size of the first data buffer in dependence upon the detected count value of the first counter; when a first received packet reaches the first data buffer, checking the first token buffer; when the first received packet reaches the first data buffer and the first token buffer does not contain any tokens, checking the token pool; and when the first received packet reaches the first data buffer and the first token buffer does not contain any tokens and the token pool does not contain any tokens, selectively storing the first received packet in the first data buffer in dependence upon the count value of the first counter.