]> granicus.if.org Git - libnl/log
libnl
13 years agorename sch -> qdisc
Thomas Graf [Mon, 21 Mar 2011 15:47:42 +0000 (16:47 +0100)]
rename sch -> qdisc

13 years agoUnified TC API
Thomas Graf [Mon, 21 Mar 2011 14:51:52 +0000 (15:51 +0100)]
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.

13 years agoprovide function to retrieve htb rate
Thomas Graf [Thu, 17 Mar 2011 16:31:08 +0000 (17:31 +0100)]
provide function to retrieve htb rate

13 years agoHold reference to obj while calling callback of cache iterator
Thomas Graf [Thu, 17 Mar 2011 16:30:32 +0000 (17:30 +0100)]
Hold reference to obj while calling callback of cache iterator

13 years agoPrint debugging info while iterating a cache based on a filter
Thomas Graf [Thu, 17 Mar 2011 15:40:39 +0000 (16:40 +0100)]
Print debugging info while iterating a cache based on a filter

13 years agoFix off-by-one when reading IFLA_INET6_CONF and IFLA_INET6_STATS
Thomas Graf [Thu, 17 Mar 2011 15:11:10 +0000 (16:11 +0100)]
Fix off-by-one when reading IFLA_INET6_CONF and IFLA_INET6_STATS

13 years ago__nlmsg_alloc(): Guarantee minimal message size of at least the header
Thomas Graf [Thu, 17 Mar 2011 15:03:11 +0000 (16:03 +0100)]
__nlmsg_alloc(): Guarantee minimal message size of at least the header

13 years agoMake struct nl_object public, NLHDR_COMMON has been public anyway
Thomas Graf [Thu, 17 Mar 2011 13:44:56 +0000 (14:44 +0100)]
Make struct nl_object public, NLHDR_COMMON has been public anyway

13 years agoAdd missing argument in rtnl_link_change example
Miguel Di Ciurcio Filho [Wed, 23 Feb 2011 14:13:12 +0000 (11:13 -0300)]
Add missing argument in rtnl_link_change example

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
13 years agoProvide numeric version defines
Thomas Graf [Wed, 16 Mar 2011 12:46:41 +0000 (13:46 +0100)]
Provide numeric version defines

13 years agoallowing silent rules in build
Reuben Hawkins [Fri, 18 Feb 2011 05:28:50 +0000 (21:28 -0800)]
allowing silent rules in build

13 years agoFix function nfnl_ct_del name
Laurent Defert [Thu, 20 Jan 2011 10:51:36 +0000 (11:51 +0100)]
Fix function nfnl_ct_del name

This function is named nfnl_nl_del in lib/netfilter/ct.c, while it was
declared nfnl_ct_delete in the header.

13 years agoInclude <linux/pkt_cls.h> and <linux/pkt_sched.h> in <netlink/route/tc.h> for convenience
Thomas Graf [Wed, 16 Mar 2011 11:59:31 +0000 (12:59 +0100)]
Include <linux/pkt_cls.h> and <linux/pkt_sched.h> in <netlink/route/tc.h> for convenience

13 years agoprefix ipv6 link statistics identifiers with IP6
Thomas Graf [Wed, 16 Mar 2011 11:55:19 +0000 (12:55 +0100)]
prefix ipv6 link statistics identifiers with IP6

13 years agouse linux/netlink.h instead of netlink/netlink-kernel.h
Thomas Graf [Wed, 16 Mar 2011 11:53:14 +0000 (12:53 +0100)]
use linux/netlink.h instead of netlink/netlink-kernel.h

14 years agoTons of documentation
Thomas Graf [Sat, 27 Nov 2010 09:18:07 +0000 (10:18 +0100)]
Tons of documentation

14 years agoaddr: hide nl_addr_destroy()
Thomas Graf [Fri, 26 Nov 2010 15:32:10 +0000 (16:32 +0100)]
addr: hide nl_addr_destroy()

everyone should use nl_addr_put()

