]> granicus.if.org Git - libnl/log
libnl
13 years agoaddr: Add missing header to <netlink/route/addr.h>
Thomas Graf [Tue, 13 Sep 2011 21:13:51 +0000 (23:13 +0200)]
addr: Add missing header to <netlink/route/addr.h>

Fixes a gcc warning

13 years agoSwitch to libtool versioning system
Thomas Graf [Tue, 13 Sep 2011 20:58:08 +0000 (22:58 +0200)]
Switch to libtool versioning system

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)

13 years agobuild: always install files into /etc/libnl
Jan Engelhardt [Wed, 24 Aug 2011 10:09:46 +0000 (12:09 +0200)]
build: always install files into /etc/libnl

I observed that with the RedHat build target in the Open Build
Service, files were put into /etc rather than /etc/libnl.
Self-referential variables are a bad idea, and so just avoid this.

13 years agoInform users about changed include location at end of configure script
Thomas Graf [Tue, 13 Sep 2011 09:49:41 +0000 (11:49 +0200)]
Inform users about changed include location at end of configure script

13 years agoInstall headers in ${includedir}/libnl3
Thomas Graf [Tue, 13 Sep 2011 09:48:18 +0000 (11:48 +0200)]
Install headers in ${includedir}/libnl3

This allows for multiple major versions to be installed in parallel. Pkg-config
files are adapted to provide appropriate cflags to find new header locations.

13 years agolib: Use @MAJ_VERSION and @MAJ_MINOR@ for -version-info
Thomas Graf [Tue, 13 Sep 2011 09:47:39 +0000 (11:47 +0200)]
lib: Use @MAJ_VERSION and @MAJ_MINOR@ for -version-info

13 years agoasciidoc xhtml stylesheet
Thomas Graf [Tue, 13 Sep 2011 09:07:23 +0000 (11:07 +0200)]
asciidoc xhtml stylesheet

13 years agoprepare for 3.2 release
Thomas Graf [Thu, 8 Sep 2011 13:00:07 +0000 (15:00 +0200)]
prepare for 3.2 release

Fall back to using libnl-*.3.pc files. It may be common to have multiple
generations of libnl installed but unlikely within the same major release.

13 years agoremove dist lines for non existing files
Thomas Graf [Thu, 8 Sep 2011 13:33:55 +0000 (15:33 +0200)]
remove dist lines for non existing files

13 years agoRemove GPL-3.0 license file.
Thomas Graf [Thu, 8 Sep 2011 13:07:02 +0000 (15:07 +0200)]
Remove GPL-3.0 license file.

There is no code licensed GPL-3.0 so we might as well remove this file.

13 years agofix license of lib/route/pktloc.c
Thomas Graf [Thu, 8 Sep 2011 13:03:25 +0000 (15:03 +0200)]
fix license of lib/route/pktloc.c

As Jan Engelhardt pointed out, pktloc.c is currently licenses under the GPL
rather than the LGPL. This is a result of its previous existance in src/
which is GPL licensed. I missed to change its license when moving it to
lib/. Since I am the only contributor to the code, I am changing the license
hereby.

13 years agoDo not require python and swig to be present
Thomas Graf [Thu, 8 Sep 2011 12:59:16 +0000 (14:59 +0200)]
Do not require python and swig to be present

Allows building without python and swig. Readd this using --enable-python
at some point.

13 years ago64bit unaligned access
Bryan Phillippe [Wed, 31 Aug 2011 18:11:59 +0000 (11:11 -0700)]
64bit unaligned access

This patch fixes an unaligned access for IPv6.  On systems with strict alignment requirements, the unaligned access will either result in garbage data or a crash.

13 years agogenl: genl_ctrl_grp_by_name: fix retval in case group id not found
Jiri Pirko [Wed, 31 Aug 2011 09:14:43 +0000 (11:14 +0200)]
genl: genl_ctrl_grp_by_name: fix retval in case group id not found

