Vpn

apps/vpn/vpws.lua provides a L2 point-to-point VPN by encapsulating Ethernet frames in GRE over IPv6. To facilitate integration with a IPv6 transport network, apps/ipv6/ns_responer.lua implements an app that responds to IPv6 neighbor solicitations on the VPN "uplink".

Most of the code, however, deals with parsing and manipulating protocol headers. An OO approach appeared to be well suited for this, since most protocl headers can share a lot of code for basic functionality. The overhead in method calls and object creation may well turn out to be a no-go, but I'd like to see how far I can get with this.  To implement inheritance, I have added a small OO framework in class.lua that others might want to use as well.

There aren't any selftests for the VPN code yet, because it's kind of hard to set up a meaningful test environment.