summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Extended pktloc to support nbyte locations for ipv6, etc.Thomas Graf2010-10-281-5/+19
| | | | | The alignment column/field now also takes a number, specifying the length in bytes of the field described by the location
* Packet location updatesThomas Graf2010-10-263-9/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch includes various bugfixes in the packet location parser. Namely it removes two memory leaks if parsing fails. The parser is correctly quit if an allocation error occurs and it is no longer possible to add duplicates. It removes the possibility to differ between net and host byteorder. This is better done in the actual classifiers as it makes more sense to specify this together with the value to compare against. The patch also extends the API to add new packet locations via rtnl_pktloc_add(). It introduces reference counting, therefore you now have to give back packet locations with rtnl_pktloc_put() after looking them up with rtnl_pktloc_lookup(). But you are allowed to keep using them if the packet location file has been reread. The packet location file now also understands "eth", "ip", and "tcp" for "link", "net", and "transport". A --list option has been added to nl-pktloc-lookup to list all packet location definitions A --u32=VALUE option has been added to let nl-pktloc-lookup print the definition in iproute2's u32 selector style. A manual page has been written for nl-pktloc-lookup. Finally, nl-pktloc-lookup has been made installable.
* nl-cls-* toolsThomas Graf2010-10-267-163/+368
| | | | cli based tools to add/update/list/delete classifiers
* Unified TC attributes interfaceThomas Graf2010-10-2611-106/+146
| | | | | | | | | | | | | | | | | | | | | | | | 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-list toolThomas Graf2010-10-203-1/+118
| | | | Same syntax as nl-qdisc-list
* nl-class-delete toolThomas Graf2010-10-204-1/+152
| | | | Tool based on nl-qdisc-delete to delete traffic classes.
* Make nl-qdisc-delete installableThomas Graf2010-10-203-31/+65
| | | | | Fixes nl_cli_confirm() and adds a check enforcing --yes before deleting all qdiscs on all devices.
* Remove NL_DUMP_ENV codeThomas Graf2010-10-202-3/+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.
* make nl-qdisc-list installableThomas Graf2010-10-202-21/+24
| | | | Also improves usability of nl-qdisc-list
* nl-class-add toolThomas Graf2010-10-207-2/+240
| | | | | | | | | | 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
* remove obsolete nl-qdisc-add codeThomas Graf2010-10-191-196/+0
|
* classid databaseThomas Graf2010-10-193-1/+85
| | | | | | | | | 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.
* nl-qdisc-add toolThomas Graf2010-10-194-3/+233
| | | | | | | | | | | | 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-132-2/+2
| | | | | | | | | | | 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
|
* Put preprocessor definitions in AM_CPPFLAGSMatthew L. Creech2010-10-131-1/+1
| | | | | | | | When an alternate kernel header include directory is added in CPPFLAGS, the libnl build fails. This is because the local copy of kernel headers is added in AM_CFLAGS, which gets included after CPPFLAGS in the automake-generated makefile. Switching to AM_CPPFLAGS fixes the problems.
* Packet Location InterfaceThomas Graf2010-07-022-1/+42
|
* src/nf-queue.c: cleanup and improve performance of test program for NF_QUEUEKarl Hiramoto2010-04-191-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | * Fix filename in file header * If the kernel or netlink socket becomes over loaded, the kernel starts printing error messages like: nf_queue: full at 1024 entries, dropping packets(s). Dropped: 1 nf_queue: full at 1024 entries, dropping packets(s). Dropped: 2 nf_queue: full at 1024 entries, dropping packets(s). Dropped: 3 So detect out of order packet ID's and set the NF_ACCEPT verdictÂ, so they will be removed from the kernel queue. * increase socket buffer to improve performance without these changes sending more than 100 KB/s over tcp HTTP lo(localhost) was difficult on my core2 duo machine, due to so many dropped packets. After these changes over 150 MB/s was easy. * improve help text Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
* CLI - Command Line Interface LibraryThomas Graf2009-12-1662-1454/+1212
| | | | | 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}
* libnl: fix automake breakagePatrick McHardy2009-11-101-2/+18
| | | | | | | | libnl-route must be handled before libnl-nf in lib_LTLIBRARIES since the later depends on the former. Additionally nf-monitor, nl-list-caches, nl-list-sockets and nl-util-addr have been dropped from the Makefile. Signed-off-by: Patrick McHardy <kaber@trash.net>
* - Compile with _GNU_SOURCEThomas Graf2009-09-021-1/+1
| | | | - Fixed classifier.c -> cls.c
* Merge branch 'master' of git://dev.medozas.de/libnlThomas Graf2009-09-022-66/+86
|\ | | | | | | | | | | Conflicts: lib/Makefile src/Makefile
| * build: make use of library dependenciesJan Engelhardt2009-07-051-25/+25
| |
| * Move to automake-based buildJan Engelhardt2009-06-222-62/+86
| | | | | | | | | | | | | | | | | | | | | | | | Issues solved: * PACKAGE_VERSION was abused for SOVERSION * unneeded DEP stage * did not support out-of-tree builds * no way to turn off silent mode * overriding CFLAGS at make time was not supported * no static libs were provided Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* | - Reworked the classifier interface.Thomas Graf2009-09-0210-1/+701
|/ | | | | | - Added initial ematch support - Added support for the basic classifier - Added support for the cgroup classifier
* Separate compiling from linkingPavel Roskin2009-04-161-3/+3
| | | | | This helps users understand where possible warnings come from. It also allows more find-grained control over the build flags.
* Include limits.h to fix undefined ULONG_MAX in src/utils.cPavel Roskin2009-04-161-0/+1
|
* libnl: fix socket function rename related build failurePatrick McHardy2009-01-214-4/+4
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* Remove obsoleted struct nl_handle definitionThomas Graf2008-12-106-6/+6
|
* libnl: nfqueue: add nfqueue specific socket allocation functionPatrick McHardy2008-10-231-1/+4
| | | | | | | | | | | | | | | | | commit e92539843a0c7e5116254382626cce226bf2135e Author: Patrick McHardy <kaber@trash.net> Date: Thu Oct 23 13:46:16 2008 +0200 libnl: nfqueue: add nfqueue specific socket allocation function nfqueue users usually send verdict messages from the receive callback. When waiting for ACKs, the receive callback might be called again recursively until the stack blows up. Add a nfqueue specific socket allocation function that automatically disables ACKing for the socket. Signed-off-by: Patrick McHardy <kaber@trash.net>
* Explicitely link to nl-route when linking nf apps.Thomas Graf2008-08-181-1/+1
| | | | | ld won't resolve its own deps in -L../lib/ for some reason.
* Remove XML dumpingThomas Graf2008-06-172-3/+0
| | | | Bloats the library, not frequently used
* Fix compile errors when linking against libnl-genlThomas Graf2008-06-173-1/+2
|
* Improvements to address utilitiesThomas Graf2008-06-175-54/+198
| | | | | | - Moved env var dumping to nl-addr-list.c - support for ipv6 lifetimes - correct and complete help texts
* Remove old line counting while dumpingThomas Graf2008-05-2319-20/+20
|
* New set of libnl toolsThomas Graf2008-05-2262-1788/+2143
| | | | | Converts all tools to the API changes and improves the useability by introducing regular options and long options.
* Remove src/f_addr.c, it's no longer usedThomas Graf2008-05-151-107/+0
|
* utility functions for address toolsThomas Graf2008-05-152-0/+112
|
* New set of address management toolsThomas Graf2008-05-158-289/+1070
|
* patch: fixed compilation problem for nl-route-getBen Gamsa2008-05-081-1/+1
| | | | | Fixed compilation problem for nl-route-get by adding extra parameter now needed for nltool_alloc_route_cache() function.
* Route cache supportThomas Graf2008-05-055-9/+14
| | | | | | This changesets adds the possibility to fill a nl_cache with the contents of the route cache. It also adds the possibility to limit route caches to certain address families.
* Adapt syntax of nl-route-add to nl-route-deleteThomas Graf2008-04-301-47/+73
|
* Fix segfault nexthop parsing when no option is givenThomas Graf2008-04-301-0/+4
|
* Adapt syntax of nl-route-list to nl-route-deleteThomas Graf2008-04-302-41/+63
|
* Improved nl-route-delete featuring an interactive deletion modeThomas Graf2008-04-302-44/+125
|
* Big routing code rework (API/ABI BREAK!)Thomas Graf2008-04-2912-305/+636
| | | | | | | | | | Adds all missing routing attributes and brings the routing related code to a working state. In the process the API was broken several times with the justification that nobody is using this code yet. The changes include new example code which is also a prototype for how plain CLI tools could look like to control routes.
* Fix compile warning in nl-list-cachesThomas Graf2008-04-291-1/+0
|
* Remove dead code in nl-list-socketsThomas Graf2008-04-291-9/+0
|
* Prepare nl-list-sockets for 64bit addressesThomas Graf2008-04-291-4/+4
|