Thomas Graf [Thu, 31 Mar 2011 12:25:57 +0000 (14:25 +0200)]
Move to asciidoc
The core library documentation has been converted to use asciidoc. It
provides better flexibility in creating documentation such as tables
and more powerful formatting rules.
The doxygen based API reference remains and three scripts have been
added to:
- gen-tags.sh: extract tag information from doxygen reference
- tags2dict.sh: generate a name=link dictionary file
- doxygen-link.py: replace all references in the asciidoc documentation
refering to API functions, struct, etc. with a link
into the doxygen API reference.
'make gendoc' continue to generate all documentation.
The following tools are required to generate documentation:
- asciidoc
- mscgen
- asciidoc mscgen plugin
- pygments
- xmlstarlet
Thomas Graf [Tue, 29 Mar 2011 10:41:59 +0000 (12:41 +0200)]
trafic class/classifer API improvements and documentation
- removed dead functions in header files
- deprecated rtnl_class_foreach_*() functions due to their missing
handling possibility of OOM situations
- improved API documentation
Thomas Graf [Fri, 25 Mar 2011 17:13:19 +0000 (18:13 +0100)]
Qdisc API improvements and documentation
Deprecated the functions rtnl_qdisc_change() and
rtnl_qdisc_build_change_request() for their lack of being able to
specify flags. The new functions rtnl_qdisc_update() and
rtnl_qdisc_build_update_request() may be used instead. The old
functions are still available though. However, rtnl_qdisc_update()
no longer implies NLM_F_REPLACE, it has to specified implicitely
to allow updating a qdisc without risking to replace another qdisc.
Included detailed documentation of qdisc addition/update/deletion.
Introduced APPBUG() macro to let application developer know of
API abuse.
Nicolas Sitbon [Fri, 25 Mar 2011 14:07:23 +0000 (15:07 +0100)]
correctly handle the object not found case
Removing non existent route (both ipv4 and ipv6) using
rtnl_route_delete return NLE_FAILURE generic error code. After
investigation, it seems the linux kernel return -ESRCH in that case
(see http://lxr.linux.no/linux+v2.6.38/net/ipv6/route.c#L1367). Same
behaviour apply for removing non existent address. The function
nl_syserr2nlerr (lib/error.c) which is responsible for translating
from kernel error to libnl error doesn't handle ESRCH.
Thomas Graf [Thu, 24 Mar 2011 21:50:11 +0000 (22:50 +0100)]
Deprecate rtnl_qdisc_foreach_child() and rtnl_qdisc_foreach_cls()
Their usage is not completely safe, it is not possible to handle
the out of memory situation of the allocate filter. It is very
unlikely for this to cause any problem though.
The functions are still accessible but gcc will warn about their
deprecation.
Thierry Reding [Wed, 23 Mar 2011 14:57:52 +0000 (15:57 +0100)]
Fix "make distcheck".
This commit adds some missing files (some header files, the files below
/etc and the bison/flex files) to the distribution tarball to ensure
that libnl can be built from the tarballs created using "make dist".
It also adds some incantations to properly generate the flex and bison
output since the generated output is no longer shipped in the tarball.
Thierry Reding [Fri, 14 Jan 2011 10:38:05 +0000 (11:38 +0100)]
Fix out-of-tree build.
This patch fixes out-of-tree build, that is, when building with
$builddir != $srcdir. In such a case, some generated header files are
not found because they live in a different tree and can be fixed by
adding the directories to the compiler's include search path.
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.
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
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.
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.
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
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
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.