]> granicus.if.org Git - libnl/log
libnl
16 years agoRemove src/f_addr.c, it's no longer used
Thomas Graf [Thu, 15 May 2008 22:41:42 +0000 (00:41 +0200)]
Remove src/f_addr.c, it's no longer used

16 years agoutility functions for address tools
Thomas Graf [Thu, 15 May 2008 18:29:08 +0000 (20:29 +0200)]
utility functions for address tools

16 years agoNew set of address management tools
Thomas Graf [Thu, 15 May 2008 18:27:50 +0000 (20:27 +0200)]
New set of address management tools

16 years agoFix library install target
Thomas Graf [Thu, 15 May 2008 18:26:37 +0000 (20:26 +0200)]
Fix library install target

16 years agoRemove references to unused attribute anycast
Thomas Graf [Thu, 15 May 2008 18:25:15 +0000 (20:25 +0200)]
Remove references to unused attribute anycast

16 years agoMove on to version 2.0 to account for the serious ABI breakage
Thomas Graf [Thu, 15 May 2008 17:29:17 +0000 (19:29 +0200)]
Move on to version 2.0 to account for the serious ABI breakage

16 years agoBuild separate libraries for each netilnk family
Thomas Graf [Thu, 15 May 2008 16:01:50 +0000 (18:01 +0200)]
Build separate libraries for each netilnk family

This reduces the footprint on systems which only require a small
subset of the library.

16 years agoAllow parser callbacks to return NL_OK, NL_SKIP, NL_EXIT
Thomas Graf [Thu, 15 May 2008 12:01:57 +0000 (14:01 +0200)]
Allow parser callbacks to return NL_OK, NL_SKIP, NL_EXIT

Obsoletes internal P_ACCEPT/P_IGNORE

16 years agoUninline various functions to save 7K code
Thomas Graf [Thu, 15 May 2008 11:56:13 +0000 (13:56 +0200)]
Uninline various functions to save 7K code

16 years agoFix memory leaks when sending of message failed
Thomas Graf [Thu, 15 May 2008 11:45:41 +0000 (13:45 +0200)]
Fix memory leaks when sending of message failed

Various callers of nl_send_auto_complete() failed to
free the allocated message when an error was reported.

16 years agoRename struct nl_handle to struct nl_sock
Thomas Graf [Thu, 15 May 2008 11:26:32 +0000 (13:26 +0200)]
Rename struct nl_handle to struct nl_sock

The idea of a common handle is long revised and only misleading,
nl_handle really represents a socket with some additional
action handlers assigned to it.

Alias for nl_handle is kept for backwards compatibility.

16 years agoCheck length of provided address label
Thomas Graf [Wed, 14 May 2008 21:08:06 +0000 (23:08 +0200)]
Check length of provided address label

16 years agoReplace RTNL_LINK_NOT_FOUND with just 0
Thomas Graf [Wed, 14 May 2008 16:34:39 +0000 (18:34 +0200)]
Replace RTNL_LINK_NOT_FOUND with just 0

The interface index 0 is reserved and can be safely used to
signal that the device does not exist.

16 years agoRemove obsolete nla_get_addr() and nla_get_data()
Thomas Graf [Wed, 14 May 2008 16:26:47 +0000 (18:26 +0200)]
Remove obsolete nla_get_addr() and nla_get_data()

Replaces obsolete calls to nla_get_addr() and nla_get_data()
with nl_addr_alloc_attr() respectively nl_data_alloc_attr().

Also fixes missing error handling while parsing routing multipath
configuration.

16 years agoBreak API some more
Thomas Graf [Wed, 14 May 2008 15:56:22 +0000 (17:56 +0200)]
Break API some more

Since we've broken the API anyway, remove some aliases which only
exist for backwards compatibility.

16 years agoThread-safe error handling
Thomas Graf [Wed, 14 May 2008 15:49:44 +0000 (17:49 +0200)]
Thread-safe error handling

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!

16 years agopatch: fixed compilation problem for nl-route-get
Ben Gamsa [Thu, 8 May 2008 15:43:08 +0000 (11:43 -0400)]
patch: fixed compilation problem for nl-route-get

Fixed compilation problem for nl-route-get by adding extra parameter now
needed for nltool_alloc_route_cache() function.

16 years agopatch: fixed up support for tables in rules
Ben Gamsa [Thu, 8 May 2008 15:42:51 +0000 (11:42 -0400)]
patch: fixed up support for tables in rules

