A method and apparatus are provided for implementing frame header
alterations in a network processor. A command decoder receives and
decodes frame alteration commands and provides frame alignment commands
and alteration instructions. A data aligner receives frame data and is
coupled to the command decoder receiving the frame alignment commands.
The data aligner includes an insert and delete unit that sequentially
receives a predefined number of bytes of frame data, selectively latches
data bytes of the received predefined number of bytes of frame data
responsive to the frame alignment commands and sequentially provides an
aligned frame data output of the predefined number of bytes. An
alteration engine is coupled to the data aligner receiving the sequential
aligned frame data output and is coupled to the command decoder receiving
the alteration instructions. The alteration engine provides sequential
altered frame data responsive to the received alteration instructions.