<p>A device and a method (300) for processing a frame, the method includes: receiving (320) a frame; retrieving (350) a lookup key parse command that includes an instruction field and an bitmap representative of selected frame fields to be searched in the frame; generating (370) a lookup key by extracting at least one frame field if the type of the received frame matches an expected frame type; and looking up (385), using the lookup key, for additional frame processing instructions.</p>