[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Modify the route table with C



On Thu, 2006-04-06 15:25:11 +0800, Luo Yong <yong.personal.mail@gmail.com> wrote:
> On 4/6/06, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
> > On Thu, 2006-04-06 09:39:58 +0800, Luo Yong <yong.personal.mail@gmail.com> wrote:
> > > Is there anyway to modify the route table with C language?
> >
> > There is. `route' is written in C, as well as the `ip' utility.
> 
> But my server is a customized ARM machine.It don't have the program
> 'route'.So I must find a way to modify route table myself.

Whee... Okay. Lets start it with Adam and Eve.

Linux is a well-known free operating system. As such, it is
open-sourced, so you get the source code of the Linux kernel.
Additionally, the commonly used GNU userland programs are also free
software and thus, their source code is available, too.

GNU/Linux isn't really about readily compiled programs. These are for
convenience only, to have something to give users. And good news are,
that the source used to compile "Linux distributions" is common to all
and any platforms Linux runs on. So it is actually irrelevant for you
to run on a ARM processor, on some Intel chip, Alpha, Sparc, PPC, VAX,
you name it. The source code of the `route' utility is common to _all_
of those, so just get it as an example program that is able to insert
static routes.  The same is true for the `ip' utility. One source that
will compile on all Linux platforms. It's nice, itsn't it?

So all you probably need is a working cross-compiler (or an ARM
machine that's capable of really running a native compiler) and
compile the common `route' source code to get a `route' binary that'll
run on your target machine.

And really, you don't need to program a custom `route' program--just
use the one that we all use. It actually works and is basically free
of bugs.

MfG, JBG

-- 
Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 für einen Freien Staat voll Freier Bürger"  | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

Attachment: signature.asc
Description: Digital signature


Reply to: