A network processing system is described that functions as a policy gateway in
order to enforce programmable network policies designed to provide quality of service
in and across networks. The programmable network policies are converted into an
image load file using a management interface at a remote server, and sent to the
network processing system where the image is loaded into a processing engine. The
network processing system includes line interfaces to take the data from the network
and to send processed data back onto the network. Unidirectional processing engines
take the data from the line interfaces, and associate each data packet with an
identifier, which identifies the flow of which the data packet is a part. The flows
are then compared to the database of programmable network policies and the processing
engine determines a treatment based on the results of the comparison. A quality
of service processor in the processing engine then uses the treatment to modify
and direct the data packets in a manner consistent with the network policies.