summaryrefslogtreecommitdiffstats
path: root/src/lib
Commit message (Collapse)AuthorAgeFilesLines
* build: move -rdynamic from CPPFLAGS to LDFLAGSTobias Klauser2016-03-311-2/+2
| | | | | | | | | | The -rdynamic flag is a linker flag, not a compiler/preprocessor flag, so move it to LDFLAGS. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Thomas Haller <thaller@redhat.com> http://lists.infradead.org/pipermail/libnl/2016-March/002100.html
* link/neigh: add flags option to link and neighbor cachesDavid Ahern2015-11-192-2/+32
| | | | | | | | | | | | | Both link and neighbor cache support specify multiple groups (nl_af_group), but the alloc_cache functions for both do not set the NL_CACHE_AF_ITER flag before populating the cache so only the first group is used by default. This patch adds an API to pass in flags to make that happen and updates the nl-neigh-list command to make use of it. http://lists.infradead.org/pipermail/libnl/2015-October/001996.html Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
* build: fix path to cli linker version script for out-of-tree buildjfarrell2015-06-191-2/+2
| | | | https://github.com/thom311/libnl/pull/78
* build: add linker scripts for libnl-cli-3.so libraryThomas Haller2015-02-021-0/+6
| | | | | | | libnl-cli-3.so was unversioned previously. This is an ABI change (but backward compatible). Signed-off-by: Thomas Haller <thaller@redhat.com>
* build: move copy of linux headers to private directoryThomas Haller2014-09-241-0/+1
| | | | | | | | | | | | | | | | | | | libnl3 contains a private copy of some kernel header files. Normally, users are expected to install libnl and specify -I$PREFIX/include/libnl3 as include path. As the private kernel header files are not installed, this works fine. However, it can be convenient to build against the libnl source directory, without installing libnl. In this case, the private kernel header files shaddow the system provided ones. This is undesired. Move these files to a different directory to avoid this clash. http://lists.infradead.org/pipermail/libnl/2014-September/001645.html Signed-off-by: Thomas Haller <thaller@redhat.com> Acked-by: Thomas Graf <tgraf@suug.ch>
* build/trivial: prettify makefiles by wrapping long linesThomas Haller2014-09-241-1/+8
| | | | | Signed-off-by: Thomas Haller <thaller@redhat.com> Acked-by: Thomas Graf <tgraf@suug.ch>
* cli: Fix typo in error messageTobias Klauser2014-06-171-1/+1
| | | | | | | s/neighbout/neighbour/ Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* netfilter/ct: expand CT parameters that can be used in add/delete operationsRich Fought2014-04-141-0/+6
| | | | | | | | | | | | This expands functionality for manipulating conntracks over netlink by adding other attributes to nfnl_ct_build_message(). Added a command link program to add conntracks. https://github.com/thom311/libnl/pull/55 [thaller@redhat.com: cleaned up whitespace from original patch] Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* build: separate compiler and linker flagsJan Engelhardt2013-11-271-4/+6
| | | | | | | | | -Wall is a compiler flag, and thus should be in CFLAGS, not CPPFLAGS. Similarly, -l belongs into LDADD/LIBADD because of ordering constraints. Signed-off-by: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Use thread-safe strerror_r() instead of strerror()Thomas Graf2013-02-281-1/+2
| | | | | | | We have only ever fed well known error codes into strerror() so it should never have been a problem though. Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Move private header files to <netlink-private/*>Thomas Graf2013-01-241-1/+1
| | | | | | | This clarifies the seperation between public and private header files. Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Source cleanup for upstreamRich Fought2012-10-191-29/+29
|
* Updated nfnetlink includes; removed ifdefs; added delete exp programRich Fought2012-10-161-3/+58
|
* BugfixesRich Fought2012-10-101-1/+0
|
* bugfixesRich Fought2012-10-091-0/+6
|
* Compile CLIRich Fought2012-10-092-23/+1
|
* Starting CLI workRich Fought2012-10-091-0/+127
|
* nl_cli_route_parse_table fixed typo in codeКоренберг Марк (дома)2012-08-281-1/+1
| | | | Bug introduced in 2bdcde7e8e8bb78b165f093f1a708134f417e557
* Fix types-related warnings based on clang diagnosticsКоренберг Марк2012-06-131-3/+11
| | | | | | | | | | | | | | | | | 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.
* Switch to libtool versioning systemThomas Graf2011-09-131-7/+10
| | | | | | | | | | | | | | | | | | It has been a request that multiple libnl versions should be installabe in parallel. In order to achieve this, the basename of the library was changed to libnl-3 which reflects the 3rd generation of libnl APIs. It also means that release based library versioning is left behind and libtool versioning is used instead. Projects using pkgconfig will automatically link against the new library basename and will not notice a difference. The SO versioning is based on the glib model: current := 100 * minor + micro - revision revision := revision age := age (number of backwards compatible versions)
* Make some functions and global variables staticPavel Roskin2011-08-111-1/+1
|
* 3.1 releaseThomas Graf2011-08-111-2/+0
|
* fix module parent referencesThomas Graf2011-03-211-1/+1
|
* Unified TC APIThomas Graf2011-03-214-166/+82
| | | | | | | | 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.
* Extend rtnl_link_alloc_cache() to support address familiesThomas Graf2010-11-111-1/+20
| | | | | | | 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
* link: Support IFLA_IFALIAS attributeThomas Graf2010-11-111-1/+12
| | | | | | | | - 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
* classid auto generation if provided tc name does not existThomas Graf2010-11-011-5/+12
| | | | | | | | | | | | | | | | 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
* Tons of ematch workThomas Graf2010-10-281-0/+17
| | | | | | | | | | - Fixes a bunch of bugs related to ematches - Adds support for the nbyte ematch - Adds a bison/flex parser for ematch expressions, expressions may look like this: ip.length > 256 && pattern(ip6.src = 3ffe::/16) documenation on syntax follows - adds ematch support to the basic classifier (--ematch EXPR)
* nl-cls-* toolsThomas Graf2010-10-262-1/+117
| | | | cli based tools to add/update/list/delete classifiers
* Unified TC attributes interfaceThomas Graf2010-10-264-69/+84
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* nl-class-delete toolThomas Graf2010-10-201-0/+14
| | | | Tool based on nl-qdisc-delete to delete traffic classes.
* Make nl-qdisc-delete installableThomas Graf2010-10-201-10/+24
| | | | | Fixes nl_cli_confirm() and adds a check enforcing --yes before deleting all qdiscs on all devices.
* Remove NL_DUMP_ENV codeThomas Graf2010-10-201-2/+0
| | | | | | | Dumping objects as environment variables has never been implemented completely and only increases the size of the library for no real purpose. Integration into scripts is better achieved by implementing a python module anyway.
* nl-class-add toolThomas Graf2010-10-203-1/+105
| | | | | | | | | | Adds a cli based tool to add/update traffic classes. This tool requires each class to be supported via the respetive qdisc module in pkglibdir/cli/qdisc/$name.so. Syntax: nl-class-add --dev eth2 --parent 1: --id 1:1 htb --rate 100mbit nl-class-add --update --dev eth2 --id 1:1 htb --rate 200mbit
* nl-qdisc-add toolThomas Graf2010-10-192-3/+92
| | | | | | | | | | | | Adds a cli based tool to add/update/replace qdiscs. This tool requires each qdisc to be supported via a dynamic loadable module in pkglibdir/cli/qdisc/$name.so. So far HTB and blackhole have been implemented. Syntax: nl-qdisc-add --dev eth2 --parent root --id 1: htb --r2q=5 nl-qdisc-add --update-only --dev eth2 --id 1: htb --r2q=10
* - Prepare for 2.1.x treeThomas Graf2010-10-141-3/+1
| | | | - Bump interface number, we will break API in the development tree
* automake: add ${top_builddir}/include to AM_CFLAGSAndreas Bießmann2010-10-131-1/+1
| | | | | | | | | | | This patch enables out-of-source builds like this $ cd builddir && src_dir/configure && make Before this patch there was an error about missing netlink/version.h which is built by automake in top_builddir rather than top_srcdir which is already in include search path. Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
* Use CPPFLAGSThomas Graf2010-10-131-1/+1
|
* CLI - Command Line Interface LibraryThomas Graf2009-12-169-0/+1043
Moved common code in src/ used by CLI tools to src/lib/ for possible use by other CLI tools. Just link to libnl-cli.{so|la}