A method for providing cryptographic functions to data packets at the PPP
layer of a network stack is presented. The method includes the steps of
intercepting PPP datagrams having at least one encapsulated IP packet en
route along the protocol stack; decapsulating the PPP datagrams to
retrieve the encapsulated IP packet, determining whether to process the
IP packet by modifying the IP packet to provide the cryptographic
functions, and encapsulating the IP packet for transmission to a next
layer of the network stack.