Now the return value in case group id is not find is 0. Change it to
return -NLE_OBJ_NOTFOUND which makes more sense. This should not break
anything because genl_ctrl_grp_by_name is static and called only from
genl_ctrl_resolve_grp. genl_ctrl_resolve_grp already might return
-NLE_OBJ_NOTFOUND.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
13 years agosocket: fix two typos
Jiri Pirko [Tue, 30 Aug 2011 16:33:25 +0000 (18:33 +0200)]
socket: fix two typos

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
13 years agosocket: introduce nl_socket_modify_err_cb
Jiri Pirko [Tue, 30 Aug 2011 16:31:47 +0000 (18:31 +0200)]
socket: introduce nl_socket_modify_err_cb

This function does the same as nl_socket_modify_cb except for error
callback

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
13 years agonl-link-name2ifindex: fix usage text
Jiri Pirko [Thu, 25 Aug 2011 13:14:07 +0000 (15:14 +0200)]
nl-link-name2ifindex: fix usage text

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
13 years agoLocal port leak on nl_socket_alloc/nl_socket_set_local_port(, 0)
Andrew Rybchenko [Tue, 30 Aug 2011 05:27:37 +0000 (09:27 +0400)]
Local port leak on nl_socket_alloc/nl_socket_set_local_port(, 0)

I've found a bug in the following scenario (fragment of code):

while (1) {
    struct nl_sock *sk = nl_socket_alloc();

    if (sk == NULL) {
        fprintf(stderr, "Failed to allocate nl socket\n");
break;
    }
    nl_socket_set_local_port(sk, 0);
    nl_socket_free(sk);
}

The problem is that nl_socket_set_local_port(, 0) does not
release local port if it is allocated before.

13 years agohtb: fix misplaced memset() overwriting already set htb prio option
Thomas Graf [Fri, 12 Aug 2011 11:47:23 +0000 (13:47 +0200)]
htb: fix misplaced memset() overwriting already set htb prio option

Reported by Richard Cesar <spidla@spidlas.cz>

13 years agodoc: need to include @srcdir@/src not @top_srcdir@/src libnl3_1
Thomas Graf [Fri, 12 Aug 2011 09:06:50 +0000 (11:06 +0200)]
doc: need to include @srcdir@/src not @top_srcdir@/src

13 years agopython: Include python/ in distribution and provide a README on how to build & install
Thomas Graf [Fri, 12 Aug 2011 08:45:47 +0000 (10:45 +0200)]
python: Include python/ in distribution and provide a README on how to build & install

13 years agolink: fix unaligned access to 64bit link stats
Bryan Phillippe [Thu, 11 Aug 2011 18:43:46 +0000 (11:43 -0700)]
link: fix unaligned access to 64bit link stats

13 years agoInclude all files necessary to build documentation in distribution
Thomas Graf [Thu, 11 Aug 2011 13:43:34 +0000 (15:43 +0200)]
Include all files necessary to build documentation in distribution

13 years agomake port map thread safe
Thomas Graf [Thu, 11 Aug 2011 13:17:56 +0000 (15:17 +0200)]
make port map thread safe

This patch has been in Fedora and RHEL for a while. It adds a mutex
to protect the port map from concurrent thread accesses.

Original patch from Stefan Berger <stefanb@us.ibm.com>.
Modified to use configure.in to check for libpthread

13 years agoAvoid freeing memory if vasprintf() failed
Thomas Graf [Thu, 11 Aug 2011 13:06:29 +0000 (15:06 +0200)]
Avoid freeing memory if vasprintf() failed

Founds this bugfix in Fedora's SOURCES for libnl. Not sure who the
original author is but the bug should be fixed upstream as well.

13 years agoAllow building documentation out of the tree
Thomas Graf [Thu, 11 Aug 2011 12:57:59 +0000 (14:57 +0200)]
Allow building documentation out of the tree

Patch originally provided by Gaudenz Steinlin <gaudenz@debian.org>

13 years agoPut "break" inside the "if" block in route_compare()
Pavel Roskin [Thu, 4 Aug 2011 15:59:10 +0000 (11:59 -0400)]
Put "break" inside the "if" block in route_compare()

13 years agoMake some functions and global variables static
Pavel Roskin [Thu, 4 Aug 2011 15:59:03 +0000 (11:59 -0400)]
Make some functions and global variables static

