summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* HTB: Add support for level and direct pkt stats, complete access functionsThomas Graf2011-06-091-42/+252
| | | | | | | | - Adds support for htb class level and direct packet statistics - Complete all get/set access functions - Complete error handling - Documentation
* Update local copies of include/linuxThomas Graf2011-06-091-0/+1
|
* Provide documentation for rtnl_tc_data() and rtnl_tc_data_check()Thomas Graf2011-06-091-0/+24
|
* Add nl_rate2str()Thomas Graf2011-06-091-0/+21
|
* Add rtnl_tc_data_check()Thomas Graf2011-06-091-0/+15
| | | | | Behaves like rtnl_tc_data() but verifies that the traffic control object is of the expected type.
* Provide silent variation of nl_cache_require()Thomas Graf2011-05-113-9/+16
| | | | | Use in addr and tc layer to avoid warnings being printed if no cache is available.
* Use name "global" instead of "universe" for largest scopeThomas Graf2011-05-041-1/+1
| | | | | This name is more widespread and easier to understand even though it is less correct.
* addr: store link object and provide rtnl_addr_get()Thomas Graf2011-05-031-1/+77
| | | | | | | | stores rtnl_link object in address if cache is availble. Provide access via rtnl_addr_get_link() and rtnl_addr_set_link(). Add rtnl_addr_get() which searches a address cache for an address matching ifindex and local address.
* Adding rule with "From" option doesn't workRomary Sonrier2011-05-031-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OK i found the bug, is is the patch !! Can someone push it into the git tree ? Regards, Romary Sonrier ========================= My analysis: I guess that the pay load is *struct fib_rule_hdr* struct fib_rule_hdr { __u8 family; __u8 dst_len; __u8 src_len; __u8 tos; __u8 table; __u8 res1; /* reserved */ __u8 res2; /* reserved */ __u8 action; __u32 flags; }; > [PAYLOAD] 12 octets > 02 00 00 00 0a 00 00 01 00 00 00 00 ............ so family = 02 , fine table = 10, fine but src_len =0 !!!! should be 32
* Provide rtnl_tc_get_link() and fix link refcntThomas Graf2011-04-211-5/+34
| | | | | | | | | | Adds rtnl_tc_get_link() returning the link associated with a tc object. Don't clone link associated with tc object when cloning the tc object, refer to same link instead and bump refcnt. Fix refcnt leak when assigning link in msg parser.
* Fix clone() of AF specific link dataThomas Graf2011-04-211-1/+1
| | | | Passed the original link to ao_clone() instead of the new one.
* Set tc->tc_link if link cache is availableThomas Graf2011-04-201-0/+8
| | | | | When parsing tc objects, lookup link in link cache if such a cache is available.
* Improve readability of classid string representationThomas Graf2011-04-201-4/+4
| | | | 1: is more readable than 01:
* Expose <netlink/route/link/inet.h>Thomas Graf2011-04-201-1/+1
|
* Support link info types with no payloadThomas Graf2011-04-191-4/+5
|
* Add support for ARPHRD_NONEThomas Graf2011-04-191-0/+3
|
* dummy interface supportThomas Graf2011-04-152-1/+39
|
* Support for rtnl_link_add()Thomas Graf2011-04-151-6/+73
| | | | API for adding virtual links
* Improve rtnl_link_change() behaviourThomas Graf2011-04-132-73/+129
| | | | | | | | | | | | - avoid unncessary name change requests The kernel does not check if the specified IFNAME is different from the current name. It assumes that if IFNAME and ifindex are both specified, a name change is requested. Therefore avoid specyfing IFNAME if ifindex is provided and original and new name are identical. - move link building to own function (to allow link add later on) - error if immutable changes have been made - better documentation
* fix line removed by mistakeThomas Graf2011-04-111-0/+1
| | | | This line was removed by mistake in the last commit
* API to issue direct GET requests to the kernelThomas Graf2011-04-112-1/+162
| | | | | | | | | Provide nl_pickup() to pick up an answer from a netlink request and parse it using the supplied parser. Add rtnl_link_get_kernel() which sends an RTM_GETLINK to the kernel to fetch a single link directly from the kernel. This can be faster than dumping the whole table, especially if lots of links are configured.
* link: Provide rtnl_link_delete() to delete virtual linksThomas Graf2011-04-101-0/+81
| | | | | Takes a link object and extracts ifindex and name to build a deletion request message to delete virtual network links.
* link: Make return and argument type matchThomas Graf2011-04-101-2/+2
|
* Provide nl_cache_set_arg{1,2}() to specify cache argsThomas Graf2011-04-101-0/+26
| | | | | Added based on a RFE. This is required if allocation and (re)filling is to be splitted.
* Provide nl_object_dump_buf() to easily dump to buffersThomas Graf2011-04-101-0/+10
|
* Initialize dump buffer in case caller missed itThomas Graf2011-04-101-0/+3
| | | | | (Set an end to all the bug reports of applications failing to do so.)
* trafic class/classifer API improvements and documentationThomas Graf2011-03-292-232/+322
| | | | | | | - removed dead functions in header files - deprecated rtnl_class_foreach_*() functions due to their missing handling possibility of OOM situations - improved API documentation
* Qdisc API improvements and documentationThomas Graf2011-03-252-231/+263
| | | | | | | | | | | | | | | 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.
* Add nl_send_sync()Thomas Graf2011-03-251-0/+31
| | | | | Function which sends message using nl_send_auto(), frees the message and waits for ACK/error message (if auto-ack is not disabled).
* correctly handle the object not found caseNicolas Sitbon2011-03-251-0/+1
| | | | | | | | | | 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.
* Deprecate rtnl_qdisc_foreach_child() and rtnl_qdisc_foreach_cls()Thomas Graf2011-03-241-18/+13
| | | | | | | | | 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.
* Allow NLSYSCONFDIR environment variable to overwrite built-in sysconfdirThomas Graf2011-03-242-3/+5
|
* Cleanup <netlink/route/qdisc.h>Thomas Graf2011-03-241-1/+2
| | | | | - remove dead prototypes - reformat
* Check if all mandatory attributes are present in rtnl_tc_msg_build()Thomas Graf2011-03-241-1/+5
| | | | TCA_ATTR_IFINDEX | TCA_ATTR_PARENT | TCA_ATTR_KIND
* Add NLE_NODEV errorThomas Graf2011-03-241-0/+2
|
* Set default MTU to 1500Thomas Graf2011-03-241-2/+2
|
* Fix "make distcheck".Thierry Reding2011-03-231-2/+18
| | | | | | | | | 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.
* Fix out-of-tree build.Thierry Reding2011-03-231-1/+1
| | | | | | | 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.
* Omit empty nested attributesThomas Graf2011-03-231-3/+15
| | | | | Check for empty nested attributes in nla_nest_end() and omit the attribute alltogether if is is the case.
* add missing checks for ROUTE_ATTR_MULTIPATHDaniel Walter2011-03-221-4/+12
| | | | | | | | | | | attached patch adds missing checks for ROUTE_ATTR_MULTIPATH when dealing with multipath routing. Affected functions rtnl_route_remove_nexthop rtnl_route_get_nexthops rtnl_route_get_nnexthops
* Documentation updatesThomas Graf2011-03-2211-74/+174
| | | | Mostly killing doxygen warnings, some doc updates to caching
* fix module parent referencesThomas Graf2011-03-211-1/+1
|
* rename sch -> qdiscThomas Graf2011-03-2114-25/+26
|
* Unified TC APIThomas Graf2011-03-2133-2559/+1822
| | | | | | | | 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.
* provide function to retrieve htb rateThomas Graf2011-03-171-0/+9
|
* Hold reference to obj while calling callback of cache iteratorThomas Graf2011-03-171-0/+5
|
* Print debugging info while iterating a cache based on a filterThomas Graf2011-03-171-2/+9
|
* Fix off-by-one when reading IFLA_INET6_CONF and IFLA_INET6_STATSThomas Graf2011-03-171-2/+2
|
* __nlmsg_alloc(): Guarantee minimal message size of at least the headerThomas Graf2011-03-171-0/+3
|
* Add missing argument in rtnl_link_change exampleMiguel Di Ciurcio Filho2011-03-161-1/+1
| | | | Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>