14 years agorename NL_AUTO_PID to NL_AUTO_PORT
Thomas Graf [Tue, 23 Nov 2010 12:31:39 +0000 (13:31 +0100)]
rename NL_AUTO_PID to NL_AUTO_PORT

Old name is kept for compatibility.

14 years agoRename nlmsg_for_each_msg() to nlmsg_for_each()
Thomas Graf [Tue, 23 Nov 2010 12:29:45 +0000 (13:29 +0100)]
Rename nlmsg_for_each_msg() to nlmsg_for_each()

Also put remaining variable on local stack instead of requiring the user
to supply it. Old interface is kept for compatibility.

14 years agonl_recv(): Zero out sockaddr in case the caller forgot
Thomas Graf [Mon, 22 Nov 2010 13:19:40 +0000 (14:19 +0100)]
nl_recv(): Zero out sockaddr in case the caller forgot

14 years agonl_recv(): Make passing creds pointer optional
Thomas Graf [Mon, 22 Nov 2010 13:18:59 +0000 (14:18 +0100)]
nl_recv(): Make passing creds pointer optional

14 years agonl: rename nlmsg_msg_size() to nlmsg_size(), nlmsg_len() -> nlmsg_datalen()
Thomas Graf [Mon, 22 Nov 2010 12:13:04 +0000 (13:13 +0100)]
nl: rename nlmsg_msg_size() to nlmsg_size(), nlmsg_len() -> nlmsg_datalen()

The old symbols are left around for compatibility.

14 years agoDocumentation updates
Thomas Graf [Fri, 19 Nov 2010 01:25:37 +0000 (02:25 +0100)]
Documentation updates
 - moved documentation from lib/doc.c to doc/src/
 - splitted pages into separate files
 - worked over core sections, explaining the receiving and sending
   behaviour in much more details including the the available
   mechanisms to customize the behaviour
 - updated the html stylesheet file for increased readability, probably
   needs some doxygen patching to achieve what I am looking for.
 - enabled call graphs, not expanded by default

14 years agoInherit return code of NL_CB_MSG_OUT in nl_sendmsg()
Thomas Graf [Thu, 18 Nov 2010 13:16:33 +0000 (14:16 +0100)]
Inherit return code of NL_CB_MSG_OUT in nl_sendmsg()

If NL_CB_MSG_OUT() returns anything != NL_OK, return that value
to let any caller of nl_sendmsg() know that the message has not
been sent.

14 years agorename nl_send_auto_complete() -> nl_send_auto(), nl_auto_complete -> nl_complete_msg()
Thomas Graf [Thu, 18 Nov 2010 13:13:49 +0000 (14:13 +0100)]
rename nl_send_auto_complete() -> nl_send_auto(), nl_auto_complete -> nl_complete_msg()

Old symbols left to maintain backwards compatibility

14 years agoonly perform automatic sequence checking if auto-ack mode is enabled
Thomas Graf [Thu, 18 Nov 2010 11:51:20 +0000 (12:51 +0100)]
only perform automatic sequence checking if auto-ack mode is enabled

14 years agoDon't build doc.c, there is no real code in it
Thomas Graf [Thu, 18 Nov 2010 11:47:40 +0000 (12:47 +0100)]
Don't build doc.c, there is no real code in it

14 years agosocket: constify interface
Thomas Graf [Thu, 18 Nov 2010 11:47:16 +0000 (12:47 +0100)]
socket: constify interface

14 years agoconstify struct trans_tbl
Thomas Graf [Wed, 17 Nov 2010 15:09:08 +0000 (16:09 +0100)]
constify struct trans_tbl

14 years agolink/inet6: pretty printing
Thomas Graf [Wed, 17 Nov 2010 14:14:08 +0000 (15:14 +0100)]
link/inet6: pretty printing

14 years agoNew function nl_size2str()
Thomas Graf [Wed, 17 Nov 2010 14:13:33 +0000 (15:13 +0100)]
New function nl_size2str()

14 years agoRename nl_get_hz() to nl_get_user_hz() to indicate it's not the in-kernel HZ value
Thomas Graf [Wed, 17 Nov 2010 10:55:42 +0000 (11:55 +0100)]
Rename nl_get_hz() to nl_get_user_hz() to indicate it's not the in-kernel HZ value