13 years agoRemove write-only variables in lib/cache.c
Pavel Roskin [Thu, 4 Aug 2011 15:58:56 +0000 (11:58 -0400)]
Remove write-only variables in lib/cache.c

13 years ago3.1 release
Thomas Graf [Thu, 11 Aug 2011 12:30:24 +0000 (14:30 +0200)]
3.1 release

13 years agoUpdated link documentation
Thomas Graf [Thu, 28 Jul 2011 14:23:57 +0000 (16:23 +0200)]
Updated link documentation

- API documentation
- developer guide
- enabled doxygen navbar
- fixed css

13 years agoHack doxygen CSS to avoid stupid margins in modules listing
Thomas Graf [Wed, 27 Jul 2011 15:01:34 +0000 (17:01 +0200)]
Hack doxygen CSS to avoid stupid margins in modules listing

13 years agoinclude <linux/if.h> from <netlink/route/link.h> to export IFF_* flags
Thomas Graf [Mon, 25 Jul 2011 08:32:26 +0000 (10:32 +0200)]
include <linux/if.h> from <netlink/route/link.h> to export IFF_* flags

13 years agouse rtnl_link_set/get_type()
Thomas Graf [Thu, 21 Jul 2011 15:52:43 +0000 (17:52 +0200)]
use rtnl_link_set/get_type()

13 years agoremoved autogenerated swig interface files from git tree
Thomas Graf [Thu, 21 Jul 2011 15:49:21 +0000 (17:49 +0200)]
removed autogenerated swig interface files from git tree

13 years agoVLAN: rtnl_link_is_vlan() function and API documentation
Thomas Graf [Thu, 21 Jul 2011 15:47:00 +0000 (17:47 +0200)]
VLAN: rtnl_link_is_vlan() function and API documentation

13 years agoUse 'link type' instead of 'link info type'
Thomas Graf [Thu, 21 Jul 2011 14:45:01 +0000 (16:45 +0200)]
Use 'link type' instead of 'link info type'

The term 'link type' is much more easier to understand than 'link info type'

rtnl_link_set/get_info_type() left around for backwards compatibility

13 years agoignore python build directory
Thomas Graf [Thu, 21 Jul 2011 14:41:45 +0000 (16:41 +0200)]
ignore python build directory

13 years agoignore various generated files
Thomas Graf [Thu, 21 Jul 2011 14:39:29 +0000 (16:39 +0200)]
ignore various generated files

13 years agobonding link module
Thomas Graf [Thu, 21 Jul 2011 14:38:04 +0000 (16:38 +0200)]
bonding link module

13 years agomore documentation updates
Thomas Graf [Thu, 21 Jul 2011 14:24:31 +0000 (16:24 +0200)]
more documentation updates
 - improved stylesheets for both doxygen and asciidoc
 - use of xml doxygen layout
 - python script to resolve <<foo>> asciidoc references to
   <<foo, title>> based on the target caption
 - graphics for netlink and netlink error headers
 - more link documentation

13 years agoInclude IFLA_LINK in link messages
Thomas Graf [Thu, 21 Jul 2011 10:27:52 +0000 (12:27 +0200)]
Include IFLA_LINK in link messages

13 years agoDocumentation updates
Thomas Graf [Mon, 18 Jul 2011 06:50:42 +0000 (08:50 +0200)]
Documentation updates

- update to asciidoc 8.6.5
- added doc/README
- switched to toc2
- started adding link documentation

13 years agodocumentation updates
Thomas Graf [Thu, 14 Jul 2011 10:48:00 +0000 (12:48 +0200)]
documentation updates

13 years agoSupport for NLM_F_INTR
Thomas Graf [Thu, 14 Jul 2011 08:51:49 +0000 (10:51 +0200)]
Support for NLM_F_INTR

Check if a dump was interrupted and needs to be redone

13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/libs/netlink/libnl
Thomas Graf [Tue, 21 Jun 2011 09:34:28 +0000 (11:34 +0200)]
Merge branch 'master' of master.kernel.org:/pub/scm/libs/netlink/libnl

