summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* nl: Print file:line:func in debugging messages and provide --disable-debug ↵Thomas Graf2013-04-021-9/+14
| | | | | | | | | to disable debugging Compiling libnl with --disable-debug will result in the ignorance of the 'NLDBG' environment variable. Signed-off-by: Thomas Graf <tgraf@suug.ch>
* genl: Provide internal function to resolve name to idThomas Graf2013-04-011-0/+2
| | | | | | Like genl_ops_resolve() but uses its own socket. Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Remove rtnl_link_free() declaration from the header file.Tony Cheneau2013-03-171-1/+0
| | | | | | | Reason: there is no rtnl_link_free() definition anywhere in the code. Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Remove superfluous declaration of rtnl_route_put()Tony Cheneau2013-03-171-1/+0
| | | | | | | rtnl_route_put() is declared twice in the same header file Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* addr: improve API reference documentation for nl_addr_*()Thomas Graf2013-03-141-2/+2
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* attr: Add nla_nest_cancel() to remove partially added nested attributesThomas Graf2013-03-141-0/+1
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* bond: Provide rtnl_link_bond_alloc()Thomas Graf2013-02-141-1/+3
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* vlan: Provide rtnl_link_vlan_alloc()Thomas Graf2013-02-141-1/+3
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* netlink: Forward declare frequent libnl types to ease inclusion depsThomas Graf2013-02-141-1/+3
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* bridge: Provide rtnl_link_bridge_alloc()Thomas Graf2013-02-141-0/+2
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* bridge: Support the new bridging attributesThomas Graf2013-02-074-15/+306
| | | | | | | | | | | | | This provides support for the new bridging attributes provided in IFLA_PROTINFO while maintaining backwards compatibility with older kernels. A set of new API functions are exported to access the bridging information. rtnl_link_bridge_has_ext_info() can be used to check whether a bridge object has been constructed based on the newly available attributes or the old message format. Signed-off-by: Thomas Graf <tgraf@suug.ch>
* attr: Provide nla_is_nested() functionThomas Graf2013-02-051-1/+2
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* link: Keep reference to af_ops during lifetime of link objectThomas Graf2013-02-051-0/+2
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* can: Include "linux/can/netlink.h" in the distributionThomas Graf2013-02-011-0/+1
| | | | | | Needed to compile if local kernel headers are outdated. Signed-off-by: Thomas Graf <tgraf@suug.ch>
* cache: Make NL_ACT_* and nl_cache_ops_(get|put)() availableThomas Graf2013-02-012-15/+15
| | | | | | | | Move NL_ACT_* definition and the functions nl_cache_ops_get() and nl_cache_ops_put() into the public facing API. They can be considered stable. Signed-off-by: Thomas Graf <tgraf@suug.ch>
* can: add helper function to get CAN bus stateBenedikt Spranger2013-01-251-0/+1
| | | | | | Add a helper function to get the CAN bus state. Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de>
* Remove obsolete warning from <netlink/object-api.h> as it breaks NM buildThomas Graf2013-01-241-2/+0
| | | | | | | NM uses -Werror=cpp thus the build breaks if we emit #warning upon inclusion of <netlink/object-api.h> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Provide compat headers for removed private APIThomas Graf2013-01-246-1/+109
| | | | | | | | | | Some projects seem to have mistakenly included the private API headers without actually needing them. Provide dummy headers referring to the real headers to provide backwards compatibility. Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Move private header files to <netlink-private/*>Thomas Graf2013-01-2411-53/+33
| | | | | | | This clarifies the seperation between public and private header files. Signed-off-by: Thomas Graf <tgraf@suug.ch>
* fix includes after removing some headersJiri Pirko2013-01-236-12/+14
| | | | | | | | | | | | | | | commit f20bbe1f07fcff1509425884f5ed72ca8d5fb6ab Author: Thomas Graf <tgraf@suug.ch> Date: Tue Jan 22 19:10:38 2013 +0100 No longer install module API headers This commit causes a regression so no app using libnl can be compiled against it. This patch fixes it by removing includes of no-longe existing headers. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* No longer install module API headersThomas Graf2013-01-231-6/+6
| | | | | | | | | | | | | | | Various header files providing an API to implement own cache and object types or implement link types have been available in the past. Their API is marked unstable in the documentation and nobody is using them so far. Technically they have been causing ABI breakages in at least two 3.2.x releases. In order to avoid future accidental breakage, no longer install these and require module developers to clone the git tree and build modules off the git tree directly to make sure that the API is unstable at this point. Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Add new rtnl_link_af_data_compare function to compare af_dataroopa2013-01-181-0/+3
| | | | | | | | This patch adds a new api rtnl_linl_af_data_compare to compare link af_data Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* link af ops: Add new ao_compare op to compare link af_dataroopa2013-01-121-0/+13
| | | | | | | | | | | | | | This patch adds new operation to compare link af_data. ao_compare is similar to object oo_compare operation. This op can be used when two links are compared for their af data. It takes two link objects in question, an object specific bitmask defining which attributes should be compared and flags to control the behaviour. The function must return a bitmask with the relevant bit set for each attribute that mismatches. Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* cache: Add new nl_cache_find apiroopa2013-01-111-0/+1
| | | | | | | | | | | | | | | | | This patch adds new cache find api nl_cache_find api was suggested by Thomas. Unlike nl_cache_search, this patch uses nl_object_match_filter() to look for an object match. Am not sure this matches what was decided on the list few weeks back. I will be happy to make any changes. Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* link: add carrier supportFlavio Leitner2013-01-114-0/+15
| | | | | Signed-off-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* fix include/Makefile.amThomas Graf2013-01-081-2/+3
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* build: Fix distribution to include 'nfnetlink_conntrack.h'Otavio Salvador2013-01-081-1/+2
| | | | | | | | The header has not been included in the headers list so it has been been distributed in the tarball making it fail to build in old kernels. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Add <netlink/route/link/can.h> to dist targetThomas Graf2013-01-041-0/+1
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Merge branch 'aligned_be64' of https://github.com/rmfought/libnlThomas Graf2012-12-172-0/+8
|\
| * Re-adding #defines for __aligned_be64 for older kernelsRich Fought2012-12-132-0/+8
| |
* | Included defs.h so DISABLE_PTHREADS is visible.Rich Fought2012-12-131-0/+2
|/
* netfilter: update local header filesThomas Graf2012-12-115-280/+425
| | | | | | Needed to NF_CT_EXPECT_PERMANENT etc. Signed-off-by: Thomas Graf <tgraf@suug.ch>
* can: provide local copy of <linux/can/netlink.h>Thomas Graf2012-12-111-0/+122
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* link: socket-CAN helper functionsBenedikt Spranger2012-11-291-0/+27
| | | | | | | Add helper functions to make socket-CAN configuration easy. Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* link: basic socket-CAN supportBenedikt Spranger2012-11-291-0/+32
| | | | | | | | | | | | | Controller Area Network (CAN) is a networking technology which has widespread use in automation, embedded devices and automotive fields. The socket-CAN package is an implementation of CAN protocols for Linux. All socket-CAN related configurations are carried out through Netlink. Add basic socket-CAN support to libnl to be able to configure CAN devices with libnl. Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Include the newly added header files in next releaseThomas Graf2012-11-231-0/+3
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* cache: reserve room in cache_ops to avoid breaking module ABI too frequentlyThomas Graf2012-11-231-0/+9
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Bug Fix: Add new fill socket to cache managerroopa2012-11-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new socket to cache manager to request fill's on. cache manager today uses cm_sock to request dump from the kernel. It also listens to netlink async events on the same sock. The problem with this is that when libnl is waiting to process the response to get dump request sent to the kernel during fill, it may receive an async event, resulting in libnl complaining about unexpected msg This is usually reproducible when there is heavy netlink async event traffic during nl_cache_mngr_add. This patch adds a new cm_sync_sock to use for fill during cache manager add cache. The other option is to provide an api to set the cm_sync_sock. But since this is a bug fix its probably better to fix the cache manager add api like this patch does. Please suggest otherwise. Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Reviewed-by: Nolan Leake <nolan@cumulusnetworks.com> Reviewed-by: Shrijeet Mukherjee <shm@cumulusnetworks.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* cache: provide safe variant of nl_cache_mngt_require() and use itThomas Graf2012-11-162-8/+2
| | | | | | | | 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-151-6/+6
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* cache: Provide safe versions of nl_cache_ops_associate() and ↵Thomas Graf2012-11-151-0/+2
| | | | | | nl_cache_ops_lookup() Signed-off-by: Thomas Graf <tgraf@suug.ch>
* cache: Add reference counter to cache operationsThomas Graf2012-11-151-0/+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>
* cache: Add reference counter to cachesThomas Graf2012-11-152-0/+2
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Add master support to rtnl_neigh for AF_BRIDGE objectsroopa2012-11-151-0/+1
| | | | | | | | | | | | | | | | | | | | AF_BRIDGE neigh objects can be uniquely identified by the family, lladdr and bridge ifindex. This patch adds bridge ifindex to AF_BRIDGE neigh objects. Things will be ok even without this patch with just family and lladdr if we assume that we will have unique lladdr's accross bridges in a system. Kernel does not send the bridge ifindex in the AF_BRIDGE fdb/neigh message. This patch tries to get that info by a link cache lookup and adds it to the bridge neigh object Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Reviewed-by: Nolan Leake <nolan@cumulusnetworks.com> Reviewed-by: Shrijeet Mukherjee <shm@cumulusnetworks.com> Reviewed-by: Wilson Kok <wkok@cumulusnetworks.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* cache: Move NL_CACHE_AF_ITER to <netlink/cache.h>Thomas Graf2012-11-122-5/+6
| | | | | | <netlink/cache-api.h> alreay requires <netlink/cache.h> anyway. Signed-off-by: Thomas Graf <tgraf@suug.ch>
* New cache manager add cache apiroopa2012-11-121-0/+3
| | | | | | | | | | | | | | | | | | | This patch is an attempt to add a new nl_cache_mngr_add_cache api to allow adding an existing cache to cache manager. Since the new api is similar to nl_cache_mngr_add except for allocating the cache, the patch moves most of the nl_cache_mngr_add code to nl_cache_mngr_add_cache and changes nl_cache_mngr_add to call nl_cache_mngr_add_cache. One use case for this api as pointed out by thomas would be to set cache flags before associating the cache with a cache manager. nl_cache_alloc_name("route/link", &cache); nl_cache_set_flags(cache, NL_CACHE_AF_ITER); nl_cache_mngr_add_cache(mngr, cache, ...); Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Add support for per cache flagsroopa2012-11-123-0/+10
| | | | | | | | This patch adds support for per cache flags and adds a flag NL_CACHE_AF_ITER to iter over all supported families when filling the cache. Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Hash: Properly prefix hash functionsThomas Graf2012-11-101-4/+4
| | | | | | Do not pollute public namespace with unprefixed functions. Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Add hash support in cache mngrroopa2012-11-093-0/+7
| | | | | | | | | | This patch adds support to create, delete modify hash table for a cache Signed-off-by: Shrijeet Mukherjee <shm@cumulusnetworks.com> Signed-off-by: Nolan Leake <nolan@cumulusnetworks.com> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Reviewed-by: Wilson Kok <wkok@cumulusnetworks.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>