14 years agosfq: perturb period is in seconds, not jiffies
Thomas Graf [Wed, 17 Nov 2010 10:55:03 +0000 (11:55 +0100)]
sfq: perturb period is in seconds, not jiffies

14 years agolink/inet: pretty printing, make output more readable
Thomas Graf [Tue, 16 Nov 2010 23:06:34 +0000 (00:06 +0100)]
link/inet: pretty printing, make output more readable

14 years agoupdate Doxyfile to latest version
Thomas Graf [Tue, 16 Nov 2010 14:28:16 +0000 (15:28 +0100)]
update Doxyfile to latest version

14 years agoMake syntax of nl-link-list consistent and install it
Thomas Graf [Tue, 16 Nov 2010 14:08:36 +0000 (15:08 +0100)]
Make syntax of nl-link-list consistent and install it

14 years agolink/inet: documentation: add examples
Thomas Graf [Tue, 16 Nov 2010 14:07:27 +0000 (15:07 +0100)]
link/inet: documentation: add examples

14 years agolink: define RTM_SETLINK to allow pretty printing
Thomas Graf [Tue, 16 Nov 2010 12:54:54 +0000 (13:54 +0100)]
link: define RTM_SETLINK to allow pretty printing

14 years agolink: Add missing IFLA_AF_SPEC container attribute
Thomas Graf [Tue, 16 Nov 2010 12:54:15 +0000 (13:54 +0100)]
link: Add missing IFLA_AF_SPEC container attribute

14 years agolink/inet: Fix array access
Thomas Graf [Tue, 16 Nov 2010 12:47:41 +0000 (13:47 +0100)]
link/inet: Fix array access

14 years agolink: Fix typo, use rtnl_link_af_alloc() to make sure data buffer is allocated
Thomas Graf [Tue, 16 Nov 2010 12:46:49 +0000 (13:46 +0100)]
link: Fix typo, use rtnl_link_af_alloc() to make sure data buffer is allocated

14 years agolink: AF_INET link module
Thomas Graf [Tue, 16 Nov 2010 11:41:43 +0000 (12:41 +0100)]
link: AF_INET link module

Note: The code for this is not upstream yet.

Extends the link api to allow address family modules to fill a link
message and implements a AF_INET address family link module which
uses the new interface.

14 years agolink: Support for IFLA_AF_SPEC
Thomas Graf [Sat, 13 Nov 2010 00:38:13 +0000 (01:38 +0100)]
link: Support for IFLA_AF_SPEC

This feature isn't upstream yet. It's required to test a patch in
my local tree.

Makes the link parser understand IFLA_AF_SPEC and call the address
family specific parser.

14 years agolink: Add support for IPv6 specific link data
Thomas Graf [Thu, 11 Nov 2010 22:15:28 +0000 (23:15 +0100)]
link: Add support for IPv6 specific link data
 - parses IFLA_PROTINFO
 - dumps flags, cacheinfo, devconf and all statistics

14 years agoAdd support for per interface ICMPv6 statistics
Thomas Graf [Thu, 11 Nov 2010 22:14:57 +0000 (23:14 +0100)]
Add support for per interface ICMPv6 statistics

14 years agoAdd local copies of linux/ipv6.h and linux/snmp.h
Thomas Graf [Thu, 11 Nov 2010 21:36:48 +0000 (22:36 +0100)]
Add local copies of linux/ipv6.h and linux/snmp.h

14 years agoAdd all libraries for libtool to improve linkage
Gery Kahn [Thu, 11 Nov 2010 21:21:18 +0000 (23:21 +0200)]
Add all libraries for libtool to improve linkage

This will fix finding libs while link, by adding them to LDFLAGS

[It's no ideal but it's less of a mess than what we have now. -tgraf]

Signed-off-by: Gery Kahn <geryk@ti.com>
14 years agoExtend rtnl_link_alloc_cache() to support address families
Thomas Graf [Thu, 11 Nov 2010 21:26:11 +0000 (22:26 +0100)]
Extend rtnl_link_alloc_cache() to support address families

