Method and apparatus for protocol pattern identification in protocol data
units (PDUs). Techniques disclosed utilize the concept of stages. Within each stage,
a protocol identification apparatus attempts to find a pattern match between the
bits of the protocol data unit and the predefined bits of search patterns for a
particular layer of protocol encapsulation. Once found the apparatus resets itself
and begins the search anew for the next layer of encapsulation. The user is provided
the ability to look for a particular pattern in a higher layer protocol without
having knowledge of which lower layer protocols were used. Both hardware and software
implementations of this apparatus provide for very fast identification of the protocol
data units. Information regarding which encapsulations are present in a particular
protocol data unit are provided saving software routines time when they process
each packet. Also, by informing the apparatus regarding the encapsulation patterns
desired, the protocol identification apparatus can filter the protocol data unit
at runtime which saves additional software routines from spending time later processing
packets that are not needed, and in addition, can save valuable capture buffer
space by discarding those protocol data units not of interest.