Re: [LARTC] Issue with using using tc api

2005-02-03 Thread Stephen Hemminger
On Thu, 03 Feb 2005 11:43:40 +0800
"sanjeev ravindran" <[EMAIL PROTECTED]> wrote:

> Thank you so much for ur response Stephen,
> 
> Ya, I found that dlopen tries to load q_htb.so.. and it fails.. 
> I tried to locate q_htb.so in my rh9 machiene.. but i couldnt locate it..
> Could you let me know how build q_htb.so standalone ??
> Thanks in advance,
> With best regards,
> Sanjeev Ravindran

Something like:
gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g -I../include \
 -DRESOLVE_HOSTNAMES -DCONFIG_GACT -DCONFIG_GACT_PROB -shared -fpic q_htb.c -o 
q_htb.so

The tc/Makefile shows how it is done for q_netem.so

___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Issue with using using tc api

2005-02-02 Thread sanjeev ravindran
Thank you so much for ur response Stephen,

Ya, I found that dlopen tries to load q_htb.so.. and it fails.. 
I tried to locate q_htb.so in my rh9 machiene.. but i couldnt locate it..
Could you let me know how build q_htb.so standalone ??
Thanks in advance,
With best regards,
Sanjeev Ravindran

- Original Message -
From: "Stephen Hemminger" <[EMAIL PROTECTED]>
To: "sanjeev ravindran" <[EMAIL PROTECTED]>
Subject: Re: [LARTC] Issue with using using tc api
Date: Wed, 2 Feb 2005 13:28:53 -0800

> 
> On Thu, 03 Feb 2005 00:42:52 +0800
> "sanjeev ravindran" <[EMAIL PROTECTED]> wrote:
> 
> > Hi ,
> >
> > I'm trying to call the tc_qdisc_modify function of tc in 
> > iproute2/tc. I could compile it with my stub program and got the 
> > executable. However, when i try to create an htb qdisc i get the 
> > following error : Unknown qdisc "htb", hence option "default" is 
> > unparsable
> >
> > However, if i use the tc tool, it works fine.. When I tried to 
> > understand the problem, it appeared to be failing of dlopen to 
> > load the module.. But when i use tc tool, it loads this module..
> 
> Tc command is hard to understand because it supports using dynamic 
> libraries to add new queue disciplines.
> To find a queue discipline it first looks for q_XXX.so then opens 
> it's own text with dlopen() and finds the
> necessary table hooks.  This kind of dynamic binding is uncommon in 
> C code, but allows for extensibility.
> 
> Normally tc has most queue discipline support (ie q_htb) linked 
> into the command directly, but
> you could build q_htb.so standalone as well.

-- 
__
Check out the latest SMS services @ http://www.linuxmail.org 
This allows you to send and receive SMS through your mailbox.


Powered by Outblaze
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Issue with using using tc api

2005-02-02 Thread Stephen Hemminger
On Thu, 03 Feb 2005 00:42:52 +0800
"sanjeev ravindran" <[EMAIL PROTECTED]> wrote:

> Hi ,
> 
> I'm trying to call the tc_qdisc_modify function of tc in iproute2/tc. I could 
> compile it with my stub program and got the executable. However, when i try 
> to create an htb qdisc i get the following error : Unknown qdisc "htb", hence 
> option "default" is unparsable
> 
> However, if i use the tc tool, it works fine.. When I tried to understand the 
> problem, it appeared to be failing of dlopen to load the module.. But when i 
> use tc tool, it loads this module..

Tc command is hard to understand because it supports using dynamic libraries to 
add new queue disciplines.
To find a queue discipline it first looks for q_XXX.so then opens it's own text 
with dlopen() and finds the
necessary table hooks.  This kind of dynamic binding is uncommon in C code, but 
allows for extensibility.

Normally tc has most queue discipline support (ie q_htb) linked into the 
command directly, but
you could build q_htb.so standalone as well.
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Issue with using using tc api

2005-02-02 Thread Dan Siemon
On Thu, 2005-03-02 at 00:42 +0800, sanjeev ravindran wrote:

> I'm trying to call the tc_qdisc_modify function of tc in iproute2/tc. I could 
> compile it with my stub program and got the executable. However, when i try 
> to create an htb qdisc i get the following error : Unknown qdisc "htb", hence 
> option "default" is unparsable
> 
> However, if i use the tc tool, it works fine.. When I tried to understand the 
> problem, it appeared to be failing of dlopen to load the module.. But when i 
> use tc tool, it loads this module..

The internal code of TC is not designed to be used by other projects.
LQL[1] may be closer to what you want.  Or if you prefer C#, I will be
releasing lql-sharp in the next day or so.

[1] - http://www.coverfire.com/lql/

-- 
OpenPGP key: http://www.coverfire.com/files/pubkey.txt
Key fingerprint: FB0A 2D8A A1E9 11B6 6CA3  0C53 742A 9EA8 891C BD98


___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] Issue with using using tc api

2005-02-02 Thread sanjeev ravindran
Hi ,

I'm trying to call the tc_qdisc_modify function of tc in iproute2/tc. I could 
compile it with my stub program and got the executable. However, when i try to 
create an htb qdisc i get the following error : Unknown qdisc "htb", hence 
option "default" is unparsable

However, if i use the tc tool, it works fine.. When I tried to understand the 
problem, it appeared to be failing of dlopen to load the module.. But when i 
use tc tool, it loads this module..

Any help in this regard will be most appreciated..
Thanks in advance,
With best regards,
Sanjeev
-- 
__
Check out the latest SMS services @ http://www.linuxmail.org 
This allows you to send and receive SMS through your mailbox.


Powered by Outblaze
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/