16 years agoAdded two new functions to facilitate processing the nexthop entries for routes.
Ben Gamsa [Thu, 8 May 2008 15:42:09 +0000 (11:42 -0400)]
Added two new functions to facilitate processing the nexthop entries for routes.

Added rtnl_route_foreach_nexthop() to walk the list of nexthops invoking a
caller-provided callback for each nexthop entry, and added rtnl_route_nexthop_n()
to retrieve the Nth nexthop entry in the list.

16 years agoSpeed up metrics comparison
Thomas Graf [Thu, 8 May 2008 10:47:26 +0000 (12:47 +0200)]
Speed up metrics comparison

Using rtnl_route_get_metric() for route comparison became a bottleneck
because each metric which was not available resulted in the generation
of an error message. This changeset avoids this by accessing rt_metrics
and rt_metrics_mask directly while comparing route objects.

16 years agoImprove performance by using malloc() over calloc() in critical places
Thomas Graf [Wed, 7 May 2008 11:18:30 +0000 (13:18 +0200)]
Improve performance by using malloc() over calloc() in critical places

As pointed out by Regis Hanna, a considerable performance gain can be
achieved by using malloc() over calloc() when allocating netlink message
buffers. This is likely due to the fact that we use a complete page for
each message.

16 years agoignore more temporary files
Thomas Graf [Mon, 5 May 2008 15:13:02 +0000 (17:13 +0200)]
ignore more temporary files

16 years agoFix dumping of iif route attribute
Thomas Graf [Mon, 5 May 2008 15:09:56 +0000 (17:09 +0200)]
Fix dumping of iif route attribute

16 years agoRoute cache support
Thomas Graf [Mon, 5 May 2008 15:09:25 +0000 (17:09 +0200)]
Route cache support

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.

16 years agoFixed netem_build_msg() delay distribution table existence test.
Tad Kollar [Wed, 30 Apr 2008 19:19:09 +0000 (15:19 -0400)]
Fixed netem_build_msg() delay distribution table existence test.

16 years agoNew netem funtionality and TBF fix
Tad Kollar [Wed, 30 Apr 2008 15:40:44 +0000 (11:40 -0400)]
New netem funtionality and TBF fix

New netem-related functionality:
Added ability to save new settings to the kernel. In netem.c, the
netem_get_opts() stub has been replaced with netem_build_msg() which
manipulates the nl_msg data directly and returns an error code instead
of a new nl_msg. Modifications to qdisc_build() in qdisc.c and struct
rtnl_qdisc_ops were necessary for this.
Added support for getting/setting corruption probability/correlation.
Added support for setting a delay distribution.

Fixed tbf_msg_parser() to call tbf_alloc() instead of tbf_qdisc() to
prevent a seg fault.

16 years agoRemove leftover definition of verbose errors
Thomas Graf [Wed, 30 Apr 2008 16:53:01 +0000 (18:53 +0200)]
Remove leftover definition of verbose errors

16 years agoversion.h.in should be in tree not the generated version
Thomas Graf [Wed, 30 Apr 2008 16:52:28 +0000 (18:52 +0200)]
version.h.in should be in tree not the generated version

16 years agoAdapt syntax of nl-route-add to nl-route-delete
Thomas Graf [Wed, 30 Apr 2008 16:51:24 +0000 (18:51 +0200)]
Adapt syntax of nl-route-add to nl-route-delete

16 years agoFix segfault nexthop parsing when no option is given
Thomas Graf [Wed, 30 Apr 2008 16:50:52 +0000 (18:50 +0200)]
Fix segfault nexthop parsing when no option is given

16 years agoAdapt syntax of nl-route-list to nl-route-delete
Thomas Graf [Wed, 30 Apr 2008 16:49:56 +0000 (18:49 +0200)]
Adapt syntax of nl-route-list to nl-route-delete

16 years agoImproved nl-route-delete featuring an interactive deletion mode
Thomas Graf [Wed, 30 Apr 2008 16:48:49 +0000 (18:48 +0200)]
Improved nl-route-delete featuring an interactive deletion mode

16 years agoProvide libnl version in <netlink/version.h>
Thomas Graf [Wed, 30 Apr 2008 13:43:42 +0000 (15:43 +0200)]
Provide libnl version in <netlink/version.h>

16 years agolibnl: recvmsgs doesn't necessarily free the message data
Inaky Perez-Gonzalez [Mon, 28 Apr 2008 22:35:26 +0000 (15:35 -0700)]
libnl: recvmsgs doesn't necessarily free the message data

