Patent attributes
Some embodiments provide a method, executable by a network device, that receives a set of commands specifying an ingress interface of the network device and a set of packet attributes. The method further generates a test packet based on the set of packet attributes. The method also injects the test packet into a hardware packet processing pipeline of the network device so that the test packet appears, from the perspective of the hardware packet processing pipeline, to be received at the ingress interface of the network device. The method further processes the test packet through the hardware packet processing pipeline of the network device. The method also captures the test packet before the test packet exits an egress interface of a plurality of egress interfaces of the network device.