13 years agoDon't redefine offsetof when already defined by e.g. stddef.h
Christian Ruppert [Mon, 20 Jun 2011 22:05:08 +0000 (00:05 +0200)]
Don't redefine offsetof when already defined by e.g. stddef.h

13 years agosocket: Set SOCK_CLOEXEC if available
Thomas Graf [Wed, 15 Jun 2011 15:37:28 +0000 (17:37 +0200)]
socket: Set SOCK_CLOEXEC if available

Reported by Марк Коренберг <socketpair@gmail.com>

13 years agoneigh: include ndm flags while building message
Thomas Graf [Wed, 15 Jun 2011 14:23:35 +0000 (16:23 +0200)]
neigh: include ndm flags while building message

Reported by jeff courington <jeff_courington@hotmail.com>

13 years agoWork on libnl-python
Thomas Graf [Fri, 10 Jun 2011 11:55:29 +0000 (13:55 +0200)]
Work on libnl-python

Changes too numerous to describe them

13 years agoHTB: Add support for level and direct pkt stats, complete access functions
Thomas Graf [Thu, 9 Jun 2011 11:32:13 +0000 (13:32 +0200)]
HTB: Add support for level and direct pkt stats, complete access functions

- Adds support for htb class level and direct packet
  statistics
- Complete all get/set access functions
- Complete error handling
- Documentation

13 years agoUpdate local copies of include/linux
Thomas Graf [Thu, 9 Jun 2011 10:56:52 +0000 (12:56 +0200)]
Update local copies of include/linux

13 years agoProvide documentation for rtnl_tc_data() and rtnl_tc_data_check()
Thomas Graf [Thu, 9 Jun 2011 10:30:15 +0000 (12:30 +0200)]
Provide documentation for rtnl_tc_data() and rtnl_tc_data_check()

13 years agoAdd nl_rate2str()
Thomas Graf [Thu, 9 Jun 2011 10:29:21 +0000 (12:29 +0200)]
Add nl_rate2str()

13 years agoAdd rtnl_tc_data_check()
Thomas Graf [Thu, 9 Jun 2011 10:28:04 +0000 (12:28 +0200)]
Add rtnl_tc_data_check()

Behaves like rtnl_tc_data() but verifies that the traffic control
object is of the expected type.

13 years agoProvide silent variation of nl_cache_require()
Thomas Graf [Wed, 11 May 2011 07:33:29 +0000 (09:33 +0200)]
Provide silent variation of nl_cache_require()

Use in addr and tc layer to avoid warnings being printed if no
cache is available.

13 years agopython interface to netlink protocols
Thomas Graf [Tue, 10 May 2011 10:17:33 +0000 (12:17 +0200)]
python interface to netlink protocols

currently includes experimental support for links, addresses
and some traffic control

13 years agoUse name "global" instead of "universe" for largest scope
Thomas Graf [Wed, 4 May 2011 15:47:09 +0000 (17:47 +0200)]
Use name "global" instead of "universe" for largest scope

This name is more widespread and easier to understand even though
it is less correct.

13 years agoaddr: store link object and provide rtnl_addr_get()
Thomas Graf [Tue, 3 May 2011 09:48:14 +0000 (11:48 +0200)]
addr: store link object and provide rtnl_addr_get()

stores rtnl_link object in address if cache is availble. Provide access
via rtnl_addr_get_link() and rtnl_addr_set_link().

Add rtnl_addr_get() which searches a address cache for an address
matching ifindex and local address.

13 years agoAdding rule with "From" option doesn't work
Romary Sonrier [Tue, 3 May 2011 09:26:21 +0000 (11:26 +0200)]
Adding rule with "From" option doesn't work

OK i found the bug, is is the patch !!

Can someone push it into the git tree ?
Regards,

Romary Sonrier

=========================
My analysis:

I guess that the pay load is *struct fib_rule_hdr*
struct fib_rule_hdr {
__u8 family;
__u8 dst_len;
__u8 src_len;
__u8 tos;

__u8 table;
__u8 res1; /* reserved */
__u8 res2; /* reserved */
__u8 action;

__u32 flags;
};