I stepped over libnl always freeing the messages and it
kind of made it awkward to reuse the message data without
reallocating.

The basic idea is: if a callback return value has a bit set,
don't free that message. The calling application owns it.
By default, things stay as before (messages are freed).

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
16 years agoBig routing code rework (API/ABI BREAK!)
Thomas Graf [Tue, 29 Apr 2008 21:31:30 +0000 (23:31 +0200)]
Big routing code rework (API/ABI BREAK!)

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.

16 years agoFix compile warning in nl-list-caches
Thomas Graf [Tue, 29 Apr 2008 21:11:09 +0000 (23:11 +0200)]
Fix compile warning in nl-list-caches

16 years agoExport nl_dump_line() and automatically count lines while dumping
Thomas Graf [Tue, 29 Apr 2008 21:08:12 +0000 (23:08 +0200)]
Export nl_dump_line() and automatically count lines while dumping

16 years agoMove to version 1.2 and remove some dead code in configure.in
Thomas Graf [Tue, 29 Apr 2008 21:02:42 +0000 (23:02 +0200)]
Move to version 1.2 and remove some dead code in configure.in

16 years agoDefine datarootdir to silent autoconf
Thomas Graf [Tue, 29 Apr 2008 21:01:39 +0000 (23:01 +0200)]
Define datarootdir to silent autoconf

16 years agoDon't wipe cscope database on make clean
Thomas Graf [Tue, 29 Apr 2008 20:59:30 +0000 (22:59 +0200)]
Don't wipe cscope database on make clean

16 years agoIgnore NULL pointers passed to nl_cache_free()
Thomas Graf [Tue, 29 Apr 2008 20:58:07 +0000 (22:58 +0200)]
Ignore NULL pointers passed to nl_cache_free()

16 years agoRemove dead code in nl-list-sockets
Thomas Graf [Tue, 29 Apr 2008 08:50:23 +0000 (10:50 +0200)]
Remove dead code in nl-list-sockets

16 years agoPrepare nl-list-sockets for 64bit addresses
Thomas Graf [Tue, 29 Apr 2008 08:48:34 +0000 (10:48 +0200)]
Prepare nl-list-sockets for 64bit addresses

16 years agoFix 64bit alignment issue on x86_64.
Thomas Graf [Mon, 31 Mar 2008 20:43:04 +0000 (22:43 +0200)]
Fix 64bit alignment issue on x86_64.

16 years ago[LIBNL]: Install netlink/route/link headers
Patrick McHardy [Sat, 29 Mar 2008 12:20:25 +0000 (13:20 +0100)]
[LIBNL]: Install netlink/route/link headers

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agolibnl: fix policy check for NFQA_HWADDR
Thomas Graf [Mon, 10 Mar 2008 13:59:32 +0000 (14:59 +0100)]
libnl: fix policy check for NFQA_HWADDR

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
16 years agoFix from Benoit Boissinot <benoit.boissinot@ens-lyon.org> required to
Thomas Graf [Mon, 10 Mar 2008 13:57:01 +0000 (14:57 +0100)]
Fix from Benoit Boissinot <benoit.boissinot@ens-lyon.org> required to
install libnl in non-standard locations.

16 years agoOptimize nl_cache_ops_associate by checking protocol early
Thomas Graf [Wed, 5 Mar 2008 13:11:05 +0000 (14:11 +0100)]
Optimize nl_cache_ops_associate by checking protocol early

16 years agoInitialize message type list to avoid overrun
Thomas Graf [Wed, 5 Mar 2008 13:10:09 +0000 (14:10 +0100)]
Initialize message type list to avoid overrun

16 years ago[PATCH] Remove usage of C++ keyword 'class' on htb.h header.
Rui Tiago Cação Matos [Tue, 4 Mar 2008 18:31:16 +0000 (18:31 +0000)]
[PATCH] Remove usage of C++ keyword 'class' on htb.h header.

Signed-off-by: Rui Tiago Cação Matos <rmatos@av.it.pt>
16 years agoUpdate local copy of linux/rtnetlink.h
Thomas Graf [Wed, 5 Mar 2008 10:31:41 +0000 (11:31 +0100)]
Update local copy of linux/rtnetlink.h

16 years agoBe liberal when receiving an empty nested attribute
Thomas Graf [Fri, 22 Feb 2008 14:20:58 +0000 (15:20 +0100)]
Be liberal when receiving an empty nested attribute

No longer enforce at least one attribute in a container of nested
attributes. The application may do so itself by setting minlen
to NLA_HDRLEN.

