where ipsec lies in kernel
hi
i am implementing openswan based on ipsec in linux kernel 2.6.16.16 with the use of ipsec stack in linux kernel . i want to know where ipsec stack lies in the kernel and how it handle the vpn requests. i am having 2 nic in my pc eth0 and eth1 , eth0 is connected to the internet on which i am running ipsec . i want to know whenever i send any packet to the vpn connection at what stage it get encrypted , i need internals of kernel ipsec stack working .
can anyone help me.......................
Gurvinder Singh