sh3rp / gabel

1 stars 0 forks source link

netlink? #1

Open dtaht opened 8 years ago

dtaht commented 8 years ago

I had looked into doing a go version of babel also but the low quality of the available netlink libraries at the time was less than ideal. Do you have one in mind?

also: Is there a getifaddrs equivalent for go?

sh3rp commented 8 years ago

Not sure what you mean by "low quality" but the "net" package in the standard lib is really comprehensive and was what I was going to use for the underlying transport. I have yet to mess with the IPV6 capabilities, so that might be what you were referencing?

The equivalent of getifaddrs in Go is something like:

import "net"

intf := net.InterfaceByName("eth0")
addrs, error := intf.Addrs()
dtaht commented 8 years ago

At brief look at that lib seems to reveal no support for setting or removing routes, inspecting the packet headers or setting them (babel packets are typically marked CS6, and my work actually also sets the ecn bits).

The first problem tho, is the biggest.

This lib appears to have come a long way but I have not poked deeper.

https://github.com/vishvananda/netlink