> [PAYLOAD] 12 octets
> 02 00 00 00 0a 00 00 01 00 00 00 00 ............
so

family = 02 , fine

table = 10, fine
but
src_len =0 !!!! should be 32

13 years agoAdd missing declaration of rtnl_tc_get_link()
Thomas Graf [Thu, 21 Apr 2011 12:58:05 +0000 (14:58 +0200)]
Add missing declaration of rtnl_tc_get_link()

13 years agoProvide rtnl_tc_get_link() and fix link refcnt
Thomas Graf [Thu, 21 Apr 2011 12:48:54 +0000 (14:48 +0200)]
Provide rtnl_tc_get_link() and fix link refcnt

Adds rtnl_tc_get_link() returning the link associated with a tc
object.

Don't clone link associated with tc object when cloning the tc
object, refer to same link instead and bump refcnt.

Fix refcnt leak when assigning link in msg parser.

13 years agoFix clone() of AF specific link data
Thomas Graf [Thu, 21 Apr 2011 12:46:06 +0000 (14:46 +0200)]
Fix clone() of AF specific link data

Passed the original link to ao_clone() instead of the new one.

13 years agoSet tc->tc_link if link cache is available
Thomas Graf [Wed, 20 Apr 2011 14:30:49 +0000 (16:30 +0200)]
Set tc->tc_link if link cache is available

When parsing tc objects, lookup link in link cache if such a
cache is available.

13 years agoImprove readability of classid string representation
Thomas Graf [Wed, 20 Apr 2011 14:29:42 +0000 (16:29 +0200)]
Improve readability of classid string representation

1: is more readable than 01:

13 years agoExpose <netlink/route/link/inet.h>
Thomas Graf [Wed, 20 Apr 2011 09:53:04 +0000 (11:53 +0200)]
Expose <netlink/route/link/inet.h>

13 years agoSupport link info types with no payload
Thomas Graf [Tue, 19 Apr 2011 07:57:35 +0000 (09:57 +0200)]
Support link info types with no payload

13 years agoAdd support for ARPHRD_NONE
Thomas Graf [Tue, 19 Apr 2011 07:57:14 +0000 (09:57 +0200)]
Add support for ARPHRD_NONE

13 years agoexport rtnl_link_add() and rtnl_link_build_add_request()
Thomas Graf [Fri, 15 Apr 2011 13:31:47 +0000 (15:31 +0200)]
export rtnl_link_add() and rtnl_link_build_add_request()

13 years agodummy interface support
Thomas Graf [Fri, 15 Apr 2011 13:31:22 +0000 (15:31 +0200)]
dummy interface support

13 years agoSupport for rtnl_link_add()
Thomas Graf [Fri, 15 Apr 2011 13:30:46 +0000 (15:30 +0200)]
Support for rtnl_link_add()

API for adding virtual links

13 years agoImprove rtnl_link_change() behaviour
Thomas Graf [Wed, 13 Apr 2011 14:42:34 +0000 (16:42 +0200)]
Improve rtnl_link_change()  behaviour

- avoid unncessary name change requests
    The kernel does not check if the specified IFNAME is different
    from the current name. It assumes that if IFNAME and ifindex
    are both specified, a name change is requested. Therefore avoid
    specyfing IFNAME if ifindex is provided and original and new
    name are identical.
- move link building to own function (to allow link add later on)
- error if immutable changes have been made
- better documentation

13 years agofix line removed by mistake
Thomas Graf [Mon, 11 Apr 2011 10:40:40 +0000 (12:40 +0200)]
fix line removed by mistake

This line was removed by mistake in the last commit

13 years agoAPI to issue direct GET requests to the kernel
Thomas Graf [Mon, 11 Apr 2011 10:34:01 +0000 (12:34 +0200)]
API to issue direct GET requests to the kernel

Provide nl_pickup() to pick up an answer from a netlink request and parse
it using the supplied parser.

Add rtnl_link_get_kernel() which sends an RTM_GETLINK to the kernel to
fetch a single link directly from the kernel. This can be faster than
dumping the whole table, especially if lots of links are configured.