Adds a family argument which allows to request link dumps for a certain
address family. This allows to f.e. dump ipv6 specific statistics and data.

nl-link-list --family inet6

14 years agoMake nl_str2af return a negative value if parsing fails
Thomas Graf [Thu, 11 Nov 2010 21:25:32 +0000 (22:25 +0100)]
Make nl_str2af return a negative value if parsing fails

14 years agolink/api: Improve API documentation.
Thomas Graf [Thu, 11 Nov 2010 15:38:53 +0000 (16:38 +0100)]
link/api: Improve API documentation.

14 years agolink/api: Convert link info ops to use nl_list_head
Thomas Graf [Thu, 11 Nov 2010 15:18:53 +0000 (16:18 +0100)]
link/api: Convert link info ops to use nl_list_head

rtnl_link_info_ops_lookup() now returns a pointer with refcnt increment,
you must return it using rtnl_link_info_ops_put()

14 years agolink: Support for AF_BRIDGE address family
Thomas Graf [Thu, 11 Nov 2010 15:02:48 +0000 (16:02 +0100)]
link: Support for AF_BRIDGE address family

Supports parsing of IFLA_PROTINFO returned when dumping with PF_BRIDGE

14 years agolink/api: Check for null pointer in rtnl_link_af_ops_put()
Thomas Graf [Thu, 11 Nov 2010 15:02:02 +0000 (16:02 +0100)]
link/api: Check for null pointer in rtnl_link_af_ops_put()

14 years agolink: API for address family specific link data
Thomas Graf [Thu, 11 Nov 2010 14:50:49 +0000 (15:50 +0100)]
link: API for address family specific link data

Introduces a new API to handle address familiy specific link data such as
IFLA_PROTINFO. It provides entry hooks for parsing IFLA_PROTINFO attributes
and allows to include the parsed data when a link object is dumped.

14 years agolink: Support IFLA_NUM_VF attribute
Thomas Graf [Thu, 11 Nov 2010 13:11:32 +0000 (14:11 +0100)]
link: Support IFLA_NUM_VF attribute
- parses attribute if available
- provides API to access value
    rtnl_link_get_num_vf(link, num_vf)

14 years agolink: Support IFLA_IFALIAS attribute
Thomas Graf [Thu, 11 Nov 2010 12:57:10 +0000 (13:57 +0100)]
link: Support IFLA_IFALIAS attribute

- parse IFLA_IFALIAS if available
- provides API to access/change ifalias
     rtnl_link_get_ifalias(link)
     rtnl_link_set_ifalias(link, alias)
- extends nl-link-set to test functionality

14 years agopktloc: support to specify a shift operator for packet locations
Thomas GraF [Thu, 4 Nov 2010 19:01:36 +0000 (20:01 +0100)]
pktloc: support to specify a shift operator for packet locations

no users yet though.

14 years agoCorrectly state the process of sending a netlink message. A message
Thomas GraF [Thu, 4 Nov 2010 18:35:57 +0000 (19:35 +0100)]
Correctly state the process of sending a netlink message. A message
passes through nl_send_iovec() before hitting nl_sendmsg()

14 years agonl-qdisc-delete: Do not attempt to delete default qdiscs
Thomas GraF [Wed, 3 Nov 2010 20:41:24 +0000 (21:41 +0100)]
nl-qdisc-delete: Do not attempt to delete default qdiscs

14 years agoematch/meta: id definitions
Thomas Graf [Wed, 3 Nov 2010 00:08:33 +0000 (01:08 +0100)]
ematch/meta: id definitions

14 years agonl-classid-lookup: Added --raw option to print classid without pretty printing it
Thomas Graf [Mon, 1 Nov 2010 14:20:43 +0000 (15:20 +0100)]
nl-classid-lookup: Added --raw option to print classid without pretty printing it

14 years agonl-qdisc-list: --recursive - print tc objects recursively
Thomas Graf [Mon, 1 Nov 2010 12:41:57 +0000 (13:41 +0100)]
nl-qdisc-list: --recursive - print tc objects recursively

