Programmatically forwarding packets to outgoing interface

Ihsan Junaidi Ibrahim ihsan at grep.my
Mon Sep 23 03:56:03 UTC 2013


Hi folks,

I'm trying to learn building a VPN-type application on FreeBSD and I'm currently stuck at trying to route packets to outgoing interface.

I've managed to push/pop IP packets in a tun(4) interface but now that I can read the inner packet header, I need to route the payload out of the box. I'm not quite sure which API I need to use to achieve this.

The inner packets can be of either IPv4 or IPv6.

Thanks.


More information about the freebsd-net mailing list