2000-12-07 07:15:33

by Ben Greear

[permalink] [raw]
Subject: How to programatically determine if policy-based routing is compiled into the kernel?

I have a product that is dependent on policy-based (source routing)
and would like to be able to scream loudly at install and startup if
policy-based routing is not enabled in the kernel.

Is there some way to determine this? Specifically, I'd love
a way to find out through the /proc system, but an ioctl or
similar call would be OK. I'd even settle for some other tool,
like 'ip', if I could just figure out what commands to tell it.

Thanks,
Ben

--
Ben Greear ([email protected]) http://www.candelatech.com
Author of ScryMUD: scry.wanfear.com 4444 (Released under GPL)
http://scry.wanfear.com http://scry.wanfear.com/~greear


2000-12-07 08:32:59

by Tony Nugent

[permalink] [raw]
Subject: Re: How to programatically determine if policy-based routing is compiled into the kernel?

On Thu Dec 07 2000 at 00:44, Ben Greear wrote:

> I have a product that is dependent on policy-based (source routing)
> and would like to be able to scream loudly at install and startup if
> policy-based routing is not enabled in the kernel.
>
> Is there some way to determine this? Specifically, I'd love
> a way to find out through the /proc system, but an ioctl or
> similar call would be OK. I'd even settle for some other tool,
> like 'ip', if I could just figure out what commands to tell it.

Run a command that attempts to use policy-based routing (doing
something "benign" like a listing). If it fails then good chance
that it isn't compiled in :-)

[ or it may simply mean that the appropriate modules are not loaded,
so beware that one :]

That command would need to be /sbin/ip or /sbin/tc or whatever.

If you want to ferrit out what proc looks like with and without
routing policy enabled, that would be another way to do it.

Cheers
Tony