One embodiment of the invention relates to processing communication
packets. A communication packet belongs to a communication data structure
(called "conn") which is unique to a connection including the
communication packet. The conn also contains an event list which is a
sequential list of functions necessary to process the packet. An event
list is selected from a database based on the protocol layers necessary
to process the packet and typically contains as many functions as there
are layers in between. Therefore, each layer has a functional entry point
as an event in the event list. The event list identifies a plurality of
communication modules specific for the connection and an ordering
thereof. The packet is processed through the plurality of modules based
on the ordering. The event list is manipulated to enable a module of the
plurality of communication modules to enter one of a plurality of its
operational states.