dect
/
libnl
Archived
13
0
Fork 0
Commit Graph

10 Commits

Author SHA1 Message Date
Pavel Roskin 7701c8572f Make some functions and global variables static 2011-08-11 14:49:51 +02:00
Thomas Graf 8eb5b5532e Unified TC API
Finally got rid of all the qdisc/class/cls code duplication in
the tc module API. The API takes care of allocation/freeing the
tc object specific data.

I hope I got it right this time.
2011-03-21 15:51:52 +01:00
Thomas GraF 738ee7fea1 nl-qdisc-delete: Do not attempt to delete default qdiscs 2010-11-03 21:41:24 +01:00
Thomas Graf 4267d8f336 classid auto generation if provided tc name does not exist
Manually editing etc/libnl/classid before adding tc objects is a pain.
This patch adds code to attempt auto generating a unique tc id which
will then be assigned to the provided name and added to the classid
file.

This will make the following commands work with prior definitions of
the names "top" and "test"
	sudo sbin/nl-qdisc-add --dev eth0 --parent root --id top htb
	sudo sbin/nl-class-add --dev eth0 --parent top --id test htb --rate 100mbit

It will generate the following ids automatically:
4001:			top
4001:1			test
2010-11-01 08:17:40 +01:00
Thomas Graf 4c6d1c5dfb Unified TC attributes interface
So far all common tc atttributes were accessed via specific functions, i.e.
rtnl_class_set_parent(), rtnl_qdisc_set_parent(), rtnl_cls_set_parent()
which implied a lot of code duplication. Since all tc objects are derived
from struct rtnl_tc and these common attributes are already stored in there
this patch removes all type specific functions and makes rtnl_tc_* attribute
functions public.

        rtnl_qdisc_set_parent(qdisc, 10);

becomes:

        rtnl_tc_set_parent((struct rtnl_tc *) qdisc, 10);

This patch also adds the following new attributes to tc objects therefore
removing them as tc specific attributes:
 - mtu
 - mpu
 - overhead

This allows for the rate table calculations to be unified as well taking into
account the new kernel behavior to take care of overhead automatically.
2010-10-26 12:54:33 +02:00
Thomas Graf cefe7db730 Make nl-qdisc-delete installable
Fixes nl_cli_confirm() and adds a check enforcing --yes before deleting
all qdiscs on all devices.
2010-10-20 16:20:37 +02:00
Thomas Graf 8808743839 CLI - Command Line Interface Library
Moved common code in src/ used by CLI tools to src/lib/ for possible use
by other CLI tools. Just link to libnl-cli.{so|la}
2009-12-16 16:20:46 +01:00
Thomas Graf d844307024 Remove old line counting while dumping 2008-05-23 23:45:14 +02:00
Thomas Graf 10cf5a586c New set of libnl tools
Converts all tools to the API changes and improves the useability by
introducing regular options and long options.
2008-05-23 00:02:02 +02:00
Thomas Graf 44d362409d Initial import 2007-09-15 01:28:01 +02:00