14 years agoCorrectly parse and generate classids
Thomas Graf [Mon, 1 Nov 2010 12:17:19 +0000 (13:17 +0100)]
Correctly parse and generate classids

Make sure to parse strings starting with a hex represention letter
but not representing a valid number as tc names.

Fix typo while generating classid.

14 years agoclassid auto generation if provided tc name does not exist
Thomas Graf [Mon, 1 Nov 2010 07:17:40 +0000 (08:17 +0100)]
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

14 years agoSupport for meta match
Thomas Graf [Sun, 31 Oct 2010 22:13:01 +0000 (23:13 +0100)]
Support for meta match

Syntax:
meta(pktlen > 768)

14 years agotext ematch support
Thomas Graf [Fri, 29 Oct 2010 19:10:02 +0000 (21:10 +0200)]
text ematch support

14 years agoattr: Add padding if nested data does not end at an alignment boundry
Thomas Graf [Fri, 29 Oct 2010 16:40:48 +0000 (18:40 +0200)]
attr: Add padding if nested data does not end at an alignment boundry

This could happen if a user put an unaligned amount of data inside
an attribute with nlmsg_append().

14 years agoImproved debugging messages while constructing messages/attributes
Thomas Graf [Fri, 29 Oct 2010 16:34:27 +0000 (18:34 +0200)]
Improved debugging messages while constructing messages/attributes

14 years agorouting rules: adapt to unified routing rules
Thomas Graf [Fri, 29 Oct 2010 10:48:46 +0000 (12:48 +0200)]
routing rules: adapt to unified routing rules

- Use FRA_ definitions
- Removed obsoleted fields
- Added fwmask and goto support

14 years agoRevert "routing rules: mark support"
Thomas Graf [Fri, 29 Oct 2010 09:52:22 +0000 (11:52 +0200)]
Revert "routing rules: mark support"

This reverts commit ee88c71d16a6b777c916275401a971eea78871d6.

14 years agoRevert "Include RTA_MARK in routing rule messages"
Thomas Graf [Fri, 29 Oct 2010 09:52:08 +0000 (11:52 +0200)]
Revert "Include RTA_MARK in routing rule messages"

This reverts commit 6862c6592ad598dde0d827039b30df1a947822d1.

14 years agoSupport RT_TABLE_COMPAT
Thomas Graf [Fri, 29 Oct 2010 00:06:14 +0000 (02:06 +0200)]
Support RT_TABLE_COMPAT

14 years agoSupport neighbour flag NTF_USE
Thomas Graf [Fri, 29 Oct 2010 00:00:53 +0000 (02:00 +0200)]
Support neighbour flag NTF_USE

14 years agoSupport for 64bit link counters IFLA_STATS64
Thomas Graf [Thu, 28 Oct 2010 23:58:27 +0000 (01:58 +0200)]
Support for 64bit link counters IFLA_STATS64

14 years agoUpdated arp and ethernet codes
Thomas Graf [Thu, 28 Oct 2010 23:48:13 +0000 (01:48 +0200)]
Updated arp and ethernet codes

14 years agoInclude RTA_MARK in routing rule messages
Thomas Graf [Thu, 28 Oct 2010 23:38:10 +0000 (01:38 +0200)]
Include RTA_MARK in routing rule messages

14 years agorouting rules: mark support
Thomas Graf [Thu, 28 Oct 2010 23:34:15 +0000 (01:34 +0200)]
routing rules: mark support

Obsolete RTA_PROTOINFO code and parse RTA_MARK

rtnl_rule_set_mark(rule, mark)
rtnl_rule_get_mark(rule)

now access the mark as in firewall mark

14 years agosrc/nf-queue: revert nonsensical change
Patrick McHardy [Mon, 25 Oct 2010 15:32:23 +0000 (17:32 +0200)]
src/nf-queue: revert nonsensical change

