Adding UDP Over IPSEC Packets in Linux?
New-bie to Linux. Have a requirement to Tunnel Received IPSec Packets inside UDP. Thought of doing it like this...
- Use the mmaped version of开发者_C百科 libpcap to Capture the Packets from NIC and send to User Space.
- After getting the Packets in UserSpace; using RAW Sockets for adding UDP Header over the IPSEC Payload.
was this the effective approach of achieving this ? OR any better way ???
Looking forward for the reply !
You might just copy the IPSEC packets to the AF_INET/SOCK_DGRAM socket. Not sure if splice() system call works with both sockets, but if it does - splice() would be better due to no copying between kernel/user space performed
精彩评论