summaryrefslogtreecommitdiff
path: root/include/netlink-local.h
Commit message (Collapse)AuthorAgeFilesLines
* cache: provide safe variant of nl_cache_mngt_require() and use itThomas Graf2012-11-161-8/+0
| | | | | | | | This makes runtime removal of cache operations possible if non-safe API is not in use by application. The non-safe API will be removed in the next major version. Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Use NL_DBG() instead of printing warnings and errors to stderrThomas Graf2012-11-161-6/+6
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* lock abstraction layerThomas Graf2012-11-151-0/+50
| | | | | | Hide pthread availability and enablement behind internal API Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Don't redefine offsetof when already defined by e.g. stddef.hChristian Ruppert2011-06-211-0/+5
|
* Qdisc API improvements and documentationThomas Graf2011-03-251-1/+8
| | | | | | | | | | | | | | | 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.
* Allow NLSYSCONFDIR environment variable to overwrite built-in sysconfdirThomas Graf2011-03-241-0/+12
|
* constify struct trans_tblThomas Graf2010-11-171-4/+4
|
* link: AF_INET link moduleThomas Graf2010-11-161-1/+1
| | | | | | | | 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.
* Extend rtnl_link_alloc_cache() to support address familiesThomas Graf2010-11-111-0/+3
| | | | | | | 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
* Unified TC attributes interfaceThomas Graf2010-10-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update include/linux header copiesThomas Graf2010-10-211-4/+4
| | | | | Adapts ratespec code taking into account that the kernel now takes care of overhead calculations.
* classid databaseThomas Graf2010-10-191-0/+1
| | | | | | | | | 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.
* Packet Location InterfaceThomas Graf2010-07-021-0/+1
|
* Add internal wait_for_ack() which only waits for ACK if !NL_NO_AUTO_ACKThomas Graf2008-10-201-0/+8
| | | | | This changeset ensures that internal code properly synchronizes to ACKs if ACKs are enabled and otherwise return immediately.
* From: Kees Cook <kees@outflux.net>Thomas Graf2008-10-101-0/+1
| | | | | | Hello! It seems that libnl is missing an include for limits.h, which causes it to FTBFS when glibc 2.8 is installed (currently in experimental, so I left this bug severity at "normal").
* libnl: fix about 100 warningsHolger Schurig2008-08-191-0/+1
| | | | | | | | | | | | | In file included from addr.c:28: ../include/netlink-local.h:119:1: warning: "__deprecated" redefined In file included from /usr/include/linux/stddef.h:4, from /usr/include/linux/posix_types.h:4, from /usr/include/linux/types.h:8, from ../include/netlink-local.h:37, from addr.c:28: /usr/include/linux/compiler.h:45:1: warning: this is the location of the previous definition This happens about 100 times. Suggested patch:
* Remove unused dp_dump_line()Thomas Graf2008-05-261-2/+0
|
* Remove old line counting while dumpingThomas Graf2008-05-231-4/+0
|
* Allow parser callbacks to return NL_OK, NL_SKIP, NL_EXITThomas Graf2008-05-151-3/+0
| | | | Obsoletes internal P_ACCEPT/P_IGNORE
* Uninline various functions to save 7K codeThomas Graf2008-05-151-187/+10
|
* Thread-safe error handlingThomas Graf2008-05-141-35/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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!
* Export nl_dump_line() and automatically count lines while dumpingThomas Graf2008-04-291-13/+5
|
* Detailed attribute documentationThomas Graf2008-01-301-0/+1
| | | | | This patch extends and reorganizes the existing attribute documentation and includes various verbose examples.
* Include linux/ip_mg_alg.h internally for compatibility onlyThomas Graf2007-12-181-0/+1
|
* Use linux/types.h to fix amd64 buildPhilip Craig2007-09-181-6/+1
| | | | | | | | | | 10-amd64-linux-types.patch from Ubuntu: - In order to make libnl compilable on amd64 include linux/types.h rather than defining the types ourselves; necessary as other headers include that and get different definitions. -- Scott James Remnant <scott@ubuntu.com> Wed, 22 Mar 2006 02:12:08 +0000
* Export interface to define cachesThomas Graf2007-09-171-0/+1
| | | | | | | | | | This interface was internal so far which required all code defining caches to be compiled with the sources available. In order to simplify the interface, the co_msg_parser prototype was changed to take the struct nl_parser_param directly instead of a void *. It used to be void * because the co_msg_parser was directly passed as the NL_CB_VALID callback function.
* Export interface to define objectsThomas Graf2007-09-151-39/+6
| | | | | | | | | | | This interface was internal so far which required all code defining objects to be compiled with the sources available. This change exposes struct nl_object_ops which seems safe as it is not supposed to be embedded in other structures. Patch contains extensive documentation to help with the creation of own object implementations.
* Initial importThomas Graf2007-09-151-0/+436