The only part of commit d378220c (src/nf-queue.c: cleanup and improve
performance of test program for NF_QUEUE) that actually makes sense is
the increase in receive buffer size. Issuing verdicts for IDs not delivered
to userspace is a wasted effort since the kernel drops packets itself when
netlink message delivery fails. This would actually have been noticed
by a return value of -ENOENT if the result of nfnl_queue_msg_send_verdict()
would have been checked.

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agocgroup classifier improvements
Thomas Graf [Thu, 28 Oct 2010 22:51:11 +0000 (00:51 +0200)]
cgroup classifier improvements
 - enabled again
 - ematch support
 - cli tools module

Example:
nl-qdisc-add --dev eth0 --parent root --id 1: htb
nl-cls-add --dev eth0 --parent 1: --id dead: cgroup
nl-class-add --dev eth0 --parent 1: --id 1:<CGROUP> htb --rate 77mbit

14 years agobasic: Only add ematches to message if available
Thomas Graf [Thu, 28 Oct 2010 22:45:45 +0000 (00:45 +0200)]
basic: Only add ematches to message if available

14 years agoTons of ematch work
Thomas Graf [Thu, 28 Oct 2010 22:20:42 +0000 (00:20 +0200)]
Tons of ematch work

 - Fixes a bunch of bugs related to ematches
 - Adds support for the nbyte ematch
 - Adds a bison/flex parser for ematch expressions, expressions
   may look like this:
      ip.length > 256 && pattern(ip6.src = 3ffe::/16)
   documenation on syntax follows
 - adds ematch support to the basic classifier (--ematch EXPR)

14 years agoFix use of uninitialized data at the end of netlink message
Thomas Graf [Thu, 28 Oct 2010 22:17:07 +0000 (00:17 +0200)]
Fix use of uninitialized data at the end of netlink message

The netlink message buffer is preallocated to a page and later
expanded as needed. Everything was properly paded and zeroed
out except for the unused part at the end. Use calloc() to
allocate the buffer.

14 years agoAvoid memcpy()/memset() when reserving space for nested attributes
Thomas Graf [Thu, 28 Oct 2010 22:16:40 +0000 (00:16 +0200)]
Avoid memcpy()/memset() when reserving space for nested attributes

14 years agoExtended pktloc to support nbyte locations for ipv6, etc.
Thomas Graf [Thu, 28 Oct 2010 22:14:34 +0000 (00:14 +0200)]
Extended pktloc to support nbyte locations for ipv6, etc.

The alignment column/field now also takes a number, specifying
the length in bytes of the field described by the location

14 years agoPacket location updates
Thomas Graf [Tue, 26 Oct 2010 23:21:50 +0000 (01:21 +0200)]
Packet location updates

This patch includes various bugfixes in the packet location parser.
Namely it removes two memory leaks if parsing fails. The parser is
correctly quit if an allocation error occurs and it is no longer
possible to add duplicates.

It removes the possibility to differ between net and host byteorder.
This is better done in the actual classifiers as it makes more sense
to specify this together with the value to compare against.

The patch also extends the API to add new packet locations via
rtnl_pktloc_add().

It introduces reference counting, therefore you now have to give
back packet locations with rtnl_pktloc_put() after looking them up
with rtnl_pktloc_lookup(). But you are allowed to keep using them
if the packet location file has been reread.

The packet location file now also understands "eth", "ip", and
"tcp" for "link", "net", and "transport".

A --list option has been added to nl-pktloc-lookup to list all
packet location definitions

A --u32=VALUE option has been added to let nl-pktloc-lookup print
the definition in iproute2's u32 selector style.

A manual page has been written for nl-pktloc-lookup.

Finally, nl-pktloc-lookup has been made installable.

14 years agonl-cls-* tools
Thomas Graf [Tue, 26 Oct 2010 20:30:02 +0000 (22:30 +0200)]
nl-cls-* tools

cli based tools to add/update/list/delete classifiers

14 years agoUnified TC attributes interface
Thomas Graf [Tue, 26 Oct 2010 10:54:33 +0000 (12:54 +0200)]
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.

14 years agoUpdate include/linux header copies
Thomas Graf [Thu, 21 Oct 2010 17:47:14 +0000 (19:47 +0200)]
Update include/linux header copies

