summaryrefslogtreecommitdiffstats
path: root/lib/route/cls/u32.c
Commit message (Collapse)AuthorAgeFilesLines
* Move private header files to <netlink-private/*>Thomas Graf2013-01-241-4/+4
| | | | | | | This clarifies the seperation between public and private header files. Signed-off-by: Thomas Graf <tgraf@suug.ch>
* "%llu" replaced with "%" PRIu64Коренберг Марк (дома)2012-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | On some architectures, uint64_t is defined as: typedef unsigned long long int __u64; on another architectures as: typedef unsigned long int __u64; So, according to man 3 printf, uint64_t should be printed as "%llu" on some architectures, and as "%lu" on another. The same for scanf. To eliminate that challenge, there is inttypes.h, in which appropriate constants are defined for current architecture. 32-bit types (and even 16 and 8 bit types) should be printed using such constants if printed variable defined as uint_XXXt or intXXXt type. But in reality 32-bit and less types does not gain run-time error (except in scanf), because they pushed to stack as 32-bit values at least. So, I decide not to fix that.
* Fix types-related warnings based on clang diagnosticsКоренберг Марк2012-06-131-1/+1
| | | | | | | | | | | | | | | | | 1. Fix some places where unsigned value compared < 0 2. Fix obsolete %Z specifier to more portable %z 3. Some erroneous types substitution 4. nl_msec2str() - 64-bit msec is now properly used, Only safe changes. I mean int <--> uint32_t and signed/unsigned fixes. Some functinos require size_t argument instead of int, but changes of signatures of that functions is terrible thing. Also, I do not pretend for a full list of fixes. Just to shut up clang -Wall -Wextra One more thing. ifindex. I don't change that because changes will be too big for simple fix.
* u32: add support for hashingAdrian Ban2012-05-081-0/+85
|
* Unified TC APIThomas Graf2011-03-211-36/+59
| | | | | | | | 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.
* Unified TC attributes interfaceThomas Graf2010-10-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* one more fix, u32.cDenys Fedoryschenko2009-12-071-2/+1
| | | | | | One more segfault, also nl-tctree-list , fix Probably need reformat for better look Patch attached
* - Reworked the classifier interface.Thomas Graf2009-09-021-92/+35
| | | | | | - Added initial ematch support - Added support for the basic classifier - Added support for the cgroup classifier
* Remove old line counting while dumpingThomas Graf2008-05-231-52/+39
|
* Remove obsolete nla_get_addr() and nla_get_data()Thomas Graf2008-05-141-4/+4
| | | | | | | | Replaces obsolete calls to nla_get_addr() and nla_get_data() with nl_addr_alloc_attr() respectively nl_data_alloc_attr(). Also fixes missing error handling while parsing routing multipath configuration.
* Thread-safe error handlingThomas Graf2008-05-141-17/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order for the interface to become more thread safe, the error handling was revised to no longer depend on a static errno and error string buffer. This patch converts all error paths to return a libnl specific error code which can be translated to a error message using nl_geterror(int error). The functions nl_error() and nl_get_errno() are therefore obsolete. This change required various sets of function prototypes to be changed in order to return an error code, the most prominent are: struct nl_cache *foo_alloc_cache(...); changed to: int foo_alloc_cache(..., struct nl_cache **); struct nl_msg *foo_build_request(...); changed to: int foo_build_request(..., struct nl_msg **); struct foo *foo_parse(...); changed to: int foo_parse(..., struct foo **); This pretty much only leaves trivial allocation functions to still return a pointer object which can still return NULL to signal out of memory. This change is a serious API and ABI breaker, sorry!
* Initial importThomas Graf2007-09-141-0/+602