开发者

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...

  1. Use the mmaped version of开发者_C百科 libpcap to Capture the Packets from NIC and send to User Space.
  2. 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