Adapts ratespec code taking into account that the kernel now takes
care of overhead calculations.

14 years agonl-qdisc-add(8), nl-qdisc-delete(8), nl-qdisc-list(8)
Thomas Graf [Thu, 21 Oct 2010 14:14:15 +0000 (16:14 +0200)]
nl-qdisc-add(8), nl-qdisc-delete(8), nl-qdisc-list(8)

14 years agonl-class-list tool
Thomas Graf [Wed, 20 Oct 2010 15:40:44 +0000 (17:40 +0200)]
nl-class-list tool

Same syntax as nl-qdisc-list

14 years agonl-class-delete tool
Thomas Graf [Wed, 20 Oct 2010 15:15:58 +0000 (17:15 +0200)]
nl-class-delete tool

Tool based on nl-qdisc-delete to delete traffic classes.

14 years agoMake nl-qdisc-delete installable
Thomas Graf [Wed, 20 Oct 2010 14:20:37 +0000 (16:20 +0200)]
Make nl-qdisc-delete installable

Fixes nl_cli_confirm() and adds a check enforcing --yes before deleting
all qdiscs on all devices.

14 years agoRemove NL_DUMP_ENV code
Thomas Graf [Wed, 20 Oct 2010 13:32:45 +0000 (15:32 +0200)]
Remove NL_DUMP_ENV code

Dumping objects as environment variables has never been implemented
completely and only increases the size of the library for no real
purpose. Integration into scripts is better achieved by implementing
a python module anyway.

14 years agomake nl-qdisc-list installable
Thomas Graf [Wed, 20 Oct 2010 13:26:06 +0000 (15:26 +0200)]
make nl-qdisc-list installable

Also improves usability of nl-qdisc-list

14 years agonl-class-add tool
Thomas Graf [Wed, 20 Oct 2010 12:57:39 +0000 (14:57 +0200)]
nl-class-add tool

Adds a cli based tool to add/update traffic classes. This tool requires
each class to be supported via the respetive qdisc module in
pkglibdir/cli/qdisc/$name.so.

Syntax:
nl-class-add --dev eth2 --parent 1: --id 1:1 htb --rate 100mbit
nl-class-add --update --dev eth2 --id 1:1 htb --rate 200mbit

14 years agopfifo/bfifo qdisc support for cli libs
Thomas Graf [Tue, 19 Oct 2010 14:51:55 +0000 (16:51 +0200)]
pfifo/bfifo qdisc support for cli libs

14 years agoremove obsolete nl-qdisc-add code
Thomas Graf [Tue, 19 Oct 2010 14:35:26 +0000 (16:35 +0200)]
remove obsolete nl-qdisc-add code

14 years agoclassid database
Thomas Graf [Tue, 19 Oct 2010 14:31:23 +0000 (16:31 +0200)]
classid database

A database to resolve qdisc/class names to classid values and vice versa.
The function rtnl_tc_handle2str() and rtnl_tc_str2handle() will resolve
names automatically.

A CLI based tool nl-classid-lookup is provided to integrate the database
into existing iproute2 scripts.

14 years agoHTB: Append TCA_OPTIONS even if no options are set
Thomas Graf [Tue, 19 Oct 2010 11:10:26 +0000 (13:10 +0200)]
HTB: Append TCA_OPTIONS even if no options are set

The kernel requires the TCA_OPTIONS{TCA_HTB_INIT} attribute to be
present even if the default values are to be used.

14 years agonl-qdisc-add tool
Thomas Graf [Tue, 19 Oct 2010 11:06:42 +0000 (13:06 +0200)]
nl-qdisc-add tool

Adds a cli based tool to add/update/replace qdiscs. This tool requires
each qdisc to be supported via a dynamic loadable module in
pkglibdir/cli/qdisc/$name.so.

So far HTB and blackhole have been implemented.

Syntax:
nl-qdisc-add --dev eth2 --parent root --id 1: htb --r2q=5
nl-qdisc-add --update-only --dev eth2 --id 1: htb --r2q=10