16 years agoFix nfnl_queue_msg_get_packetid() return type
Patrick McHardy [Thu, 24 Jan 2008 12:28:08 +0000 (13:28 +0100)]
Fix nfnl_queue_msg_get_packetid() return type

[LIBNL]: Fix nfnl_queue_msg_get_packetid() return type

The packet-ID is a 32 bit value, but nfnl_queue_msg_get_packetid() returns
an uint16_t. Makes queueing fail after 2^16 packets.

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years ago[LIBNL]: Install netfilter headers
Patrick McHardy [Fri, 18 Jan 2008 16:56:00 +0000 (17:56 +0100)]
[LIBNL]: Install netfilter headers

libnl currently forgets to install the netfilter headers.
Fix that.

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years ago[LIBNL]: Support conntrack add/delete/query requests
Patrick McHardy [Fri, 18 Jan 2008 16:55:58 +0000 (17:55 +0100)]
[LIBNL]: Support conntrack add/delete/query requests

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years ago[LIBNL]: Split up nfnetlink_log into log and msg objects
Patrick McHardy [Fri, 18 Jan 2008 16:55:57 +0000 (17:55 +0100)]
[LIBNL]: Split up nfnetlink_log into log and msg objects

Split the nfnetlink_log code into two seperate objects, "netfilter/log"
to represent logging instances and "netfilter/log_msg" to represent
log messages. Also perform some function name unification for consistency
with other libnl object types, mainly renaming nfnl_log_build_*_msg
to nfnl_log_build_*_request.

This changes the API in an incompatible way, but since this feature is
new and the libnl netfilter headers haven't been installed so far,
there shouldn't be any users affected by this.

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years ago[LIBNL]: nfnetlink_log: support NUFLA_GID attribute
Patrick McHardy [Fri, 18 Jan 2008 16:55:55 +0000 (17:55 +0100)]
[LIBNL]: nfnetlink_log: support NUFLA_GID attribute

The NUFLA_GID attribute (currently only in net-2.6.25) contains the
gid of the sending process for locally generated packets.

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years ago[LIBNL]: nfnetlink_log: only set hwproto if not zero
Patrick McHardy [Fri, 18 Jan 2008 16:55:54 +0000 (17:55 +0100)]
[LIBNL]: nfnetlink_log: only set hwproto if not zero

The hwproto doesn't have its own attribute and is also present when
not set. Don't set the attribute if its value is zero.

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years ago[LIBNL]: Add nfnetlink_queue support
Patrick McHardy [Fri, 18 Jan 2008 16:55:52 +0000 (17:55 +0100)]
[LIBNL]: Add nfnetlink_queue support

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years ago[LIBNL]: Generic netfilter stuff
Patrick McHardy [Fri, 18 Jan 2008 16:55:51 +0000 (17:55 +0100)]
[LIBNL]: Generic netfilter stuff

Add some generic helper functions for netfilter.

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years ago[LIBNL]: Fix minor memleaks on exit
Patrick McHardy [Fri, 18 Jan 2008 16:55:49 +0000 (17:55 +0100)]
[LIBNL]: Fix minor memleaks on exit

Make valgrind happy ...

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years ago[LIBNL]: Add if_vlan.h
Patrick McHardy [Fri, 18 Jan 2008 16:55:48 +0000 (17:55 +0100)]
[LIBNL]: Add if_vlan.h

vlan support needs VLAN_FLAG_REORDER_HDR, which is not available in
older if_vlan.h versions. Add the current version from the kernel.

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agoImprove readability of link statistics output
Thomas Graf [Thu, 7 Feb 2008 11:42:07 +0000 (12:42 +0100)]
Improve readability of link statistics output

16 years agoFree associated caches when freeing cache manager
Thomas Graf [Tue, 5 Feb 2008 11:35:41 +0000 (12:35 +0100)]
Free associated caches when freeing cache manager

Caches allocated by the cache manager must be freed again when the cache
manager itself is freed. However, the netlink socket is allocated
indepdently so it should not be freed.

16 years agoDetailed attribute documentation
Thomas Graf [Wed, 30 Jan 2008 12:16:48 +0000 (13:16 +0100)]
Detailed attribute documentation

This patch extends and reorganizes the existing attribute documentation
and includes various verbose examples.

16 years agoAbstract address allocation based on netlink attribute
Thomas Graf [Wed, 30 Jan 2008 12:14:58 +0000 (13:14 +0100)]
Abstract address allocation based on netlink attribute

