From mboxrd@z Thu Jan 1 00:00:00 1970 From: "C.J" Date: Sat, 31 May 2008 13:26:40 +0000 Subject: Re: Re: howto setup a route by netlink socket Message-Id: <200805312126335933518@gmail.com> List-Id: References: <200805300937396564081@gmail.com> In-Reply-To: <200805300937396564081@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-ppp@vger.kernel.org Hi James Chapman >> >James Cameron wrote: >> You could look at the ip(8) command source to find out how it is done, >> /sbin/ip or /bin/ip is part of the iproute package on Red Hat and Debian >> based Linux distributions. >The ip command uses libnetlink, but there's a new netlink library that >is much easier to use. It's called libnl, at >http://people.suug.ch/~tgr/libnl/. It includes simple apps that do >common things like add routes. Binary packages are available for modern >distros. >> Latest version of pptp has a hack that uses system(3) to execute ip(8). >> If you can figure a way to do this without using system(3) then I'm >> quite interested. Thanks a lot, I'll try. Reg -- c.j