A system and method for forwarding data packets with quality of service
and rate control. A plurality of data packets are received from a
plurality of sources. The header information of each data packet is
extracted and compared against a plurality of tables, and then new header
information is assembled based upon the comparison results. The data
packets have their headers replaced by the new header information on the
fly before being sent to their destinations, or the new header
information may be dropped if certain conditions are met.