16 years agoAbstract data allocation based on netlink attribute
Thomas Graf [Wed, 30 Jan 2008 12:14:38 +0000 (13:14 +0100)]
Abstract data allocation based on netlink attribute

16 years ago1.1 release
Thomas Graf [Mon, 14 Jan 2008 15:48:29 +0000 (16:48 +0100)]
1.1 release

16 years agoImprove message/attribute construction documentation and add nlmsg_expand()
Thomas Graf [Mon, 14 Jan 2008 15:46:17 +0000 (16:46 +0100)]
Improve message/attribute construction documentation and add nlmsg_expand()

16 years agoFix documentation of cache manager.
Thomas Graf [Mon, 14 Jan 2008 15:38:37 +0000 (16:38 +0100)]
Fix documentation of cache manager.

16 years agoFix stale data pointers when constructing messages
Thomas Graf [Mon, 14 Jan 2008 15:17:56 +0000 (16:17 +0100)]
Fix stale data pointers when constructing messages

Patrick McHardy reported a problem where pointers to the
payload of a netlink message as returned by f.e. the
nesting helpers become stale when the payload data
chunk is reallocated.

In order to avoid further problems, the payload chunk is
no longer extended on the fly. Instead the allocation is
made during netlink message object allocation time with
a default size of a page which should be fine for the
majority of all users. Additionally the functions
nlmsg_alloc_size() and nlmsg_set_default_size() have been
added to allocate messages of a particular length and to
modify the default message size.

