Generating program code to be used by a protocol analyzer based on
definitional information relating to a data protocol. A protocol database
that includes definitional information relating to characteristics of a
protocol is stored. The definitional information, which is expressed in a
computer-interpretable format, is processed to generate program code
expressed in a programming language. The program code incorporates the
definitional information and includes logic that is to be executed to
interpret and analyze data packets having the protocol. In this manner,
the program code to be used by the protocol analyzer is generated
mechanically, without requiring software developers. When the program
code needs to be updated in view of changes to existing protocols or the
introduction of new protocols, the protocol database is updated. These
updates are then propagated to the program code without requiring direct
manipulation of the code by software developers.