[erlang-questions] Erlang and IPv6 again
Wed Jun 10 12:05:17 CEST 2009
On Wed, Jun 10, 2009 at 1:51 PM, Richard O'Keefe<> wrote:
> I asked a few days ago whether there were any known problems
> or limitations using IPv6 with Erlang.
> There were no replies.
> The documentation and the web _have_ been searched, as have the
> sources. There didn't seem to be any particular problems (other
> than "first catch your IPv6-speaking rabbit", which is what the
> project I've been asked to comment on is about). Should I just
> tell these people "don't worry, it all just works?" Could you
> write an IPv6 packet filter in Erlang?
This answer is linux-centric.
I have recently been part of a project doing something similar for
IPv4 but did not see anything that would prevent IPv6. Once you have
the packets in userspace they are just data. I used a TUN device via a
port program (so I could drop root privileges after opening the tun).
You might want a linked-in driver if you're looking for higher
performance. Persistent tun interface should work alright. I also used
the netfilter userspace queue (was libipq) capability but this was not
as good for me. If you only want to ACCEPT or DROP then NFQUEUE might
be the way to go. I was modifying packets passing through and it got
messy writing them back through the mangle table.
In linux at least IPv6 routing is well sorted. NDP works. ip6tables
provides what you would expect. I assume you have a good reason to do
packet filtering in erlang instead of using ip6tables.
Erlang only seems to interact with IPv6 via cooked sockets and so
AF_INET6 socket capabilities are really all that are required. This
works under linux. But these capabilities are largely irrelevant for a
user-space packet filter as the packets (once captured) are just data.
More information about the erlang-questions