1. In a device for directing selected messages to a selected one of a plurality of output paths in accordance with the contents of a message header which comprises a sequence of bit groups presented successively, apparatus for quickly classifying headers; said apparatus comprising: a memory; stored in said memory, at a multiplicity of addresses, node instructions which comprise opcodes in association with respective next address characterizing data and terminator instructions which comprise identifying data for different header types; means for reading a selected one of said bit groups from the header of a message being received; and logic means responsive to a node instruction read from memory for initiating a memory read at a next address determinable from the current node instruction .just read from memory and a header bit group obtained by said reading means, said logic means being responsive to a terminator instruction read from said memory for outputting respective header identifying data whereby, for each header type to be classified, a corresponding pattern of node instructions and a terminator instruction can be written into said memory, thereby enabling said apparatus to identify the respective header.