16 years agoAdd missing @{ for doxygen to build genl documentation
Thomas Graf [Thu, 10 Jan 2008 16:03:34 +0000 (17:03 +0100)]
Add missing @{ for doxygen to build genl documentation

16 years ago[PATCH] Remove autogenerated files from git and add them to .gitignore.
Michael Biebl [Thu, 10 Jan 2008 13:29:00 +0000 (14:29 +0100)]
[PATCH] Remove autogenerated files from git and add them to .gitignore.

16 years ago[PATCH] Process Doxyfile.in to set correct PACKAGE_VERSION number
Michael Biebl [Thu, 10 Jan 2008 13:25:46 +0000 (14:25 +0100)]
[PATCH] Process Doxyfile.in to set correct PACKAGE_VERSION number

16 years agorelease 1.0
Thomas Graf [Thu, 10 Jan 2008 11:46:37 +0000 (12:46 +0100)]
release 1.0

16 years agoRemove lib/defs.h from repository
Thomas Graf [Thu, 10 Jan 2008 11:45:02 +0000 (12:45 +0100)]
Remove lib/defs.h from repository

16 years ago[PATCH] libnl cache management leak
Patrick McHardy [Wed, 9 Jan 2008 18:41:58 +0000 (19:41 +0100)]
[PATCH] libnl cache management leak

16 years agoAdded additional parsing and validation functions for generic netlink
Thomas Graf [Thu, 10 Jan 2008 11:35:38 +0000 (12:35 +0100)]
Added additional parsing and validation functions for generic netlink

Also adds better example documentation for generic netlink

16 years agoTell git to ignore temporary files and push to pre9
Thomas Graf [Wed, 9 Jan 2008 11:28:17 +0000 (12:28 +0100)]
Tell git to ignore temporary files and push to pre9

16 years agoMake vlan_put_attrs() available
Thomas Graf [Tue, 8 Jan 2008 14:18:23 +0000 (15:18 +0100)]
Make vlan_put_attrs() available

16 years agoLink info interface and vlan support
Thomas Graf [Tue, 8 Jan 2008 14:00:46 +0000 (15:00 +0100)]
Link info interface and vlan support

Adds an external interface to implement link info types and
implements the type vlan.

16 years agoAdd support for the IFF_ECHO flag
Thomas Graf [Wed, 19 Dec 2007 21:06:47 +0000 (22:06 +0100)]
Add support for the IFF_ECHO flag

16 years agoSupport link operstate and linkmode
Thomas Graf [Wed, 19 Dec 2007 21:03:44 +0000 (22:03 +0100)]
Support link operstate and linkmode

16 years agoRepresent default route with destination address length zero
Thomas Graf [Wed, 19 Dec 2007 18:41:01 +0000 (19:41 +0100)]
Represent default route with destination address length zero

So far the destination address for default routes was NULL
which complicated the handling of routes in general. By
assigning a address of length zero they can be compared
to each other.

This allows the cache manager to properly handle default
routes.

16 years agoSupport defining the default callback handler with an environment variable
Thomas Graf [Tue, 18 Dec 2007 12:06:48 +0000 (13:06 +0100)]
Support defining the default callback handler with an environment variable

16 years agoRead debugging environment variable when initializing the library
Thomas Graf [Tue, 18 Dec 2007 11:42:06 +0000 (12:42 +0100)]
Read debugging environment variable when initializing the library

16 years agoInclude linux/ip_mg_alg.h internally for compatibility only
Thomas Graf [Tue, 18 Dec 2007 11:30:09 +0000 (12:30 +0100)]
Include linux/ip_mg_alg.h internally for compatibility only

16 years agoFix nl_msg_parse() to not give back a reference it does not own
Thomas Graf [Mon, 17 Dec 2007 22:07:22 +0000 (23:07 +0100)]
Fix nl_msg_parse() to not give back a reference it does not own

16 years agoFix cache manager to not give back a reference it does not own
Thomas Graf [Mon, 17 Dec 2007 22:01:06 +0000 (23:01 +0100)]
Fix cache manager to not give back a reference it does not own

16 years agoFix memory leak when parsing netlink messages into caches
Thomas Graf [Mon, 17 Dec 2007 15:52:41 +0000 (16:52 +0100)]
Fix memory leak when parsing netlink messages into caches

The reference created by the parsers was never given back.

16 years agoFix creation and destruction of sockets
Thomas Graf [Mon, 17 Dec 2007 15:26:49 +0000 (16:26 +0100)]
Fix creation and destruction of sockets

Fixes an off-by-one when releasing local ports. Fixes nl_connect()
to properly close the socket upon failure. Return EBADFD if
operations are performed on unconnected sockets where appropriate.
Makes nl_handle_alloc() return an error if all local ports are
used up.

16 years ago[LIBNL]: Fix pointer conversion warnings on 64 bit
Patrick McHardy [Thu, 13 Dec 2007 13:33:37 +0000 (14:33 +0100)]
[LIBNL]: Fix pointer conversion warnings on 64 bit

nl-tctree-dump.c: In function 'print_class':
nl-tctree-dump.c:31: warning: cast from pointer to integer of different size
nl-tctree-dump.c:44: warning: cast from pointer to integer of different size
nl-tctree-dump.c: In function 'print_qdisc':
nl-tctree-dump.c:55: warning: cast from pointer to integer of different size
nl-tctree-dump.c:64: warning: cast from pointer to integer of different size

Signed-off-by: Patrick McHardy <kaber@trash.net
16 years ago[LIBNL]: Fix pointer conversion warnings on 64 bit
Patrick McHardy [Thu, 13 Dec 2007 13:33:35 +0000 (14:33 +0100)]
[LIBNL]: Fix pointer conversion warnings on 64 bit

nl-tctree-dump.c: In function 'print_class':
nl-tctree-dump.c:31: warning: cast from pointer to integer of different size
nl-tctree-dump.c:44: warning: cast from pointer to integer of different size
nl-tctree-dump.c: In function 'print_qdisc':
nl-tctree-dump.c:55: warning: cast from pointer to integer of different size
nl-tctree-dump.c:64: warning: cast from pointer to integer of different size

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years ago[LIBNL]: Fix format strings
Patrick McHardy [Thu, 13 Dec 2007 11:09:45 +0000 (12:09 +0100)]
[LIBNL]: Fix format strings

Use %td for ptrdiff_t and %zu for size_t.

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agoPushed to pre8 due to wrong version string in pre7
Thomas Graf [Wed, 21 Nov 2007 17:24:11 +0000 (18:24 +0100)]
Pushed to pre8 due to wrong version string in pre7

16 years agoCache message type association interface cleanups
Thomas Graf [Thu, 11 Oct 2007 21:09:49 +0000 (23:09 +0200)]
Cache message type association interface cleanups

17 years agoUse linux/types.h to fix amd64 build
Philip Craig [Tue, 18 Sep 2007 01:53:04 +0000 (11:53 +1000)]
Use linux/types.h to fix amd64 build

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

17 years agoAllow filtering by name for conntrack status flags
Philip Craig [Tue, 18 Sep 2007 01:52:59 +0000 (11:52 +1000)]
Allow filtering by name for conntrack status flags

17 years agoFix typo in conntrack object compare
Philip Craig [Tue, 18 Sep 2007 01:52:51 +0000 (11:52 +1000)]
Fix typo in conntrack object compare

17 years agoExport interface to define caches
Thomas Graf [Mon, 17 Sep 2007 11:36:16 +0000 (13:36 +0200)]
Export interface to define caches

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.