13 years agolink: Provide rtnl_link_delete() to delete virtual links
Thomas Graf [Sun, 10 Apr 2011 09:02:47 +0000 (11:02 +0200)]
link: Provide rtnl_link_delete() to delete virtual links

Takes a link object and extracts ifindex and name to build a deletion request
message to delete virtual network links.

13 years agolink: Make return and argument type match
Thomas Graf [Sun, 10 Apr 2011 08:24:12 +0000 (10:24 +0200)]
link: Make return and argument type match

13 years agoProvide nl_cache_set_arg{1,2}() to specify cache args
Thomas Graf [Sun, 10 Apr 2011 08:22:27 +0000 (10:22 +0200)]
Provide nl_cache_set_arg{1,2}() to specify cache args

Added based on a RFE. This is required if allocation and
(re)filling is to be splitted.

13 years agoProvide nl_object_dump_buf() to easily dump to buffers
Thomas Graf [Sun, 10 Apr 2011 08:22:01 +0000 (10:22 +0200)]
Provide nl_object_dump_buf() to easily dump to buffers

13 years agoInitialize dump buffer in case caller missed it
Thomas Graf [Sun, 10 Apr 2011 08:18:04 +0000 (10:18 +0200)]
Initialize dump buffer in case caller missed it

(Set an end to all the bug reports of applications failing
to do so.)

13 years agoProvide TC_HANDLE(maj, min) macro to generate tc handles
Thomas Graf [Fri, 1 Apr 2011 14:25:57 +0000 (16:25 +0200)]
Provide TC_HANDLE(maj, min) macro to generate tc handles

13 years agoMove to asciidoc
Thomas Graf [Thu, 31 Mar 2011 12:25:57 +0000 (14:25 +0200)]
Move to asciidoc

The core library documentation has been converted to use asciidoc. It
provides better flexibility in creating documentation such as tables
and more powerful formatting rules.

The doxygen based API reference remains and three scripts have been
added to:
 - gen-tags.sh: extract tag information from doxygen reference
 - tags2dict.sh: generate a name=link dictionary file
 - doxygen-link.py: replace all references in the asciidoc documentation
                    refering to API functions, struct, etc. with a link
    into the doxygen API reference.

'make gendoc' continue to generate all documentation.

The following tools are required to generate documentation:
 - asciidoc
 - mscgen
 - asciidoc mscgen plugin
 - pygments
 - xmlstarlet

13 years agotrafic class/classifer API improvements and documentation
Thomas Graf [Tue, 29 Mar 2011 10:41:59 +0000 (12:41 +0200)]
trafic class/classifer API improvements and documentation

- removed dead functions in header files
- deprecated rtnl_class_foreach_*() functions due to their missing
  handling possibility of OOM situations
- improved API documentation

13 years agoQdisc API improvements and documentation
Thomas Graf [Fri, 25 Mar 2011 17:13:19 +0000 (18:13 +0100)]
Qdisc API improvements and documentation

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.

13 years agoAdd nl_send_sync()
Thomas Graf [Fri, 25 Mar 2011 17:11:52 +0000 (18:11 +0100)]
Add nl_send_sync()

Function which sends message using nl_send_auto(), frees the message and
waits for ACK/error message (if auto-ack is not disabled).

13 years agocorrectly handle the object not found case
Nicolas Sitbon [Fri, 25 Mar 2011 14:07:23 +0000 (15:07 +0100)]
correctly handle the object not found case

