From: Brian Candler Date: 2012-07-06T17:01:02+09:00 Subject: Re: ruby linux tproxy and routing bgp\ospf\others Eliezer Croitoru wrote in post #1067585: > i have seen this: > https://github.com/mpage/netlink Ah, that's not the one I wrote, which included high-level functions for manipulating the interface and routing tables. > but as i have no knowledge about netlink i have no way to know a thing > about it. > i will read some more but if you can say something about it i will be > happy to hear. Sorry, you'll need to read the links I gave before (including the 'ip' source code), to build the appropriate message structures. For example, adding a new route is message code RTM_NEWROUTE with flags NLM_F_CREATE|NLM_F_EXCL It will probably be easier to spawn out to the 'ip' command for now. If you want to mark the route as coming from BGP, then look at the 'protocol' option and /etc/iproute2/rt_protos -- Posted via http://www.ruby-forum.com/.