A security procedure for invoking IPsec security for communication of a
packet in a network includes the steps of generating a message to be sent
at the transport layer, building Internet Protocol and Transport Control
Protocol headers for the message, selecting a security policy in
accordance with a security policy database after the step of building
Internet Protocol and Transport Control Protocol headers, and processing
the packet according to the selected security policy.