Removing non existent route (both ipv4 and ipv6) using
rtnl_route_delete return NLE_FAILURE generic error code. After
investigation, it seems the linux kernel return -ESRCH in that case
(see http://lxr.linux.no/linux+v2.6.38/net/ipv6/route.c#L1367). Same
behaviour apply for removing non existent address. The function
nl_syserr2nlerr (lib/error.c) which is responsible for translating
from kernel error to libnl error doesn't handle ESRCH.

13 years agoDeprecate rtnl_qdisc_foreach_child() and rtnl_qdisc_foreach_cls()
Thomas Graf [Thu, 24 Mar 2011 21:50:11 +0000 (22:50 +0100)]
Deprecate rtnl_qdisc_foreach_child() and rtnl_qdisc_foreach_cls()

Their usage is not completely safe, it is not possible to handle
the out of memory situation of the allocate filter. It is very
unlikely for this to cause any problem though.

The functions are still accessible but gcc will warn about their
deprecation.

13 years agoAllow NLSYSCONFDIR environment variable to overwrite built-in sysconfdir
Thomas Graf [Thu, 24 Mar 2011 20:14:52 +0000 (21:14 +0100)]
Allow NLSYSCONFDIR environment variable to overwrite built-in sysconfdir

13 years agoCleanup <netlink/route/qdisc.h>
Thomas Graf [Thu, 24 Mar 2011 19:57:43 +0000 (20:57 +0100)]
Cleanup <netlink/route/qdisc.h>
- remove dead prototypes
- reformat

13 years agoCheck if all mandatory attributes are present in rtnl_tc_msg_build()
Thomas Graf [Thu, 24 Mar 2011 16:00:38 +0000 (17:00 +0100)]
Check if all mandatory attributes are present in rtnl_tc_msg_build()

TCA_ATTR_IFINDEX | TCA_ATTR_PARENT | TCA_ATTR_KIND

13 years agoAdd NLE_NODEV error
Thomas Graf [Thu, 24 Mar 2011 15:56:10 +0000 (16:56 +0100)]
Add NLE_NODEV error

13 years agoSet default MTU to 1500
Thomas Graf [Thu, 24 Mar 2011 11:59:57 +0000 (12:59 +0100)]
Set default MTU to 1500

13 years agoFix "make distcheck".
Thierry Reding [Wed, 23 Mar 2011 14:57:52 +0000 (15:57 +0100)]
Fix "make distcheck".

This commit adds some missing files (some header files, the files below
/etc and the bison/flex files) to the distribution tarball to ensure
that libnl can be built from the tarballs created using "make dist".

It also adds some incantations to properly generate the flex and bison
output since the generated output is no longer shipped in the tarball.

13 years agoFix out-of-tree build.
Thierry Reding [Fri, 14 Jan 2011 10:38:05 +0000 (11:38 +0100)]
Fix out-of-tree build.

This patch fixes out-of-tree build, that is, when building with
$builddir != $srcdir. In such a case, some generated header files are
not found because they live in a different tree and can be fixed by
adding the directories to the compiler's include search path.

13 years agoOmit empty nested attributes
Thomas Graf [Wed, 23 Mar 2011 12:39:18 +0000 (13:39 +0100)]
Omit empty nested attributes

Check for empty nested attributes in nla_nest_end() and omit the
attribute alltogether if is is the case.

13 years agoadd missing nl_cache_search in cache.h
Daniel Walter [Tue, 22 Mar 2011 09:53:51 +0000 (10:53 +0100)]
add missing nl_cache_search in cache.h

fix missing declaration of nl_cache_search

13 years agoadd missing checks for ROUTE_ATTR_MULTIPATH
Daniel Walter [Tue, 22 Mar 2011 09:45:41 +0000 (10:45 +0100)]
add missing checks for ROUTE_ATTR_MULTIPATH

attached patch adds missing checks for ROUTE_ATTR_MULTIPATH
when dealing with multipath routing.

Affected functions

rtnl_route_remove_nexthop
rtnl_route_get_nexthops
rtnl_route_get_nnexthops

13 years agoDocumentation updates
Thomas Graf [Mon, 21 Mar 2011 23:40:26 +0000 (00:40 +0100)]
Documentation updates

Mostly killing doxygen warnings, some doc updates to caching

13 years agolibnl-3.0 libnl3_0
Thomas Graf [Mon, 21 Mar 2011 16:03:01 +0000 (17:03 +0100)]
libnl-3.0

13 years agofix module parent references
Thomas Graf [Mon, 21 Mar 2011 15:54:37 +0000 (16:54 +0100)]
fix module parent references

13 years agorename sch -> qdisc
Thomas Graf [Mon, 21 Mar 2011 15:47:42 +0000 (16:47 +0100)]
rename sch -> qdisc